Commit d100000b authored by Ron Wehrens's avatar Ron Wehrens
Browse files

Merge branch 'master' of git.wageningenur.nl:warri004/r-big-data

parents 501d010b 6706c19d
...@@ -262,7 +262,12 @@ model ...@@ -262,7 +262,12 @@ model
```{r echo=TRUE} ```{r echo=TRUE}
pred <- predict(model, newdata = test) pred <- predict(model, newdata = test)
table(pred, test$taste) table(pred, test$taste)
(482 + 252 + 667) / nrow(test) ```
Accuracy:
```{r echo=FALSE}
a = as.data.frame(table(pred, test$taste))
(a$Freq[1] + a$Freq[5] + a$Freq[9]) / sum(a$Freq)
``` ```
## Excercise ## Excercise
...@@ -289,7 +294,7 @@ Create a machine learning report in R markdown: ...@@ -289,7 +294,7 @@ Create a machine learning report in R markdown:
- Create decision tree - Create decision tree
- Create random forest models - Create random forest models
- Report on the most accurate model - Report on the most accurate model
- Send me you report (sven.warris@wur.nl) - Send me your report (sven.warris@wur.nl)
## Round up ## Round up
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment