From fe808a26b31c7d92283d4db1efd35c37d64a94cb Mon Sep 17 00:00:00 2001 From: Ugwu Gabby <107874044+GabbyHills@users.noreply.github.com> Date: Sat, 5 Aug 2023 07:23:11 +0100 Subject: [PATCH] Update Diabetes Ridge Regression Training.ipynb --- .../Diabetes Ridge Regression Training.ipynb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/experimentation/Diabetes Ridge Regression Training.ipynb b/experimentation/Diabetes Ridge Regression Training.ipynb index 21073e41..5b6671b7 100644 --- a/experimentation/Diabetes Ridge Regression Training.ipynb +++ b/experimentation/Diabetes Ridge Regression Training.ipynb @@ -59,6 +59,18 @@ " return reg_model" ] }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "# Evaluate the metrics for the model\n", + "def = get_model_metrics(reg_model, data):\n", + "preds = reg_model.predict(data[\"test\"][\"X\"])\n", + "mse = mean_squared_error(preds, y_test)\n", + "metrics = {\"mse\": mse}\n", + " return metrics" + ] + }, { "cell_type": "code", "execution_count": 4, @@ -139,7 +151,7 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", "metadata": {}, "source": [ "## Evaluate the metrics for the model"