Skip to content

Conversation

@Noah0811
Copy link

Thank you for your work!!

Best!

Comment on lines +88 to +90
#accuracy rate
mean(M2$certified==M2$predict1)#21.9%
mean(M2$certified==M2$predict2)#53.6%

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants