From e704e5caf57d7990b91c123ac3e37fccde0c0f23 Mon Sep 17 00:00:00 2001 From: Anuj Saha <153378181+AnujSaha0111@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:52:00 +0530 Subject: [PATCH] Removal of Classification Metrics updating Regression metrics In project which involves Stock Price Prediction which is a regression tasks, the objective is to predict continuous values, making these metrics irrelevant and potentially misleading when evaluating model performance. Since metrics like Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE) are already implemented and are appropriate for this regression task, I suggest removing the classification metrics. This will help maintain clarity and focus on relevant performance indicators. --- Stock_Price_Prediction.ipynb | 421 +++++++++++++++++------------------ 1 file changed, 210 insertions(+), 211 deletions(-) diff --git a/Stock_Price_Prediction.ipynb b/Stock_Price_Prediction.ipynb index c82b075..b558ca7 100644 --- a/Stock_Price_Prediction.ipynb +++ b/Stock_Price_Prediction.ipynb @@ -17,11 +17,7 @@ }, { "cell_type": "code", - "source": [ - "from google.colab import drive\n", - "drive.mount('/content/drive')\n", - "df = pd.read_csv('drive/My Drive/Colab Notebooks/Stock Price Prediction RNN/SBIN.csv')" - ], + "execution_count": 22, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -29,15 +25,19 @@ "id": "SOQbXSiB-g5G", "outputId": "6ae02a27-02b0-4bd9-a1ae-a7029056f32e" }, - "execution_count": 22, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n" ] } + ], + "source": [ + "from google.colab import drive\n", + "drive.mount('/content/drive')\n", + "df = pd.read_csv('drive/My Drive/Colab Notebooks/Stock Price Prediction RNN/SBIN.csv')" ] }, { @@ -53,23 +53,7 @@ }, "outputs": [ { - "output_type": "execute_result", "data": { - "text/plain": [ - " Date Open High Low Close Adj Close \\\n", - "0 01-01-1996 18.691147 18.978922 18.540184 18.823240 12.409931 \n", - "1 02-01-1996 18.894005 18.964767 17.738192 18.224106 12.014931 \n", - "2 03-01-1996 18.327892 18.568489 17.643839 17.738192 11.694577 \n", - "3 04-01-1996 17.502312 17.832542 17.223972 17.676863 11.654142 \n", - "4 05-01-1996 17.738192 17.785366 17.459852 17.577793 11.588827 \n", - "\n", - " Volume \n", - "0 43733533.0 \n", - "1 56167280.0 \n", - "2 68296318.0 \n", - "3 86073880.0 \n", - "4 76613039.0 " - ], "text/html": [ "\n", "
LinearRegression()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LinearRegression()
SVR()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
SVR()
RandomForestRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
RandomForestRegressor()
XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1367,10 +1365,7 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)" - ], - "text/html": [ - "XGBRegressor(base_score=None, booster=None, callbacks=None,\n", + " num_parallel_tree=None, random_state=None, ...)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org." + ], + "text/plain": [ + "XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1390,11 +1388,12 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1380,7 +1375,10 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.XGBRegressor(base_score=None, booster=None, callbacks=None,\n", + " num_parallel_tree=None, random_state=None, ...)
XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1537,10 +1535,7 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)" - ], - "text/html": [ - "XGBRegressor(base_score=None, booster=None, callbacks=None,\n", + " num_parallel_tree=None, random_state=None, ...)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org." + ], + "text/plain": [ + "XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1560,11 +1558,12 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)XGBRegressor(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, device=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -1550,7 +1545,10 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " multi_strategy=None, n_estimators=None, n_jobs=None,\n", - " num_parallel_tree=None, random_state=None, ...)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.XGBRegressor(base_score=None, booster=None, callbacks=None,\n", + " num_parallel_tree=None, random_state=None, ...)
AdaBoostRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
AdaBoostRegressor()
DecisionTreeRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
DecisionTreeRegressor()
KNeighborsRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
KNeighborsRegressor()