text_plain_output_1.png
from sklearn.metrics import accuracy_score,make_scorer

from sklearn.model_selection import train_test_split, GridSearchCV

from sklearn.preprocessing import LabelEncoder

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

dataset = pd.read_csv('../input/Iris.csv')
print(dataset.head())
lb_make = LabelEncoder()
dataset['Species'] = dataset['Species'].astype('category')
dataset['SepalRatio'] = np.divide(dataset['SepalLengthCm'], dataset['SepalWidthCm'])
dataset['PetalRatio'] = np.divide(dataset['PetalLengthCm'], dataset['PetalWidthCm'])
X_all = dataset[['Id', 'SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm', 'SepalRatio', 'PetalRatio']]
print(X_all.head())
y_all = lb_make.fit_transform(dataset['Species'])
num_test = 0.2
X_train, X_test, y_train, y_test = train_test_split(X_all, y_all, test_size=num_test, random_state=88)
acc_scorer = make_scorer(accuracy_score)