albahnsen / CostSensitiveClassification

CostSensitiveClassification Library in Python
BSD 3-Clause "New" or "Revised" License
207 stars 83 forks source link

Cannot use predict_proba with cost matrix ? #26

Open bachphamthien opened 3 years ago

bachphamthien commented 3 years ago

Hi,

Thank you very much for this library, it is exactly what I was looking for.

I noticed there is a difference in the required arguments of two methods of the model CostSensitiveRandomForestClassifier, predict and predict_proba. The former accepts a cost matrix as input but the latter does not while I thought they are essentially the same with predict giving a crisp label if the predicted probability (or voting result) is greater than the default threshold of 0.5. Can you explain if I'm missing something here ?

Thanks.