@j.akhil.j wrote:
After doing some feature engineering, i applied the LR model on my training set ( after removing the loan ID colum)
train=train[,c(-1)]
fit = glm(as.factor(Loan_Status) ~ ., data = train, family = binomial)Now, i have the model, and I want to check its accuracy
So i created a duplicate training set, named it check, and applied the model on itcheck=train
check$Loan_Status = 0
Prediction = predict(fit, check,type=“response”)Now, there are some problems:
- the model doesnt get applied to check dataset. there are no errors, but the value of loan_status does not change
- how do i check accuracy? i wanted to use confusion matrix
confusionMatrix(train$Loan_Status, check$Loan_Status)
but i got an error: the data cannot have more levels than the referencecan anybody help me out?
Posts: 2
Participants: 1