Open wangtvb opened 1 year ago
Hi @wangtvb,
thanks for sharing the issue. I'll have a look into that and open a new branch. Hope to have it fixed until the end of the week.
Best Cedric
Hi Cedric:
I think if some algorithms don't have the instance at the beginning, they could not predict the first instance at the beginning. Taking the KNN as a example, the window used in KNN at the beginning is empty. The first instance is used to predict, and it may predict the None. This is because the window at the beginning doesn't have any values, it leads to None. But i am not sure, it might be the one of the reasons.
Hi Cedric:
I think if some algorithms don't have the instance at the beginning, they could not predict the first instance at the beginning. Taking the KNN as a example, the window used in KNN at the beginning is empty. The first instance is used to predict, and it may predict the None. This is because the window at the beginning doesn't have any values, it leads to None. But i am not sure, it might be the one of the reasons.
Hi Jason,
I finally had a look into the first None
value. Actually the problem lies within the river Bagging classifier. The predict_one
function calls the predict_proba_one
function of the base estimator. The first result of the predict_proba_one
function is actually an empty dict as no class is known to the estimator, which causes the output to be None
.
It may be possible to re-implement the bagging estimators in such a way that the predict_one
function can do without the predict_proba_one
function.
Best Cedric
Hi Cedric:
Thank you for solving this problem.
Best Jason
Hi Cedric:
I used the official example and run this dataset 'datasets.Phishing()' using the EvolutionaryBaggingClassifier().
But I don't know why the first instance, this pipeline predicts that it is None. Is it normal?