diff --git a/experimentation/Diabetes Ridge Regression Training.ipynb b/experimentation/Diabetes Ridge Regression Training.ipynb index 117e5442..a80cb5a4 100644 --- a/experimentation/Diabetes Ridge Regression Training.ipynb +++ b/experimentation/Diabetes Ridge Regression Training.ipynb @@ -28,7 +28,24 @@ "import pandas as pd" ] }, - + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# Split the dataframe into test and train data\n", + "def = split_data(df):\n", + "X = df.drop('Y', axis=1).values\n", + "y = df['Y'].values\n", + "\n", + "X_train, X_test, y_train, y_test = train_test_split(\n", + " X, y, test_size=0.2, random_state=0)\n", + "data = {\"train\": {\"X\": X_train, \"y\": y_train},\n", + " \"test\": {\"X\": X_test, \"y\": y_test}}\n", + " return data" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -62,24 +79,6 @@ "reg_model = Ridge(**args)" ] }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "# Split the dataframe into test and train data\n", - "def = split_data(df):\n", - "X = df.drop('Y', axis=1).values\n", - "y = df['Y'].values\n", - "\n", - "X_train, X_test, y_train, y_test = train_test_split(\n", - " X, y, test_size=0.2, random_state=0)\n", - "data = {\"train\": {\"X\": X_train, \"y\": y_train},\n", - " \"test\": {\"X\": X_test, \"y\": y_test}}\n", - " return data" - ] - }, { "cell_type": "markdown", "metadata": {},