MATLAB File Help: prtDataSetClass/retainClasses
prtDataSetClass/retainClasses
  retainClasses retain observations corresponding to specified
  classes
 
    subDataSet = dataSet.retainClasses(classes) returns a
    data set subDataSet containing only the observations that
    have targets equal to the specied values
 
    classes can be specified as an array of class values,
    or as a cell array of strings containing the class names.
 
    ds = prtDataGenIris;
    ds12 = ds.retainClasses([1:2]);
 
    ds12_v2 = ds.retainClasses({'Iris-setosa','Iris-versicolor'});

Help for prtDataSetClass/retainClasses is inherited from superclass prtDataInterfaceCategoricalTargets
Method Details
Defining Class prtDataInterfaceCategoricalTargets
Access public
Sealed false
Static false