Ali Hassan
numpy
for numerical operations, pandas
for data manipulation, matplotlib.pyplot
for data visualization, seaborn
for enhanced data visualization, and modules from scikit-learn
for machine learning.iris_data
.X
by dropping the 'Species' column from iris_data
.y
containing the 'Species' column.train_test_split()
from sci-kit-learn to split X
and y
into X_train
, X_test
, y_train
, and y_test
.random_state
) is set for reproducibility.SVC()
.fit()
.confusion_matrix()
sci-kit-learn.sns.heatmap()
to create the heatmap with annotations.RandomForestClassifier()
.fit()
.confusion_matrix()
from scikit-learn.sns.heatmap()
to create the heatmap with annotations.y_score_svm
) for the test data using decision_function()
.roc_curve()
and auc()
.y_score_rf
) for the test data using predict_proba()
.