clusters_matrix: Generate a random binary matrix and label formed clusters.

Description Usage Arguments Value Examples

View source: R/clusters_matrix.R

Description

First generate a binary matrix of size NxN. p is a indicates how many 1 will be put on a matrix randomly. This will genrate cluters coneceted. cluster_matrix label this clusters.

Usage

1

Arguments

n

an integer object.

p

a float object, take values between 0 and 1.

Value

Returns a matrix of size NxN and probability of filling p. Generate clusters with different label.

Examples

1
2
3
4
n<-10
p<-0.5
data<- clusters_matrix(n,p)
data

FrankBaut/RandomClustering documentation built on Feb. 19, 2020, 2:07 a.m.