Hello All,
Today in this blog I am going to explain you how to solve a Supervised learning problem by considering a multi-class classification problem using a Iris dataset.
I have considered Iris dataset so that a beginner in a datascience field can easily understand the concept behind a Supervised Learning problem.
About "Iris data" in short: It has 4 features - 'Sepal length", "Sepal Width', 'Petal length' and 'Petal width' based on which we need to classify whether the output ('iris') goes into which of the three categories ('Setosa' or 'Versicolor' or 'Virginica')
Steps to follow:
Step:1 Import required Libraries
Step:2 Load the csv file on which we need to work
Step: 3
Today in this blog I am going to explain you how to solve a Supervised learning problem by considering a multi-class classification problem using a Iris dataset.
I have considered Iris dataset so that a beginner in a datascience field can easily understand the concept behind a Supervised Learning problem.
About "Iris data" in short: It has 4 features - 'Sepal length", "Sepal Width', 'Petal length' and 'Petal width' based on which we need to classify whether the output ('iris') goes into which of the three categories ('Setosa' or 'Versicolor' or 'Virginica')
Steps to follow:
Step:1 Import required Libraries
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
dataset=pd.read_csv(r'C:\......\iris.csv')
dataset.head()
sepal length | sepal width | petal length | petal width | iris | |
---|---|---|---|---|---|
0 | 5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa |
1 | 4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa |
2 | 4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa |
3 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa |
4 | 5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa |
dataset.info()