com.rapidminer.example.set
Class ShuffledPartitionBuilder
java.lang.Object
com.rapidminer.example.set.SimplePartitionBuilder
com.rapidminer.example.set.ShuffledPartitionBuilder
- All Implemented Interfaces:
- PartitionBuilder
public class ShuffledPartitionBuilder
- extends SimplePartitionBuilder
Creates a shuffled partition for an example set. This implementation traverses
the partition backwards, from the last element up to the second, repeatedly
swapping a randomly selected element into the "current position". Elements
are randomly selected from the portion of the list that runs from the first
element to the current position, inclusive.
- Author:
- Ingo Mierswa
|
Method Summary |
int[] |
createPartition(double[] ratio,
int size)
Returns a shuffled partition for an example set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShuffledPartitionBuilder
public ShuffledPartitionBuilder(boolean useLocalRandomSeed,
int seed)
createPartition
public int[] createPartition(double[] ratio,
int size)
- Returns a shuffled partition for an example set. Uses the partition
delivered by the superclass and shuffles the elements.
- Specified by:
createPartition in interface PartitionBuilder- Overrides:
createPartition in class SimplePartitionBuilder
Copyright © 2001-2009 by Rapid-I