I get the error of the title from the following code:
clf = RandomForestClassifier(n_estimators=n_tree, max_depth=depth_tree, class_weight='balanced')
clf.fit(x, y0)
compl.append(clf.score(x, y0))
results0=clf.predict(x)
print(results0)
print(y0)
print (x)
visualizer = ROCAUC(clf, micro=True, macro=True, is_fitted = True)
visualizer.score(x, y0)
visualizer.show()
results0, y0 and x look all normal to me. The ROCAUC is an addition to a previous version of the code that was working fine, and correctly trained the random forest.
Only suggestions I had is that it is a conflict between the two libraries, but they are all updated.
I am at a loss. The error happens at the "visualizer.score(x,y0)" line, but the two inputs looks correct to me:
x:
[[ 27. 2. 4. ... 9. 2. 34.538]
[ 28. 3. 3. ... 9. 2. 48.488]
[ 30. 2. 3. ... 19.04 2. 839.173]
...
[ 22. 2. 4. ... 9. 1. 64.102]
[ 31. 3. 4. ... 9. 1. 114.584]
[ 27. 2. 2. ... 9. 2. 37.036]]
y0:
[1 1 3 1 1 1 2 2 3 1 1 2 2 3 3 3 3 3 1 3 1 4 3 3 1 4 5 5 5 5 4 4 2 4 6 4 1
5 5 3 5 6 3 5 5 4 5 3 1 1 5 5 5 5 3 5 3 6 3 6 1 3 5 6 5 5 5 5 6 6 1 5 3 5
3 5 5 3 5 5 4 4 5 6 4 5 4 5 5 6 5 4 4 5 5 5 5 6 6 5 5 4 5 5 5 5 5 5 1 5 4
6 4 5 4 5 6 4 5 4 5 4 5 5 5 5 4 4 3 5 4 4 5 4 3 5 4 4 5 5 6 4 3 4 5 6 4 5
4 1 4 6 4 5 6 1 5 5 5 5 5 5 5 6 5 4 3 5 5 5 5 5 6 4 5 5 4 5 5 5 4 3 5 5 5
6 5 5 4 4 4 4 5 5 5 5 3 5 4 4 6 4 5 5 5 5 6 5 5 5 5 5 4 5 5 5 5 4 5 4 5 4
4 5 5 1 5 5 1 3 1 1 2 1 1 1 1 2 2 3 1 1 2 3 1 2 2 3 1 3 1 1 1 1 2 3 2 1 1
1 1 1 2 1 2 2 4 3 2 1 3 3 3 2 3 3 1 3 3 2 2 3 2 3 2 2 2 2 2 3 1 2 1 3 4 2
4 3 6 4 5 4 5 6 4 2 3 4 2 3 5 2 6 4 6 5 3 1 4 2 5 2 3 5 2 2 3 4 2 3 3 2 2
2 3 3 2 5 6 3 1 3 2 5 3 2 1 5 5 3 4 4 6 2 3 1 1 5 3 2 4 4 5 2 6 1 2 3 2 2
5 4 2 1 3 2 1 1 2 3 5 2 2 1 3 1 2 2 1 1 1 1 2 1 1 2 3 2 4 1 2 1 2 2 1 2 1
1]