You are on page 1of 2

Introduction to SciKit.ipynb - Colaboratory https://colab.research.google.com/drive/1srVswFoHSpdXSFo...

Preparation

Load Dependencies

1 import seaborn as sns
2 import pandas as pd
3 import numpy as np

Supervised Learning

Load IRIS Dataset

1 iris = sns.load_dataset('iris')
2 iris_features = ['petal_length', 'petal_width', 'sepal_length', 'sepal_width']
3 iris_label = 'species'
4 iris.head()

1 # test-train split iris dataset
2 from sklearn.model_selection import train_test_split
3 iris_train, iris_test = train_test_split(iris, test_size=0.2, random_state=42)

Visualizations

1 sns.pairplot(iris, hue=iris_label)

Classi9cation
In a classi9cation problem, we try to determine the label of a class based on the
readings/ data we have. For example whether an image is an image of a cat or a dog.

For the examples during the section, we will use the iris dataset, in which we have
measurements relating to the different species of iris Eower. Here we will focus on
determining which type of species that a measurement corresponds to.

1 of 2 8/11/20, 6:25 AM
Introduction to SciKit.ipynb - Colaboratory https://colab.research.google.com/drive/1srVswFoHSpdXSFo...

2 of 2 8/11/20, 6:25 AM

You might also like