I try to use classification_report from sklearn.metrics:
sklearn.metrics.classification_report(y_true, y_pred, labels=None, target_names=None, sample_weight=None, digits=2, output_dict=False)
As input for prediction and label i've got one list each with the following form:
for pred:
[array([0, 0, 0, 3, 0, 3, 2, 2, 1, 1, 2, 0, 2, 3, 0, 2, 2, 2, 2, 3, 3, 2,
2, 2, 2, 2, 2, 1, 0, 3, 2, 2, 0, 2, 2, 3, 2, 0, 0, 0, 0, 0, 2, 2,
2, 1, 0, 0, 0, 2, 2, 0, 2, 0, 2, 1, 0, 2, 2, 3, 0, 2, 0, 2])]
for true:
[array([2, 3, 3, 2, 3, 3, 2, 3, 2, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3,
2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2,
2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2])]
for the sklearn-function above i need a simple list. The array produces an error:
ValueError: multiclass-multioutput is not supported
I tried .tolist() already but didn't work for me.
I am searching a possibility to convert my array-list [?] to a simple list.
Thanks for your help.
{}icon). - 9769953y_true[0]andy_pred[0], have you tried that? - 9769953pred = [np.array([0, 0, ...,])]dopred = np.array([0, 0, ...,]). If you can show the code generatingpredandtrueit might be more obvious where you mistake is that has put them into a single element list. - Dan