libfgs may fail to converge. So, we are here using liblinear solver.
After that, we are using the cross_val_score() function to evaluate the performance of the model. We are using the accuracy score to evaluate the model (What is the accuracy score in machine learning?)
print("Accuracy: ", results.mean())
Please note that, as discussed, there are total n number of models for n records in the dataset. So, we can take the mean of the accuracy scores of n models. The program will output the following:
Accuracy: 0.7682291666666666
As we can see that the average accuracy score of our machine learning model has improved slightly on using the Leave One Out Cross Validation over the k-fold cross-validation.






0 Comments