Hi Simon.
In general in scikit-learn you could use class-weights to make one class 
more important then the other.
Unfortunately that is not implemented for AdaBoost yet. You can however 
use the sample_weights parameter of the fit method,
and create sample weights either by hand based on the class, or use the 
compute_sample_weights function: 
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/class_weight.py#L82

The other possibility is to simply threshold the predict_proba of your 
classifier differently based on your cost.

Best,
Andy


On 08/04/2015 10:29 AM, Simon Burton wrote:
> Hi,
>
> I am attempting to build some classification models where false-positives are
> much worse than false-negatives. Normally these two outcomes are
> treated equally (equal loss) in the training procedure,
> but I would like to be able to customize this.
>
> I've been using the AdaBoost classifier, which works well as a general
> data-miner, except for this issue. I tried hacking a bit on the
> code by only boosting the false-positive samples,
> but I don't really know if that makes any sense (it tends to forget
> about the false-negatives).
>
> Googling around I found a paper [1] but it's not clear to me
> if this is what I am looking for.
>
> Thankyou for any suggestions.
>
> Simon.
>
>
> [1] McCane, Brendan; Novins, Kevin; Albert, Michael (2005). "Optimizing 
> cascade classifiers.".
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general


------------------------------------------------------------------------------
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to