Zhongyuan Zhang Assignment6#143
Open
Noah0811 wants to merge 1 commit intocore-methods-in-edm:masterfrom
Open
Conversation
lizarova777
reviewed
Nov 29, 2019
Comment on lines
+88
to
+90
| #accuracy rate | ||
| mean(M2$certified==M2$predict1)#21.9% | ||
| mean(M2$certified==M2$predict2)#53.6% |
There was a problem hiding this comment.
What does this imply about the pruned tree?
Comment on lines
+157
to
+159
| a mean difference of 0.216 in GPAO from model2's prediction | ||
|
|
||
| Therefore, model2 did a better job in prediction |
There was a problem hiding this comment.
What does this suggest about the second model's generalizability? Great job overall! Keep up the good work.
Comment on lines
+128
to
+143
| df_num<-data.frame(scale(df_num)) | ||
|
|
||
| pca <- prcomp(df_num, scale = TRUE) | ||
| #plot scree plot to decide how many pcs that could be used in the model | ||
| plot(pca,type="lines") | ||
|
|
||
| ``` | ||
|
|
||
| ```{R} | ||
| # according to the result, i decided to keep PC1,PC2 | ||
| pca1<-data.frame(pca[["x"]]) | ||
|
|
||
| dff<-cbind(df,pca1) | ||
|
|
||
|
|
||
| ### To Submit Your Assignment | ||
| model2<-rpart(GPAO~PC1+PC2,dff, method = "anova") |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your work!!
Best!