1. Learn
  2. /
  3. Courses
  4. /
  5. Predicting CTR with Machine Learning in Python

Exercise

Beginning model

In this exercise, you will build an MLP classifier on the dataset of images used in chapter 1. As a reminder, each image represents a number 0 through 9 and the goal is to classify each imagine as a number. The features used are specific pixel values ranging from 0-16 that make up the image. After scaling features, you will evaluate the accuracy of the classifier on the testing set.

In your workspace, sample image data in DataFrame form is loaded as image_data along with sklearn and pandas as pd. StandardScaler() from sklearn.preprocessing is available as well.

Instructions

100 XP
  • Standard scale the features using .fit_transform() and split data into training and testing sets using train_test_split().
  • Create a MLP classifier.
  • Create predictions using the classifier and evaluate the accuracy using accuracy_score().