About to fit model on train set.
Traceback (most recent call last):
File "tox21_rf.py", line 25, in <module>
sklearn_model.fit(train_X, train_y)
File "/home/alexander/env/tf/lib/python3.8/site-packages/sklearn/ensemble/_forest.py", line 330, in fit
y, expanded_class_weight = self._validate_y_class_weight(y)
File "/home/alexander/env/tf/lib/python3.8/site-packages/sklearn/ensemble/_forest.py", line 558, in _validate_y_class_weight
check_classification_targets(y)
File "/home/alexander/env/tf/lib/python3.8/site-packages/sklearn/utils/multiclass.py", line 172, in check_classification_targets
raise ValueError("Unknown label type: %r" % y_type)
ValueError: Unknown label type: 'unknown'
python3 ch5/tox21_rf.py
outputs:It helps to replace line 14:
with