How use predict_one if X is 3d-data? #1201
-
import numpy as np
from river import naive_bayes
from river import stream
X = np.array([[[-1, -1], [-1, -1]], [[1, -1], [-1, -1]], [[-3, -1], [-1, -1]], [[-1, -1], [-1, -1]],
[[-1, -1], [-1, -1]], [[-1, 1], [-2, -1]]])
Y = np.array([1, 1, 1, 2, 2, 2])
model = naive_bayes.GaussianNB()
for x, y in stream.iter_array(X, Y):
model.learn_one(x, y)
print(model.predict_one(???)) How use model.predict_one if X is 3d-list? |
Beta Was this translation helpful? Give feedback.
Answered by
MaxHalford
Mar 14, 2023
Replies: 1 comment 4 replies
-
Hey there. We don't support this paradigm out of the box. You would have to convert your raw inputs into features. The features would depend on the nature of your raw inputs, and what you're trying to model. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
xayam
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there. We don't support this paradigm out of the box. You would have to convert your raw inputs into features. The features would depend on the nature of your raw inputs, and what you're trying to model.