Machine Learning with Scikit-Learn - [Part 41]

In this machine learning tutorial we are continuing to work on the One-Hot encoder we started earlier.

Here is a breakdown of the main points:

  • transform the dataset which is a pandas dataframe into a numpy array
  • separate the features from the labels
  • instantiate a Logistic Regression algorithm in scikit-learn
  • train it on the One-Hot encoded data
  • view the score on the test set.

So, the performance of our Logistic Regression is 81% on the test set, which I would say is decent, given the minimum preprocessing that we've done.

As a reminder, One-Hot encoding is an efficient way of numerically representing categorical values.

It is often used in both machine learning and deep learning projects, despite the fact that it increases data burden.

Anyhow, please watch the video for a full walkthrough of the tutorial:


To stay in touch with me, follow @cristi


Cristi Vlad Self-Experimenter and Author

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center