concept sklearn in category machine learning

This is an excerpt from Manning's book Grokking Machine Learning MEAP V09.
7.7 Coding a decision tree with sklearn
In order to code our decision trees, we’ll use a great and very well-known package called Scikit Learn, or sklearn for short. We need to slightly massage our data in order to have it ready for sklearn. We need to make sure that among the features, only numbers are fed. A feature with values such as ‘male’ or ‘female’, will not be accepted. Therefore, we’ll one-hot encode the Gender feature. We’ll store the dataset as a Pandas dataframe using the code below, and the result is in Table 7.10.
9.2 Coding support vector machines in sklearn
In sklearn, coding an SVM is very simple, and in this section we learn how to do it. We also learn how to use the C parameter in our code.
Figure 9.11. The plot of the SVM classifier we’ve built in sklearn consists of a line. Notice that the accuracy is 0.933.
![]()