Learn R Programming

ConsensusClustering (version 1.5.0)

generate_multiview: Multiview generation

Description

Multiview generation

Usage

generate_multiview(
  X,
  cluster.method = "pam",
  range.k = c(2, 5),
  sample.k.method = "random",
  rep = 10,
  distance.method = "euclidian",
  sample.set = NA,
  func
)

Value

matrix of clusterings Nsample x Nrepeat

Arguments

X

list of input data matrices of Sample x feature or distance matrices. The length of X is equal to Nviews

cluster.method

base clustering method: c("kmeans", "pam", "custom")

range.k

vector of minimum and maximum values for k c(min, max)

sample.k.method

method for the choice of k at each repeat c("random", "silhouette")

rep

number of repeats

distance.method

method for distance calculation: "euclidian", "maximum", "manhattan", "canberra", "binary", "minkowski".

sample.set

vector of samples the clustering is being applied on. can be names or indices. If sample.set is NA, it considers all the datasets have the same samples with the same order

func

user-definrd function required if cluster.method = "custom". The function needs two inputs of X and k.

Details

At each repeat, k is selected randomly or based on the best silhouette width from a discrete uniform distribution between range.k[1] and range.k[2]. Then clustering is applied and result is returned.

Examples

Run this code
data = multiview_clusters (n = c(40,40,40), hidden.dim = 2, observed.dim = c(2,2,2),
sd.max = .1, sd.noise = 0, hidden.r.range = c(.5,1))
X_observation = data[["observation"]]
Clusters = multiview_pam_gen(X_observation)

Run the code above in your browser using DataLab