Created
March 26, 2019 02:48
-
-
Save sgodfrey66/dce6a01deb7298b955f0d7cec6a6df87 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
# Run the model evaluator function to find the best models | |
# with between 1 and 13 features selecting from the features list | |
model_df = model_evaluator(X, y, features, 1, len(features)) | |
# Rearrange columns in the data frame | |
model_df = model_df[['features', 'model', 'no_features', 'intercept', 'coeff', 'R2', 'CV_R2']] | |
# Sort the resulting data frame to see the best feature sets | |
model_df.sort_values(by = 'CV_R2', ascending = False).head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment