You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inst/tutorials/C01Lb_lda/C01Lb_lda.Rmd
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
4
4
description: "**SDD III** Exercices sur l'ADL"
5
5
tutorial:
6
6
id: "C01Lb_lda"
7
-
version: 1.0.0/5
7
+
version: 1.1.1/5
8
8
output:
9
9
learnr::tutorial:
10
10
progressive: true
@@ -28,8 +28,8 @@ n_learning <- round(n * 2/3)
28
28
set.seed(164)
29
29
learning <- sample(1:n, n_learning)
30
30
31
-
bio_test <- bio[ -learning, ]
32
-
bio_learn <- bio[ learning, ]
31
+
bio_test <- as.data.frame(bio[ -learning, ])
32
+
bio_learn <- as.data.frame(bio[ learning, ])
33
33
34
34
#bio_test <- slice(bio, -learning)
35
35
#bio_learn <- slice(bio, learning)
@@ -86,20 +86,20 @@ table(bio_test$gender)
86
86
Réalisez un modèle avec le set d'apprentissage. Prédisez la variable `gender` à l'aide des 3 variables numériques.
87
87
88
88
```{r lda1_h2, exercise = TRUE}
89
-
bio_lda <- mlLda(formula = ___ ~ ___, data = ___)
89
+
bio_lda <- mlLda(___ ~ ___, data = ___)
90
90
summary(bio_lda)
91
91
```
92
92
93
93
```{r lda1_h2-hint-1}
94
-
bio_lda <- mlLda(formula = ___ ~ ___, data = bio_learn)
94
+
bio_lda <- mlLda(___ ~ ___, data = bio_learn)
95
95
summary(bio_lda)
96
96
97
97
## Attention, le prochain indice est la solution ##
98
98
```
99
99
100
100
```{r lda1_h2-solution}
101
101
## Solution ##
102
-
bio_lda <- mlLda(formula = gender ~ ., data = bio_learn)
102
+
bio_lda <- mlLda(gender ~ ., data = bio_learn)
103
103
summary(bio_lda)
104
104
```
105
105
@@ -111,7 +111,7 @@ grade_code("Votre premier modèle est une réussite.")
111
111
112
112
## Performance de votre modèle.
113
113
114
-
Vous venez de créer votre outils de classification qui se nomme `bio_lda`. Vous devez maintenant tester les performances de votre modèle.
114
+
Vous venez de créer votre outils de classification qui se nomme `bio_lda`. Vous devez maintenant tester les performances de votre modèle. Ne vous trompez pas dans le jeu de données à utiliser `bio_learn` ou `bio_test`.
0 commit comments