Created
May 24, 2020 19:55
-
-
Save Olshansk/ed6f02eb98d5c3f3e9b1562960b110d7 to your computer and use it in GitHub Desktop.
Transition Matricies - Regression Analysis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Regression Analysis | |
| fig, ax = plt.subplots(2, 1, figsize=(20,20)) | |
| sns.set(color_codes=True) | |
| print("r2_score: ", round(r2_score(grades_GT, grades_P), 2)) | |
| print("mean_squared_error: ", round(mean_squared_error(grades_GT, grades_P), 2)) | |
| print("mean_absolute_error: ", round(mean_absolute_error(grades_GT, grades_P), 2)) | |
| print("explained_variance_score: ", round(explained_variance_score(grades_GT, grades_P), 2)) | |
| ax[0].tick_params(axis='both', labelsize=25) | |
| ax[0].set_title("Ground Truth & Predicted Grades - PDF") | |
| ax[0].title.set_size(30) | |
| sns.distplot(grades_GT, kde=True, rug=False, ax=ax[0]) | |
| sns.distplot(grades_P, kde=True, rug=False, ax=ax[0]) | |
| ax[1].tick_params(axis='both', labelsize=25) | |
| ax[1].set_title("Ground Truth & Predicted Grades - Histogram") | |
| ax[1].title.set_size(30) | |
| sns.distplot(grades_GT, kde=False, rug=True, ax=ax[1]) | |
| sns.distplot(grades_P, kde=False, rug=True, ax=ax[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment