From e41a466c97ff7b8fccb295cf3eb13b8b43fe0042 Mon Sep 17 00:00:00 2001 From: Ashwin Raj <62590141+ashwinraj-in@users.noreply.github.com> Date: Thu, 26 Mar 2020 17:40:19 +0530 Subject: [PATCH] Updated Machine Learning with Iris Dataset.ipynb Added code to import metrics and train_test_split from sklearn module. The execution count for the cell has been added hypothetically. --- Machine Learning with Iris Dataset.ipynb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Machine Learning with Iris Dataset.ipynb b/Machine Learning with Iris Dataset.ipynb index 453b0d3..3c979a0 100644 --- a/Machine Learning with Iris Dataset.ipynb +++ b/Machine Learning with Iris Dataset.ipynb @@ -449,6 +449,20 @@ "## Splitting The Data into Training And Testing Dataset" ] }, + { + "cell_type": "code", + "metadata": { + "id": "1RBGzEfbsuEY", + "colab_type": "code", + "colab": {} + }, + "source": [ + "from sklearn.linear_model import LogisticRegression # for Logistic Regression Algorithm\n", + "from sklearn import metrics" + ], + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "execution_count": 21, @@ -466,6 +480,7 @@ } ], "source": [ + "from sklearn.model_selection import train_test_split\n", "train, test = train_test_split(iris, test_size=0.3) # our main data split into train and test\n", "# the attribute test_size=0.3 splits the data into 70% and 30% ratio. train=70% and test=30%\n", "print(train.shape)\n",