[scikit-learn] Automatic ThresholdClassifier based on cost-function - Classifier Interface?

2016-11-11 Thread Anton Suchaneck
Hi! I tried writing a ThresholdClassifier, that wraps any classifier with predict_proba() and based on a cost function adjusts the threshold for predict(). This helps for imbalanced data. My current cost function assigns cost +cost for a true positive and -1 for a false positive. It seems to run,

Re: [scikit-learn] Automatic ThresholdClassifier based on cost-function - Classifier Interface?

2016-11-11 Thread Andreas Mueller
Hi. You don't have to implement set_params and get_params if you inherit from BaseEstimator. I find it weird that you pass find_threshold_cost_function as a constructor parameter but otherwise the API looks ok. You are not allowed to use **kwargs in __init___, though. Andy On 11/11/2016 05:23