ersilia-os / chempfn

Ensemble-based, size-agnostic wrapper for the TabPFN classifier
GNU General Public License v3.0
28 stars 0 forks source link

Incorrect predict_proba implementation #27

Closed DhanshreeA closed 1 year ago

DhanshreeA commented 1 year ago

predict_proba method for any estimator should return result in the form of (n_samples, n_classes). Previous implementation only returned the maximum probability which not only is incorrect, it also does not make it clear which class the probability corresponds to.

A fix was attempted in 0671664f600f07afdff0e0fd659b47af08fd166b with the following statement in L124 and L142

proba1 = p[:,1]

However, this only returns probability for class 0. This works for binary classification, but it would not work for more than two classes.