create_MLCL: Random generation of Must-Link and Cannot-Link constraints

View source: R/create_MLCL.R

create_MLCLR 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


evclust documentation built on Nov. 9, 2023, 5:05 p.m.