-
-
Save yisongtao/7a7e14c3e0e0c15bc732befb78ca970c 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
importance(rf_df, type = 1) | |
# %IncMSE | |
#DirectorScore 30.64382 | |
#ActorScore 44.65084 | |
#MusicianScore 26.36350 | |
#Viewer 53.04153 | |
#Favorite 66.95043 | |
#Type 67.82751 | |
#Rating 49.92500 | |
rf_df | |
#Call: | |
# randomForest(formula = Score ~ DirectorScore + ActorScore + MusicianScore + Viewer + | |
# Favorite + Type + Rating, data = new_df, ntree = 500, mtry = 3, subset = train) | |
# Type of random forest: regression | |
# Number of trees: 500 | |
#No. of variables tried at each split: 3 | |
# | |
# Mean of squared residuals: 0.2776111 | |
# % Var explained: 63.99 | |
# RMSE of the prediction | |
Metrics::rmse(new_df$Score[-train], pred_test) | |
#[1] 0.5842004 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment