How to create a cluster plot in R?

前端 未结 2 1933
不知归路
不知归路 2020-12-23 08:47

How can I create a cluster plot in R without using clustplot?

I am trying to get to grips with some clustering (using R) and visualisation (using HTML5 Canvas).

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 09:10

    Here you can find one graph to analyze cluster results, "coordinate plot", within "clusplot" package.

    It is not based on PCA. It uses function scale to have all the variables means in a range of 0 to 1, so you can compare which cluster holds the max/min average for each variable.

    install.packages("devtools") ## To be able to download packages from github
    library(devtools)
    install_github("pablo14/clusplus")
    library(clusplus)
    
    ## Create k-means model with 3 clusters
    fit_mtcars=kmeans(mtcars,3)
    
    ## Call the function
    plot_clus_coord(fit_mtcars, mtcars)
    

    This post explains how to use it.

提交回复
热议问题