LBJ2.parse
Class FoldParser.SplitStrategy

java.lang.Object
  extended by LBJ2.parse.FoldParser.SplitStrategy
Enclosing class:
FoldParser

public static class FoldParser.SplitStrategy
extends java.lang.Object

Immutable type representing the way in which examples are partitioned into folds. When LBJ's self imposed restriction to use Java 1.4 is lifted, this class will be replaced by an enum.

The four implemented splitting strategies are described below. Note that in all cases except "Manual", the size of the folds are as equal as possible, with any extra examples allocated to earlier folds.

Sequential
The examples are simply partitioned into sequential folds.
kth
Every kth example is in the same fold.
Random
Examples are randomly assigned to folds.
Manual
Same as sequential, except fold boundaries are indicated by an appearance of the FoldSeparator in place of an example object.


Field Summary
private  int index
          Can be used to index the names array.
static FoldParser.SplitStrategy kth
          Represents the split strategy in which every kth example is part of the same fold.
static FoldParser.SplitStrategy manual
          Represents the split strategy in which the user manually inserts fold separation objects.
private static java.lang.String[] names
          The names of the different split strategies as strings.
static FoldParser.SplitStrategy random
          Represents the random split strategy.
static FoldParser.SplitStrategy sequential
          Represents the sequential split strategy.
 
Constructor Summary
private FoldParser.SplitStrategy(int i)
          Initializes the object with an index.
 
Method Summary
 java.lang.String getName()
          Retrieves the name of the strategy represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

public static final FoldParser.SplitStrategy random
Represents the random split strategy.


sequential

public static final FoldParser.SplitStrategy sequential
Represents the sequential split strategy.


kth

public static final FoldParser.SplitStrategy kth
Represents the split strategy in which every kth example is part of the same fold.


manual

public static final FoldParser.SplitStrategy manual
Represents the split strategy in which the user manually inserts fold separation objects.


names

private static final java.lang.String[] names
The names of the different split strategies as strings.


index

private int index
Can be used to index the names array.

Constructor Detail

FoldParser.SplitStrategy

private FoldParser.SplitStrategy(int i)
Initializes the object with an index.

Method Detail

getName

public java.lang.String getName()
Retrieves the name of the strategy represented by this object.