Am working on binary classification problem with 5K records. Label 1 is 1554 and Label 0 is 3558.
I did refer this post but not sure whether it is updated now or anyone has any way to compute this metrics
Currently I use logit model as shown below
model = smm.Logit(y_train, X_train_std) result=model.fit() y_pred = result.predict(X_test_std) print("Accuracy is ", accuracy_score(X_test_std, y_pred)) #throws error from here and all the line below print(classification_report(X_test_std, y_pred)) print("ACU score is ",roc_auc_score(X_test_std, y_pred)) print("Recall score is",recall_score(X_test_std,y_pred)) print("Precision score is",precision_score(X_test_std,y_pred)) print("F1 score is",f1_score(X_test_std,y_pred))
The reason why I am trying to do this is because statsmodel has
intervals etc and I was hoping to get the usual metrics through
scikit metrics as shown above but it isn't accepted.
On the other hand, Through
scikit logistic regression I can get
usual metrics and
coeff, but what about
conf intervals? Is there anyway to do the reverse?
Can someone help me with this?