Skip to content

Instantly share code, notes, and snippets.

@triestpa
Created June 8, 2016 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triestpa/0bce50e357c6c5f19811b975c5f9b604 to your computer and use it in GitHub Desktop.
Save triestpa/0bce50e357c6c5f19811b975c5f9b604 to your computer and use it in GitHub Desktop.
X Y Split
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"X = processed_df.drop(['survived'], axis=1).values\n",
"y = processed_df['survived'].values"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"X_train, X_test, y_train, y_test = cross_validation.train_test_split(X,y,test_size=0.2)"
]
}
],
"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.4.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment