@Surya1987 wrote:
n<-as.data.frame(a.out$imputations[[i]])
s<-randomForest(Loan_Status~Gender+Married+Dependents+Education+Self_Employed+Property_Area+ApplicantIncome+CoapplicantIncome+LoanAmount+Loan_Amount_Term+Credit_History,data=n)
print(s)
plot(s)
testPred <- predict(s, newdata = n)
table(testPred, n$Loan_Status)
}print(s) gives following result.
Confusion matrix:
N Y class.error
N 71 77 0.52027027
Y 18 314 0.05421687However table(testPred, n$Loan_Status) gives following result.
testPred N Y
N 1 87 0
Y 5 422
Why is there difference in result?
Posts: 1
Participants: 1