public DataSet [ ] getDataSetsPerClass ( ) throws Exception { DataSet [ ] dataSetsPerClass = new DataSet [ this . getNrOfClasses ( ) ] ; // create a new data set for each class for ( int i = 0 ; i < dataSetsPerClass . length ; i ++ ) { dataSetsPerClass [ i ] = new DataSet ( this . nrOfDimensions ) ; } // fill the data sets for ( DataObject currentObject : dataList ) { dataSetsPerClass [ currentObject . getClassLabel ( ) ] . addObject ( currentObject ) ; } return dataSetsPerClass ; }
Separates the objects in this data set according to their class label