dsClassMerge
Merge classes in a dataset
Contents
Syntax
- DS2 = dsClassMerge(DS, equivClass)
Description
DS2=dsClassMerge(DS, equivClass) returns a new DS2 which merges classes in DS based on equivClass.
- DS: Original dataset
- equivClass: A cell vector specifying which output to be combined. For instance, {[1 3], [2 4]} specifies outputs 1 & 3 to be combined into new output 1, and outputs 2 & 4 to be combined into new output 2.
- DS2: New dataset with the combined outputs
Example
DS=prData('iris');
DS2=dsClassMerge(DS, {[1,3], [2]})
DS2 = struct with fields: dataName: 'iris' inputName: {'sepal length' 'sepal width' 'petal length' 'petal width'} outputName: {'Setosa & Virginica' 'Versicolour'} input: [4×150 double] output: [1×150 double]