Model Evaluation
From the above accuracies, we can say that Logistic Regression and support vector classifier are satisfactory as the gap between the training and the validation accuracy is low. Let’s plot the confusion matrix as well for the validation data using the SVC model.
Python3
metrics.plot_confusion_matrix(models[ 2 ], X_val, Y_val) plt.show() |
Output:
Let’s plot the classification report as well for the validation data using the SVC model.
Python3
print (metrics.classification_report(Y_val, models[ 2 ].predict(X_val))) |
Output:
precision recall f1-score support 0 0.84 0.67 0.74 24 1 0.85 0.94 0.90 50 accuracy 0.85 74 macro avg 0.85 0.80 0.82 74 weighted avg 0.85 0.85 0.85 74
Rainfall Prediction using Machine Learning – Python
Today there are no certain methods by using which we can predict whether there will be rainfall today or not. Even the meteorological department’s prediction fails sometimes. In this article, we will learn how to build a machine-learning model which can predict whether there will be rainfall today or not based on some atmospheric factors. This problem is related to Rainfall Prediction using Machine Learning because machine learning models tend to perform better on the previously known task which needed highly skilled individuals to do so.