Skip to content

Negative impurity importance values with splitrule = "poisson" #785

Description

@cmcrowley

Variable importance values are maximum of 0 when using impurity measure of importance with Poisson split rule. Possibly related to #764

data(mtcars)
rf <- ranger::ranger(gear ~ cyl + mpg + disp + hp + drat + wt, 
splitrule = "poisson", poisson.tau = 1, 
importance = "impurity", 
data = mtcars) 

rf$variable.importance
       cyl        mpg       disp         hp       drat         wt 
 -44.54971 -127.57739 -151.34939 -143.82199 -243.64165 -162.35374 

Permutation importance measures are positive and appear to be on a different scale. Perhaps one computation is dealing with (minimization of a negative) log likelihood and one is doing something else?

> rf <- ranger::ranger(gear ~ cyl + mpg + disp + hp + drat + wt, 
+                      splitrule = "poisson", poisson.tau = 1, 
+                      importance = "permutation", 
+                      data = mtcars) 
> rf$variable.importance
       cyl        mpg       disp         hp       drat         wt 
0.02435822 0.03311226 0.12919229 0.05829103 0.29430501 0.15226425 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions