Can you classify the monsters that are haunting?
Can you classify the monsters that are haunting? Data Science Project
Introduction to Supervised Learning with scikit-learn

Can you classify the monsters that are haunting?

During this lab, you will practice the basic steps of a classification machine learning model with scikit-learn. Classification is a type of supervised learning where the goal is to predict the class or category of a given input based on its features.
Start this project
Can you classify the monsters that are haunting?Can you classify the monsters that are haunting?
Project Created by

Verónica Barraza

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

multiplechoice

Which column is the `target` variable?

Which column is the predictor/target variable in this dataset? The value that we'll try to predict:

multiplechoice

What type of classification is required for this project?

Is it binary or multiclass classification?

codevalidated

Separate the target and the features into two variables

Store the features in X and the target y.

Despite there being various ways to solve this exercise, the results must be dataframes in order to be considered correct.

codevalidated

Split the data into training and testing using a 80%/20% proportion

Use the train_test_split function to split the data into training and testing. Use a proportion of 80% for the training set, and 20% for the testing set, and random_state=0.

Store the values in the variables in X_train,X_test,y_train and y_test.

codevalidated

Create an instance of the `DecisionTreeClassifier`

Instantiate the model and store it in the variable dt. Use random_state=0 in the argument of the model.

codevalidated

Train a Decision tree classifier

It's time to train the decision tree using the training dataset.

codevalidated

Make predictions on the test set

Use the trained model to make predictions on the test data. Store the prediction in y_pred.

Can you classify the monsters that are haunting?Can you classify the monsters that are haunting?
Project Created by

Verónica Barraza

This project is part of

Introduction to Supervised Learning with scikit-learn

Explore other projects