From f218dd733584629163906c1ca65f5aeb68d86198 Mon Sep 17 00:00:00 2001 From: Jeff Hernandez <12969559+jeff-hernandez@users.noreply.github.com> Date: Tue, 9 Feb 2021 12:42:22 -0600 Subject: [PATCH] get prediction values --- docs/source/examples/predict_bike_trips.ipynb | 7 ++++--- docs/source/examples/predict_next_purchase.ipynb | 7 ++++--- docs/source/examples/predict_turbofan_degredation.ipynb | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/source/examples/predict_bike_trips.ipynb b/docs/source/examples/predict_bike_trips.ipynb index fe8b4331..82cd97d6 100644 --- a/docs/source/examples/predict_bike_trips.ipynb +++ b/docs/source/examples/predict_bike_trips.ipynb @@ -419,10 +419,11 @@ "metadata": {}, "outputs": [], "source": [ - "values = best_pipeline.predict(fm).values.round()\n", + "y_pred = best_pipeline.predict(fm)\n", + "y_pred = y_pred.to_series().values.round()\n", "\n", "prediction = fm[[]]\n", - "prediction['trip_count (estimate)'] = values\n", + "prediction['trip_count (estimate)'] = y_pred\n", "prediction.head()" ] }, @@ -452,7 +453,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.7.5" } }, "nbformat": 4, diff --git a/docs/source/examples/predict_next_purchase.ipynb b/docs/source/examples/predict_next_purchase.ipynb index 730483fe..fc5f0ba6 100644 --- a/docs/source/examples/predict_next_purchase.ipynb +++ b/docs/source/examples/predict_next_purchase.ipynb @@ -442,10 +442,11 @@ "metadata": {}, "outputs": [], "source": [ - "values = best_pipeline.predict(fm).values\n", + "y_pred = best_pipeline.predict(fm)\n", + "y_pred = y_pred.to_series().values\n", "\n", "prediction = fm[[]]\n", - "prediction['bought_product (estimate)'] = values\n", + "prediction['bought_product (estimate)'] = y_pred\n", "prediction.head()" ] }, @@ -480,7 +481,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.7.5" } }, "nbformat": 4, diff --git a/docs/source/examples/predict_turbofan_degredation.ipynb b/docs/source/examples/predict_turbofan_degredation.ipynb index 224768da..3b026bdb 100644 --- a/docs/source/examples/predict_turbofan_degredation.ipynb +++ b/docs/source/examples/predict_turbofan_degredation.ipynb @@ -488,10 +488,11 @@ "metadata": {}, "outputs": [], "source": [ - "values = best_pipeline.predict(fm).values\n", + "y_pred = best_pipeline.predict(fm)\n", + "y_pred = y_pred.to_series().values\n", "\n", "prediction = fm[[]]\n", - "prediction['rul (estimate)'] = values\n", + "prediction['rul (estimate)'] = y_pred\n", "prediction.head()" ] }, @@ -527,7 +528,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.7.5" } }, "nbformat": 4,