Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Analyse Factorielle Multiple (AFM) avec FactoMineRsur la description sensorielle de vins
Fran?ois Husson
Chargement de FactoMineR
library(FactoMineR)data(wine)
L’AFM
res <- MFA(wine, group=c(2,5,3,10,9,2), type=c("n",rep("s",5)),ncp=5, name.group=c("orig","olf","vis","olfag","gust","ens"),num.group.sup=c(1,6))
1
−4 −2 0 2 4
02
46
Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
Saumur
BourgueuilChinon
ReferenceEnv1
Env2
Env4
olfvisolfaggust
!!!!!# R?sum? des r?sultats On peut obtenir un r?sum? des principaux r?sultats en utilisant la fonction summary.
summary(res)
Nous demandons ici ? avoir les r?sultats sur les 2 premi?res dimensions pour ?viter d’avoir des tableaux tropgrands (par d?faut, la fonction retourne les r?sultats des 3 premi?res dimensions).
summary(res, ncp=2)
#### Call:## MFA(base = wine, group = c(2, 5, 3, 10, 9, 2), type = c("n",## rep("s", 5)), ncp = 5, name.group = c("orig", "olf", "vis",## "olfag", "gust", "ens"), num.group.sup = c(1, 6))###### Eigenvalues
2
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5 Dim.6## Variance 3.462 1.367 0.615 0.372 0.270 0.202## % of var. 49.378 19.494 8.778 5.309 3.857 2.887## Cumulative % of var. 49.378 68.873 77.651 82.960 86.816 89.703## Dim.7 Dim.8 Dim.9 Dim.10 Dim.11 Dim.12## Variance 0.176 0.126 0.105 0.079 0.074 0.060## % of var. 2.506 1.796 1.502 1.124 1.054 0.861## Cumulative % of var. 92.209 94.005 95.506 96.630 97.684 98.545## Dim.13 Dim.14 Dim.15 Dim.16 Dim.17 Dim.18## Variance 0.029 0.022 0.019 0.011 0.009 0.006## % of var. 0.409 0.313 0.273 0.156 0.131 0.091## Cumulative % of var. 98.954 99.268 99.541 99.697 99.827 99.918## Dim.19 Dim.20## Variance 0.003 0.002## % of var. 0.047 0.035## Cumulative % of var. 99.965 100.000#### Groups## Dim.1 ctr cos2 Dim.2 ctr## olf | 0.782 22.591 0.380 | 0.620 45.346## vis | 0.855 24.688 0.728 | 0.040 2.937## olfag | 0.925 26.712 0.625 | 0.469 34.309## gust | 0.900 26.009 0.722 | 0.238 17.408## cos2## olf 0.239 |## vis 0.002 |## olfag 0.161 |## gust 0.050 |#### Supplementary groups## Dim.1 cos2 Dim.2 cos2## orig | 0.296 0.033 | 0.643 0.156 |## ens | 0.619 0.380 | 0.254 0.064 |#### Individuals (the 10 first)## Dim.1 ctr cos2 Dim.2 ctr## 2EL | 0.239 0.078 0.009 | -0.797 2.211## 1CHA | -2.045 5.751 0.257 | -1.383 6.667## 1FON | -1.220 2.048 0.187 | -0.459 0.734## 1VAU | -4.381 26.404 0.426 | 0.995 3.446## 1DAM | 2.696 9.996 0.462 | -0.120 0.050## 2BOU | 0.869 1.038 0.116 | -0.326 0.371## 1BOI | 1.553 3.318 0.294 | -0.280 0.272## 3EL | 0.129 0.023 0.001 | 0.789 2.167## DOM1 | -0.066 0.006 0.001 | -0.253 0.222## 1TUR | -1.202 1.987 0.184 | -0.375 0.489## cos2## 2EL 0.098 |## 1CHA 0.118 |## 1FON 0.026 |## 1VAU 0.022 |## 1DAM 0.001 |## 2BOU 0.016 |## 1BOI 0.010 |
3
## 3EL 0.052 |## DOM1 0.017 |## 1TUR 0.018 |#### Continuous variables (the 10 first)## Dim.1 ctr cos2 Dim.2 ctr## Odor.Intensity.before.shaking | 0.591 4.497 0.349 | 0.667 14.530## Aroma.quality.before.shaking | 0.835 8.989 0.698 | -0.075 0.186## Fruity.before.shaking | 0.716 6.606 0.513 | -0.151 0.741## Flower.before.shaking | 0.439 2.480 0.192 | -0.409 5.469## Spice.before.shaking | 0.038 0.019 0.001 | 0.865 24.420## Visual.intensity | 0.881 7.912 0.776 | 0.238 1.466## Nuance | 0.862 7.577 0.744 | 0.234 1.408## Surface.feeling | 0.950 9.198 0.903 | 0.049 0.063## Odor.Intensity | 0.627 2.416 0.393 | 0.576 5.155## Quality.of.odour | 0.791 3.844 0.626 | -0.410 2.612## cos2## Odor.Intensity.before.shaking 0.445 |## Aroma.quality.before.shaking 0.006 |## Fruity.before.shaking 0.023 |## Flower.before.shaking 0.168 |## Spice.before.shaking 0.748 |## Visual.intensity 0.057 |## Nuance 0.055 |## Surface.feeling 0.002 |## Odor.Intensity 0.331 |## Quality.of.odour 0.168 |#### Supplementary continuous variables## Dim.1 cos2 Dim.2 cos2## Overall.quality | 0.747 0.558 | -0.504 0.254 |## Typical | 0.766 0.586 | -0.466 0.217 |#### Supplementary categories## Dim.1 cos2 v.test Dim.2 cos2## Saumur | 0.533 0.483 1.343 | 0.350 0.209## Bourgueuil | -0.392 0.176 -0.596 | -0.504 0.291## Chinon | -0.877 0.537 -1.022 | -0.207 0.030## Reference | 1.437 0.823 2.442 | -0.567 0.128## Env1 | -0.949 0.614 -1.613 | -0.467 0.149## Env2 | -0.794 0.554 -1.067 | 0.191 0.032## Env4 | 0.277 0.008 0.216 | 3.141 0.971## v.test## Saumur 1.405 |## Bourgueuil -1.219 |## Chinon -0.384 |## Reference -1.534 |## Env1 -1.263 |## Env2 0.409 |## Env4 3.899 |
4
Graphe des individus et des modalit?s
plot(res)
−4 −2 0 2
−2
−1
01
23
4
Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
2EL
1CHA
1FON
1VAU
1DAM
2BOU1BOI
3EL
DOM11TUR
4EL PER1
2DAM1POY
1ING
1BEN2BEA
1ROC2ING
T1
T2
Saumur
Bourgueuil
ChinonReferenceEnv1
Env2
Env4
plot(res, invisible="quali")
5
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
2EL
1CHA
1FON
1VAU
1DAM2BOU
1BOI
3EL
DOM11TUR
4EL PER1
2DAM1POY1ING
1BEN2BEA
1ROC2ING
T1
T2
plot(res, invisible="quali", cex=0.8)
6
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
2EL
1CHA
1FON
1VAU
1DAM2BOU 1BOI
3EL
DOM11TUR
4EL PER1
2DAM
1POY1ING1BEN
2BEA
1ROC2ING
T1
T2
plot(res, invisible="quali", cex=0.8, partial=c("1VAU","PER1"))
7
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
2EL
1CHA
1FON
1VAU
1DAM2BOU 1BOI
3EL
DOM11TUR
4EL PER1
2DAM
1POY1ING1BEN
2BEA
1ROC
2ING
T1
T2
olfvisolfaggust
# Graphe des individus avec s?lection
plot(res, invisible="quali", cex=0.8, partial=c("1VAU","PER1"), select="cos2 0.4")
8
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2DAM2ING
T1
T2
olfvisolfaggust
plot(res, ,invisible="quali", partial="all",palette=palette(c("black","transparent","transparent","blue","transparent")))
9
−8 −6 −4 −2 0 2 4 6
−4
−2
02
46
Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
2EL 1CHA
1FON
1VAU
1DAM2BOU1BOI
3EL
DOM11TUR
4EL PER1
2DAM1POY1ING
1BEN2BEA
1ROC2ING
T1
T2
olfag
plot(res, invisible="quali", habillage=1, cex=0.8, select="cos2 0.4")
10
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2DAM2ING
T1
T2
SaumurBourgueuilChinon
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="cos2 0.4")
11
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2DAM2ING
T1
T2
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="contrib 5")
12
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2ING
T1
T2
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="contrib 5", unselect=0)
13
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2ING
T1
T2
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="contrib 5", unselect=1)
14
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2ING
T1
T2
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="contrib 5", unselect="grey70")
15
−4 −2 0 2
−2
−1
01
23
4Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
1VAU
1DAM
2ING
T1
T2
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select="contrib 5",unselect="grey70", axes=3:4)
16
−1.0 −0.5 0.0 0.5 1.0 1.5 2.0
−1.
5−
1.0
−0.
50.
00.
51.
0Individual factor map
Dim 3 (8.78%)
Dim
4 (
5.31
%)
1CHA
2BOU
3EL
2BEA
T1
ReferenceEnv1Env2Env4
plot(res, invisible="quali", habillage="Soil", cex=0.8, select=c("1VAU","PER1"),unselect="grey70", axes=3:4)
17
−1.0 −0.5 0.0 0.5 1.0 1.5 2.0
−1.
5−
1.0
−0.
50.
00.
51.
0Individual factor map
Dim 3 (8.78%)
Dim
4 (
5.31
%) 1VAU
PER1
ReferenceEnv1Env2Env4
# Graphe des variables
plot(res, choix="var")
18
−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5
−1.
0−
0.5
0.0
0.5
1.0
Correlation circle
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
olfvisolfaggustens Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensity
Aroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.qualityTypical
plot(res, choix="var", shadow=TRUE)
19
−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5
−1.
0−
0.5
0.0
0.5
1.0
Correlation circle
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
olfvisolfaggustens Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
Odor.Intensity.before.shaking
Aroma.quality.before.shakingFruity.before.shaking
Flower.before.shaking
Spice.before.shaking
Visual.intensityNuance
Surface.feeling
Odor.Intensity
Quality.of.odourFruity
Flower
SpicePlante
Phenolic
Aroma.intensityAroma.persistency
Aroma.quality
Attack.intensity
AcidityAstringency
Alcohol
BalanceSmooth
Bitterness
Intensity
Harmony
Overall.quality Typical
plot(res, choix="var", shadow=TRUE, select="contrib 5")
20
−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5
−1.
0−
0.5
0.0
0.5
1.0
Correlation circle
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
olfvisolfaggustens
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
Odor.Intensity.before.shaking
Aroma.quality.before.shaking
Spice.before.shaking
Visual.intensitySurface.feeling
plot(res, choix="var", shadow=TRUE, select="contrib 5", axes=3:4)
21
−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5
−1.
0−
0.5
0.0
0.5
1.0
Correlation circle
Dim 3 (8.78%)
Dim
4 (
5.31
%)
olfvisolfaggustens
Aroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlowerAroma.quality.before.shaking
Fruity.before.shaking
Flower.before.shaking
FruityFlower
# Graphe des axes partiels
res <- MFA(wine, group=c(2,5,3,10,9,2), type=c("n",rep("s",5)),ncp=3, name.group=c("orig","olf","vis","olfag","gust","ens"),num.group.sup=c(1,6))
22
−4 −2 0 2 4
02
46
Individual factor map
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
Saumur
BourgueuilChinon
ReferenceEnv1
Env2
Env4
olfvisolfaggust
!!!!!
plot(res, choix="axes")
23
−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5
−1.
0−
0.5
0.0
0.5
1.0
Partial axes
Dim 1 (49.38%)
Dim
2 (
19.4
9%)
Dim1.orig
Dim2.orig
Dim3.origDim1.olf
Dim2.olf
Dim3.olf Dim1.vis
Dim2.vis
Dim3.vis
Dim1.olfag
Dim2.olfag
Dim3.olfag Dim1.gust
Dim2.gust
Dim3.gust
Dim1.ens
Dim2.ens
origolfvisolfaggustens
# Description des dimensions
dimdesc(res)
## $Dim.1## $Dim.1$quanti## correlation p.value## Surface.feeling 0.9501131 4.605897e-11## Aroma.persistency 0.9298582 1.082737e-09## Intensity 0.9241930 2.214222e-09## Aroma.intensity 0.9183490 4.380472e-09## Harmony 0.9024824 2.221510e-08## Visual.intensity 0.8811873 1.331392e-07## Nuance 0.8623373 4.995733e-07## Attack.intensity 0.8439524 1.524322e-06## Aroma.quality.before.shaking 0.8352510 2.462507e-06## Smooth 0.8299677 3.251800e-06## Astringency 0.7966486 1.549124e-05
24
## Quality.of.odour 0.7909364 1.967655e-05## Alcohol 0.7792689 3.137694e-05## Balance 0.7740492 3.832036e-05## Typical 0.7656957 5.221396e-05## Aroma.quality 0.7484543 9.521647e-05## Overall.quality 0.7472814 9.901881e-05## Fruity 0.7333860 1.550774e-04## Fruity.before.shaking 0.7160259 2.618708e-04## Odor.Intensity 0.6270975 2.345881e-03## Odor.Intensity.before.shaking 0.5908036 4.800834e-03## Flower.before.shaking 0.4387181 4.664182e-02## Plante -0.5064137 1.915100e-02#### $Dim.1$category## Estimate p.value## Reference 1.444131 0.01043873###### $Dim.2## $Dim.2$quanti## correlation p.value## Spice.before.shaking 0.8650199 4.189450e-07## Spice 0.6910122 5.233277e-04## Odor.Intensity.before.shaking 0.6672378 9.524504e-04## Bitterness 0.6506434 1.404051e-03## Plante 0.6290859 2.249914e-03## Odor.Intensity 0.5755174 6.336628e-03## Astringency 0.4608480 3.550587e-02## Smooth -0.4372509 4.746573e-02## Typical -0.4655898 3.341665e-02## Overall.quality -0.5036281 1.993378e-02## Balance -0.5249698 1.454356e-02## Aroma.quality -0.5624494 7.951915e-03## Flower -0.5727974 6.648318e-03#### $Dim.2$quali## R2 p.value## Soil 0.8255815 1.127917e-06#### $Dim.2$category## Estimate p.value## Env4 2.566606 2.650535e-07###### $Dim.3## $Dim.3$quanti## correlation p.value## Flower.before.shaking 0.6373128 0.001887133## Flower 0.6364710 0.001921831## Fruity -0.4941180 0.022801235## Fruity.before.shaking -0.5374876 0.011976303
25