I am trying to input data into a random-forest classifier, but it keeps telling me I'm using a sequence. I'm not sure how to convert the sequence into anything that is acceptable
I have tried feeding it into the classifier inside a list()
, but that didn't work either.
this is an example of X_train[1]:
array([30, array([[0, 0, 1]]), 5.2304265, 7.233890799999999,
array([[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]),
array([[0, 1, 0, 0, 0, 0, 0]]), array([[0, 0, 0, 0, 1]]), 0, 0, 0,
2, 10000.0, 13000.0, 30, 1], dtype=object)
.
clf = RandomForestClassifier(n_estimators=100, max_depth=2, random_state=0)
clf.fit(X_train, y_train)
...produces...
ValueError: setting an array element with a sequence.
I expected it to accept the data, since it it is numerical, but it appears to reject the data