Skip to content

Updated Machine Learning with Iris Dataset.ipynb #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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