/** * Creates the folds from the given data by passing the data into the * set data partitioner multiple times. * * @param data The data to partition into multiple folds. * @return The folds of partitioned data. */ public ArrayList<PartitionedDataset<DataType>> createFolds( final Collection<? extends DataType> data) { // Create the result folds. ArrayList<PartitionedDataset<DataType>> folds = new ArrayList<PartitionedDataset<DataType>>(this.getNumFolds()); // Partition the data randomly to get each fold. for (int i = 0; i < this.getNumFolds(); i++) { folds.add(partitioner.createPartition(data)); } // Return the created folds. return folds; }
/** * Creates the folds from the given data by passing the data into the * set data partitioner multiple times. * * @param data The data to partition into multiple folds. * @return The folds of partitioned data. */ public ArrayList<PartitionedDataset<DataType>> createFolds( final Collection<? extends DataType> data) { // Create the result folds. ArrayList<PartitionedDataset<DataType>> folds = new ArrayList<PartitionedDataset<DataType>>(this.getNumFolds()); // Partition the data randomly to get each fold. for (int i = 0; i < this.getNumFolds(); i++) { folds.add(partitioner.createPartition(data)); } // Return the created folds. return folds; }
/** * Creates the folds from the given data by passing the data into the * set data partitioner multiple times. * * @param data The data to partition into multiple folds. * @return The folds of partitioned data. */ public ArrayList<PartitionedDataset<DataType>> createFolds( final Collection<? extends DataType> data) { // Create the result folds. ArrayList<PartitionedDataset<DataType>> folds = new ArrayList<PartitionedDataset<DataType>>(this.getNumFolds()); // Partition the data randomly to get each fold. for (int i = 0; i < this.getNumFolds(); i++) { folds.add(partitioner.createPartition(data)); } // Return the created folds. return folds; }