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

Gael Varoquaux gael.varoquaux at normalesup.org
Thu Apr 13 14:45:04 EDT 2017


I would rather guess that this is related to a small n_estimators. I
would try increasing n_estimators in the random forests.

G

On Thu, Apr 13, 2017 at 02:41:15PM -0400, Sebastian Raschka wrote:
> 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.?
-- 
    Gael Varoquaux
    Researcher, INRIA Parietal
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-79-68
    http://gael-varoquaux.info            http://twitter.com/GaelVaroquaux


More information about the scikit-learn mailing list