2
$\begingroup$

I am getting a 100% accurate result on randomForest model in R for loan default data even when my training set and test set are completely non-overlapping. I am using abt 8 parameters/features for training the model. The model gives me ntree=1 and mtry=1. Is there anything wrong with 100% accuracy? When I do importance() I get perfectly sensible imprtance values (Ginicoeffs). Also, I am sure I am not feeding in the training data again during the testing phase. But I am surprised to get the 100% fit and the ntree=1 and mtry=1 look slightly doubtworthy. Can someone answer if theres anything wrong or its a posisble scenario?

$\endgroup$
2
  • 1
    $\begingroup$ The default value for mtry is the rounded down square root of your number of features or number of features /3 depending on wheter you are looking at classification or regression (not familiar with the data). $\endgroup$
    – Erik
    Nov 13, 2014 at 7:41
  • 1
    $\begingroup$ If it is that easy to get 100% accuracy you don't need random forest. (Anyway you are using just one fully grown tree) try another simpler model, eg a single decision tree (c4.5) or logistic regression $\endgroup$
    – Simone
    Nov 13, 2014 at 21:53

1 Answer 1

1
$\begingroup$

Have a look at the depth of the tree. The issue could be overfitting. If I am correct, the ntree is the number of trees in your forest, and if it is one, this is a single decision-tree. I'd look at the tree and assess for overfitting.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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