Skip to main content
added 598 characters in body
Source Link
AutoMiner
  • 169
  • 1
  • 9

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

Edit 1: Thanks to Davids answer I realized TRUE and FALSE are my class "names". I still don't understand how the value given in the matrix is calculated though... Can anyone help with that?

Edit 2: Thanks to David again, it turns out the answer is in the documentation. But it cannot be found in the chapter about the importance() function, but rather in the description of objects of class randomForest. Importance is one of these objects.

[...] a matrix with nclass + 2 (for classification) or two (for regression) columns. For classification, the first nclass columns are the class-specific measures computed as mean descrease in accuracy. The nclass + 1st column is the mean descrease in accuracy over all classes. The last column is the mean decrease in Gini index.

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

Edit: Thanks to Davids answer I realized TRUE and FALSE are my class "names". I still don't understand how the value given in the matrix is calculated though... Can anyone help with that?

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

Edit 1: Thanks to Davids answer I realized TRUE and FALSE are my class "names". I still don't understand how the value given in the matrix is calculated though... Can anyone help with that?

Edit 2: Thanks to David again, it turns out the answer is in the documentation. But it cannot be found in the chapter about the importance() function, but rather in the description of objects of class randomForest. Importance is one of these objects.

[...] a matrix with nclass + 2 (for classification) or two (for regression) columns. For classification, the first nclass columns are the class-specific measures computed as mean descrease in accuracy. The nclass + 1st column is the mean descrease in accuracy over all classes. The last column is the mean decrease in Gini index.

added 195 characters in body
Source Link
AutoMiner
  • 169
  • 1
  • 9

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

Edit: Thanks to Davids answer I realized TRUE and FALSE are my class "names". I still don't understand how the value given in the matrix is calculated though... Can anyone help with that?

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers

Edit: Thanks to Davids answer I realized TRUE and FALSE are my class "names". I still don't understand how the value given in the matrix is calculated though... Can anyone help with that?

Source Link
AutoMiner
  • 169
  • 1
  • 9

Meaning of "TRUE" column in R RandomForest output for Importance()?

I want to assess the importance of variables in my model using the Importance() function of R RandomForest package. I have a binary response variable / class and binary feature values.

mytree.rf <- randomForest(class ~ ., data=mydata, ntree=1500,keep.forest=FALSE,importance=TRUE)
importance(mytree.rf)

The output matrix contains the MeanDecreaseAccuracy and MeanDecreaseGini. I understand those two.

My problem is with two other columns in the output. One simply says "TRUE" the other one "FALSE". Neither in the documentation nor online I was able to find an answer what those values are and how they are calculated...

Can anyone help me out?

Cheers