Problem Statement:Create the model that can classify the different species of the Iris flower.
Inorder to classify the different species of the Iris,We should prepare the datasets with features and labels.But sklearn comes with the inbuilt datasets for the iris classification problem.Splitting the dataset:Since our process involve training and testing ,We should split our dataset.It can be executed by the following code
We can use any classification algorithm to solve the problem.I will go with decision tree algorithm.
We can train the model with fit function.
Predictions can be done with predict function. Accuracy(97%)