Last active
May 25, 2020 23:21
-
-
Save Olshansk/b6b5e49512bc642fdbe95900959024c3 to your computer and use it in GitHub Desktop.
Joint Probability Matrices - 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("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) | |
| ax[0].set_xlabel("Grade", fontsize=25) | |
| ax[0].set_ylabel("Density Probability", fontsize=25) | |
| 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) | |
| ax[1].set_xlabel("Grade", fontsize=25) | |
| ax[1].set_ylabel("Frequency", fontsize=25) | |
| 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