|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.penguinwerks.jodene.ExampleSet
An example set is a set of examples. In addition to tracking the examples, the example set has the ability to create subsets of itself.
| Constructor Summary | |
ExampleSet()
|
|
| Method Summary | |
void |
addExample(Example example)
Adds an example to this example set. |
ExampleSet[] |
divideLinear(double[] pctSizes)
Same as dividLinear using integer sizes, except the sizes are expressed as percentages. |
ExampleSet[] |
divideLinear(int[] sizes)
Divides the example set into sub sets based on the sizes in the size array. |
ExampleSet[] |
divideRandom(double[] pctSizes)
Sames as divideRandom using integer sizes, except the sizes are expressed as percentages. |
ExampleSet[] |
divideRandom(int[] sizes)
Divide this data set (without modifying it) into two data sets. |
Example |
get(int index)
Returns the example at a given index. |
int |
getSize()
Returns the size of the example set. |
static ExampleSet |
makeExamples(java.util.List data,
java.util.List inputs,
java.util.List outputs)
A static factory function that builds an example set from data, and the list of input and output names. |
Example |
nextExample()
Returns the next example. |
ExampleSet |
shuffle()
Shuffle the examples so they appear in random order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExampleSet()
| Method Detail |
public void addExample(Example example)
example - A new example.public Example nextExample()
public Example get(int index)
index - The error at a given index.
public int getSize()
public static ExampleSet makeExamples(java.util.List data,
java.util.List inputs,
java.util.List outputs)
data - The name-value pairs.inputs - The list of input field names.outputs - The list of output field names.
public ExampleSet[] divideRandom(int[] sizes)
throws ExampleSetException
sizes
sizes - The array of sizes for the sub-sets.
ExampleSetException - Thrown if there is a problem with the sizes array.
public ExampleSet[] divideRandom(double[] pctSizes)
throws ExampleSetException
pctSizes - The percentage of the example set to choose.
ExampleSetException - Thrown if there is a problem with the percent sizes.
public ExampleSet[] divideLinear(int[] sizes)
throws ExampleSetException
sizes - An array of the sizes of the example sets.
ExampleSetException - Thrown if there is a problem with the sizes.
public ExampleSet[] divideLinear(double[] pctSizes)
throws ExampleSetException
pctSizes - The sizes expressed as percentages.
ExampleSetException - Thrown if there is a problem with the sizes.
public ExampleSet shuffle()
throws ExampleSetException
ExampleSetException - Thrown if there is a problem with the example set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||