Description Usage Arguments Details Author(s) See Also Examples

Plot method for class `fclust`

. The function creates a scatter plot visualizing the cluster structure. The objects are represented by points in the plot using observed variables or principal components.

1 2 3 |

`x` |
Object of class |

`v1v2` |
Vector with two elements specifying the numbers of the variables (or of the principal components) to be plotted (default: |

`colclus` |
Vector specifying the color palette for the clusters (default: |

`umin` |
Lowest maximal membership degree such that an object is assigned to a cluster (default: 0) |

`ucex` |
Logical value specifying if the points are magnified according to the maximal membership degree (if |

`pca` |
Logical value specifying if the objects are represented using principal components (if |

`...` |
Additional arguments arguments for |

In the scatter plot the objects are represented by circles (`pch=16`

) and the prototypes by stars (`pch=8`

) using observed variables (if `pca=FALSE`

) or principal components (if `pca=TRUE`

), the numbers of which are specified in `v1v2`

. Their colors differ for every cluster according to `colclus`

. Objects such that their maximal membership degrees are lower than `umin`

are in black. The sizes of the circles depends on the maximal membership degrees of the corresponding objects if `ucex=TRUE`

. Also note that principal components are extracted using standardized data.

Paolo Giordani, Maria Brigida Ferraro

`VIFCR`

, `VAT`

, `VCV`

, `VCV2`

, `Fclust`

, `print.fclust`

, `summary.fclust`

, `Mc`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
## McDonald's data
data(Mc)
names(Mc)
## data normalization by dividing the nutrition facts by the Serving Size (column 1)
for (j in 2:(ncol(Mc)-1))
Mc[,j]=Mc[,j]/Mc[,1]
## removing the column Serving Size
Mc=Mc[,-1]
## fuzzy k-means
## (excluded the factor column Type (last column))
clust=FKM(Mc[,1:(ncol(Mc)-1)],k=6,m=1.5,stand=1)
## Scatter plot of Calories vs Cholesterol (mg)
names(Mc)
plot(clust,v1v2=c(1,5))
## Scatter plot of Calories vs Cholesterol (mg) using gray levels for the clusters
plot(clust,v1v2=c(1,5),colclus=gray.colors(6))
## Scatter plot of Calories vs Cholesterol (mg)
## coloring in black objects with maximal membership degree lower than 0.5
plot(clust,v1v2=c(1,5),umin=0.5)
## Scatter plot of Calories vs Cholesterol (mg)
## coloring in black objects with maximal membership degree lower than 0.5
## and magnifying the points according to the maximal membership degree
plot(clust,v1v2=c(1,5),umin=0.5,ucex=TRUE)
## Scatter plot using the first two principal components and
## coloring in black objects with maximal membership degree lower than 0.3
plot(clust,v1v2=1:2,umin=0.3,pca=TRUE)
``` |

```
[1] "Serving Size" "Calories" "Total Fat (g)"
[4] "Saturated Fat (g)" "Trans Fat (g)" "Cholesterol (mg)"
[7] "Sodium (mg)" "Carbohydrates (g)" "Dietary Fiber (g)"
[10] "Sugars (g)" "Protein (g)" "Vitamin A (%DV)"
[13] "Vitamin C (%DV)" "Calcium (%DV)" "Iron (%DV)"
[16] "Type"
[1] "Calories" "Total Fat (g)" "Saturated Fat (g)"
[4] "Trans Fat (g)" "Cholesterol (mg)" "Sodium (mg)"
[7] "Carbohydrates (g)" "Dietary Fiber (g)" "Sugars (g)"
[10] "Protein (g)" "Vitamin A (%DV)" "Vitamin C (%DV)"
[13] "Calcium (%DV)" "Iron (%DV)" "Type"
```

fclust documentation built on March 21, 2018, 5:03 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.