Closed livington closed 1 year ago
Hi @livington, please describe the problems you have encountered, we will add them to the backlog.
Hi!The problem is about unexpectable behavior after solving multiclass task. For example I used TabularUtilizedAutoML and solved multiclass task, so, I had to do next gyms to get correct prediction:
test_pred= automl.predict(test).data.argmax(axis=1)
class_mapping = {v:k for k, v in automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping.items()}
test_pred = [class_mapping[e] for e in test_pred_age]
Because during training automl, class names were changed. But sometimes (sometimes!) class_mapping is qual None, so code should be:
if automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping is not None:
test_pred= automl.predict(test).data.argmax(axis=1)
else:
class_mapping = {v:k for k, v in automl.outer_pipes[0].ml_algos[0].models[0][0].reader.class_mapping.items()}
test_pred = [class_mapping[e] for e in automl.predict(test).data.argmax(axis=1)]
So,my pull request was about care of users, and I suggested show (sometimes) them motivating information about solving multiclass task.
Thanks for your comment, https://github.com/sb-ai-lab/LightAutoML/issues/68 is exactly about that :)
Friendly user care