jbnc.util
Class CVGenerator
java.lang.Object
jbnc.util.CVGenerator
- public class CVGenerator
- extends java.lang.Object
Generates cross validation data sets. For a given dataset it will generate
the same sequence of cross validation sets. The squence can be modified
using methods setSeed() and randomize().
- Since:
- June 1, 1999
- Author:
- Jarek Sacha
Field Summary |
protected java.util.ArrayList |
caseList
|
protected java.util.Random |
random
|
Method Summary |
void |
generateSets(int cvFolds,
java.util.Vector[] trainSets,
java.util.Vector[] testSets)
|
void |
randomize()
Set the internal random number generator to a "random" seed based on
current time. |
void |
setCases(java.util.Vector cases)
Sets the Cases attribute of the CVGenerator object |
void |
setSeed(long seed)
Sets the seed of random number generator used for creation of cross
validation sets. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
protected java.util.Random random
caseList
protected java.util.ArrayList caseList
CVGenerator
public CVGenerator()
setCases
public void setCases(java.util.Vector cases)
- Sets the Cases attribute of the CVGenerator object
- Parameters:
cases
- The new Cases value
setSeed
public void setSeed(long seed)
- Sets the seed of random number generator used for creation of cross
validation sets.
- Parameters:
seed
- the initial seed.
generateSets
public void generateSets(int cvFolds,
java.util.Vector[] trainSets,
java.util.Vector[] testSets)
- Parameters:
cvFolds
- trainSets
- testSets
-
randomize
public void randomize()
- Set the internal random number generator to a "random" seed based on
current time.