Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Machine Learning with Iris Dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand Down