Created
August 8, 2020 21:47
-
-
Save jkclem/8ceaeb7943dfc7e88e1862ecfdfcc5e1 to your computer and use it in GitHub Desktop.
This file contains 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
# for the paired t-test for differnce of means | |
from scipy.stats import ttest_rel | |
# save and printprint the results of the test on the Ridge estimates | |
lasso_results = ttest_rel(unbiased_sigma_estimates, lasso_sigma_estimates) | |
print(f'Test Statistic for the Paired t-test between the True Model and LASSO: {round(lasso_results[0], 4)}') | |
print(f'p-value for the Paired t-test between the True Model and LASSO: {round(lasso_results[1], 4)}') | |
print() | |
# save and printprint the results of the test on the Ridge estimates | |
ridge_results = ttest_rel(unbiased_sigma_estimates, ridge_sigma_estimates) | |
print(f'Test Statistic for the Paired t-test between the True Model and Ridge: {round(ridge_results[0], 4)}') | |
print(f'p-value for the Paired t-test between the True Model and Ridge: {round(ridge_results[1], 4)}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment