Description Usage Arguments Value See Also Examples
This function returns the clustering result and the plot of clusters based on the graph-based clustering method that introduced in Shi, Chen, Dong and Rao (2020).
1 |
data |
The input data must be a matrix, it's each column represents a cluster variable and this matrix must have names for rows and columns |
the clustering result
Hpath_covid, Distance.data_covid, path.kruskal_covid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(origin_data,package="GraphCpClust")
#Example 1
d=150
s.e=0.5
Data=NULL
for(i in 1:1) Data=rbind(Data,0+10*pnorm(-4+0.05*c(1:d))+rnorm(d,0,s.e))#
for(i in 1:10) Data=rbind(Data,c(rep(0,50),20*pnorm(-3+0.03*c(1:(d-50)))+rnorm(d-50,0,s.e)))
for(i in 1:15) Data=rbind(Data,c(rep(0,100),5*pnorm(-2+0.07*c(1:(d-100)))+rnorm(d-100,0,s.e)))
Data<-t(Data)
simulation_data = Data
colnames(simulation_data)<-c('v1','v2','v3','v4','v5','v6','v7','v8','v9','v10',
'v11','v12','v13','v14','v15','v16','v17','v18','v19','v20',
'v21','v22','v23','v24','v25','v26')
PathClust(simulation_data)
#Example 2
# The clustering example in Shi, Chen, Dong and Rao (2020)
PathClust(Data.new)
PathClust(Data.new_country)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.