[scikit-learn] Random forest prediction probability value is limited to a single decimal point

Sebastian Raschka se.raschka at gmail.com
Thu Apr 13 14:41:15 EDT 2017


Hi,
Have you tried to set numpy.set_printoptions(precision=8) ? Maybe that helps already.
Best,
Sebastian 



Sent from my iPhone

> On Apr 13, 2017, at 1:54 PM, Suranga Kasthurirathne <surangakas at gmail.com> wrote:
> 
> 
> Hi all,
> 
> I'm using scikit-learn to build a number of random forrest models using the default number of trees.
> 
> However, when I print out the prediction probability (http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier.predict_proba) for each outcome, its presented to me as a single decimal point (0.1, 0.2, 0.5 etc.). Only perhaps 5% of the data has more than a single decimal point.
> 
> Is this normal behavior? is there some way I can increase the number of decimal points in the prediction probability outcomes? why arent I seeing more probabilities such as 0.231, 0.55551, 0.462156 etc.?
> 
> 
> -- 
> Thanks and best Regards,
> Suranga
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170413/cc429c55/attachment.html>


More information about the scikit-learn mailing list