powered by
create_MLCL randomly generates Must-Link (ML) and Cannot-Link (CL) constraints from a vector y of class labels.
create_MLCL
create_MLCL(y, nbConst)
A list with two components:
Matrix of ML constraints. Each row corresponds to a constraint.
Vector of class labels.
Number of constraints.
cecm
y<-sample(3,100,replace=TRUE) const<-create_MLCL(y,nbConst=10) const$ML const$CL
Run the code above in your browser using DataLab