diff options
| author | Bobby <[email protected]> | 2022-11-14 21:31:32 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-14 21:31:32 -0500 |
| commit | 0eb9ac45dcf195e65ea4941229c7e32f17b46d87 (patch) | |
| tree | 625dc8ef7e959d80e813f925420835d5a6a80d19 | |
| parent | 574d36f0f2f1e75310e5c1083b58d1e98e926dd4 (diff) | |
| parent | 2ebec8debf34a69126d1032de55a49c804f79d6c (diff) | |
| download | RedditEngagementPrediction-0eb9ac45dcf195e65ea4941229c7e32f17b46d87.tar.xz RedditEngagementPrediction-0eb9ac45dcf195e65ea4941229c7e32f17b46d87.zip | |
Merge pull request #7 from luciferreeves/main
asd
| -rw-r--r-- | project.ipynb | 107 |
1 files changed, 102 insertions, 5 deletions
diff --git a/project.ipynb b/project.ipynb index 445ea22..7e3ffd4 100644 --- a/project.ipynb +++ b/project.ipynb @@ -1853,7 +1853,107 @@ }, { "cell_type": "code", - "execution_count": 1145, + "execution_count": 1152, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "<div>\n", + "<style scoped>\n", + " .dataframe tbody tr th:only-of-type {\n", + " vertical-align: middle;\n", + " }\n", + "\n", + " .dataframe tbody tr th {\n", + " vertical-align: top;\n", + " }\n", + "\n", + " .dataframe thead th {\n", + " text-align: right;\n", + " }\n", + "</style>\n", + "<table border=\"1\" class=\"dataframe\">\n", + " <thead>\n", + " <tr style=\"text-align: right;\">\n", + " <th></th>\n", + " <th>R-Sq</th>\n", + " <th>RMSE</th>\n", + " <th>MAE</th>\n", + " </tr>\n", + " </thead>\n", + " <tbody>\n", + " <tr>\n", + " <th>RidgeCV</th>\n", + " <td>0.060517</td>\n", + " <td>163.393393</td>\n", + " <td>62.532860</td>\n", + " </tr>\n", + " <tr>\n", + " <th>DecisionTreeRegressor</th>\n", + " <td>0.051456</td>\n", + " <td>164.179481</td>\n", + " <td>61.556500</td>\n", + " </tr>\n", + " <tr>\n", + " <th>RandomForestRegressor</th>\n", + " <td>0.038417</td>\n", + " <td>165.304023</td>\n", + " <td>60.911719</td>\n", + " </tr>\n", + " <tr>\n", + " <th>DummyRegressor</th>\n", + " <td>-0.000054</td>\n", + " <td>168.578356</td>\n", + " <td>66.384145</td>\n", + " </tr>\n", + " <tr>\n", + " <th>KNeighborsRegressor</th>\n", + " <td>-0.086344</td>\n", + " <td>175.700859</td>\n", + " <td>61.922131</td>\n", + " </tr>\n", + " <tr>\n", + " <th>GradientBoostingRegressor</th>\n", + " <td>-0.145187</td>\n", + " <td>180.396561</td>\n", + " <td>64.375011</td>\n", + " </tr>\n", + " <tr>\n", + " <th>LinearRegression</th>\n", + " <td>-7.239768</td>\n", + " <td>483.891107</td>\n", + " <td>364.603158</td>\n", + " </tr>\n", + " </tbody>\n", + "</table>\n", + "</div>" + ], + "text/plain": [ + " R-Sq RMSE MAE\n", + "RidgeCV 0.060517 163.393393 62.532860\n", + "DecisionTreeRegressor 0.051456 164.179481 61.556500\n", + "RandomForestRegressor 0.038417 165.304023 60.911719\n", + "DummyRegressor -0.000054 168.578356 66.384145\n", + "KNeighborsRegressor -0.086344 175.700859 61.922131\n", + "GradientBoostingRegressor -0.145187 180.396561 64.375011\n", + "LinearRegression -7.239768 483.891107 364.603158" + ] + }, + "execution_count": 1152, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Compare model performance\n", + "ups_model_performance_df = pd.DataFrame.from_dict(ups_model_performance_dict, orient='index', columns=['R-Sq', 'RMSE', 'MAE'])\n", + "ups_model_performance_df.sort_values(by='R-Sq', ascending=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 1153, "metadata": {}, "outputs": [ { @@ -1940,15 +2040,12 @@ "LinearRegression -23.806729 172.333979 134.354980" ] }, - "execution_count": 1145, + "execution_count": 1153, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# Compare model performance\n", - "ups_model_performance_df = pd.DataFrame.from_dict(ups_model_performance_dict, orient='index', columns=['R-Sq', 'RMSE', 'MAE'])\n", - "ups_model_performance_df.sort_values(by='R-Sq', ascending=False)\n", "\n", "num_comments_model_performance_df = pd.DataFrame.from_dict(num_comments_model_performance_dict, orient='index', columns=['R-Sq', 'RMSE', 'MAE'])\n", "num_comments_model_performance_df.sort_values(by='R-Sq', ascending=False)" |
