Scikit Learn
Scikit Learn
Learn
Nicodemus M. M.
Scikit-Learn
• Scikit-learn is a powerful, open-source Python library for machine learning and data analysis.
• It provides simple and e cient tools for various data mining and machine learning tasks, making it an
essential tool for both beginners and experienced data scientists.
ffi
Let Go!
• We are going to use only two features
from the Iris ower dataset for
visualization purpose.
C1 C1
C2 C2
NOT
C1
C3 C3
OvR
fl
fi
Prediction
• The results show that the perceptron misclassi es 4 out of the 45 ower test
samples.
• That is, misclassi cation error on the test dataset is 0.089 or 8.9%
• Instead of the misclassi cation error, many machine learning practitioners report
the classi cation accuracy of a model, which is simply calculated as follows:
• 1 - misclassification error = 0.911 or 91.1%.
fi
fi
fi
fi
fl
Scikit-learn Accuracy
• For example, we can calculate the classi cation accuracy of the perceptron
on the test set as follows:
fi
ff