1
$\begingroup$

Partial Dependence PlotThis question regarding the partial dependence plots obtained from random forest model. I am trying to do classification modelling. I see negative probability in the y-axis . How to interpret this?

$\endgroup$
  • $\begingroup$ It would help if you posted the plot in question $\endgroup$ – shadowtalker Sep 5 '16 at 5:52
  • $\begingroup$ I have updated the picture. Sorry i dont have good quality picture. $\endgroup$ – Shudharsanan Sep 5 '16 at 6:08
  • 1
    $\begingroup$ It could be outputting the probabilities on the log odds scale. What software are you using? $\endgroup$ – Dex Groves Sep 5 '16 at 7:37
  • $\begingroup$ @DexGroves my money is on R: randomForest::partialPlot() $\endgroup$ – shadowtalker Sep 5 '16 at 13:07
5
$\begingroup$

If this came from R, then these are logits of probabilities, not raw probabilities.

As per the documentation:

The function being plotted is defined as: $$\tilde{f}(x) = \frac{1}{n} \sum_{i=1}^n f(x, x_{iC}),$$ where $x$ is the variable for which partial dependence is sought, and $x_{iC}$ is the other variables in the data. The summand is the predicted regression function for regression, and logits (i.e., log of fraction of votes) for which.class for classification: $$f(x) = \log p_k(x) - \frac{1}{K} \sum_{j=1}^K \log p_j(x),$$ where $K$ is the number of classes, $k$ is which.class, and $p_j$ is the proportion of votes for class $j$.

(http://www.rdocumentation.org/packages/randomForest/versions/4.6-12/topics/partialPlot)

It is perfectly fine to have negative values, or for that matter values greater than 1. Recall what the logit function looks like:

(https://en.wikipedia.org/wiki/Logit#/media/File:Logit.svg)

Negative values correspond to probabilities (or in this case proportions) less than 0.5.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.