create_MLCL {evclust}R Documentation

Random generation of Must-Link and Cannot-Link constraints

Description

create_MLCL randomly generates Must-Link (ML) and Cannot-Link (CL) constraints from a vector y of class labels.

Usage

create_MLCL(y, nbConst)

Arguments

y

Vector of class labels.

nbConst

Number of constraints.

Value

A list with two components:

ML

Matrix of ML constraints. Each row corresponds to a constraint.

CL

Matrix of ML constraints. Each row corresponds to a constraint.

See Also

cecm

Examples

y<-sample(3,100,replace=TRUE)
const<-create_MLCL(y,nbConst=10)
const$ML
const$CL


[Package evclust version 2.0.3 Index]