Skip to content

Instantly share code, notes, and snippets.

@wstcpyt
Created April 7, 2020 21:13
Show Gist options
  • Save wstcpyt/3d4e9411e5b1f9013c9845cac0431a3e to your computer and use it in GitHub Desktop.
Save wstcpyt/3d4e9411e5b1f9013c9845cac0431a3e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# train test split, ratio = 0.8\n",
"features = df[[\"sepal_length\",\"sepal_width\",\"petal_length\",\"petal_width\"]]\n",
"types = df[\"types\"]\n",
"train_features, test_features, train_types, test_types = train_test_split(features,types,train_size=0.8, random_state=1)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment