From 174a67b2c1e8d2f79d946232831f0f5937104611 Mon Sep 17 00:00:00 2001 From: Petra Vidnerova Date: Sun, 10 Nov 2024 14:15:56 +0100 Subject: [PATCH] kosmeticka uprava --- lessons/pydata/homework_revisited/index.ipynb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lessons/pydata/homework_revisited/index.ipynb b/lessons/pydata/homework_revisited/index.ipynb index 7923668..1b2cebe 100644 --- a/lessons/pydata/homework_revisited/index.ipynb +++ b/lessons/pydata/homework_revisited/index.ipynb @@ -948,14 +948,9 @@ "outputs": [], "source": [ "is_bream = X_real_test[\"Species\"] == \"Bream\"\n", - "bream = X_real_test[is_bream][\"Length3\"]\n", - "\n", - "bream_weights = y_real_test[is_bream]\n", "predicted_bream_weights = best_model.predict(X_real_test_scaled[is_bream])\n", "\n", "is_roach = X_real_test[\"Species\"] == \"Roach\"\n", - "roach = X_real_test[is_roach][\"Length3\"]\n", - "roach_weights = y_real_test[is_roach]\n", "predicted_roach_weights = best_model.predict(X_real_test_scaled[is_roach])" ] }, @@ -966,14 +961,14 @@ "outputs": [], "source": [ "result_bream = pd.DataFrame()\n", - "result_bream[\"length\"] = bream\n", - "result_bream[\"weight\"] = bream_weights\n", + "result_bream[\"length\"] = X_real_test[is_bream][\"Length3\"]\n", + "result_bream[\"weight\"] = y_real_test[is_bream]\n", "result_bream[\"predicted\"] = predicted_bream_weights\n", "result_bream = result_bream.sort_values(\"length\")\n", "\n", "result_roach = pd.DataFrame()\n", - "result_roach[\"length\"] = roach\n", - "result_roach[\"weight\"] = roach_weights\n", + "result_roach[\"length\"] = X_real_test[is_roach][\"Length3\"]\n", + "result_roach[\"weight\"] = y_real_test[is_roach]\n", "result_roach[\"predicted\"] = predicted_roach_weights\n", "result_roach = result_roach.sort_values(\"length\")" ]