|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdataprocessing.DataSource
General purpose datafile interface. Handles all data manipulations.
Field Summary | |
java.lang.String |
filename
|
int |
numInputs
|
int |
trainingSize
|
Constructor Summary | |
DataSource(java.lang.String filename)
Constructor for a DataSource object. |
Method Summary | |
void |
addTargetNoise(double prob,
java.util.ArrayList data)
Adds noise to the target of the supplied ArrayList with probability prob. |
java.util.ArrayList |
getData()
Returns an ArrayList of Example objects, containing all data in this source. |
java.util.ArrayList |
getTestingData()
Returns an ArrayList of Example objects to use as testing data. |
java.util.ArrayList |
getTrainingData()
Returns an ArrayList of Example objects to use as training data. |
int |
numExamples()
Returns the total number of Examples available in this DataSource. |
void |
printData()
Prints out every Example in this DataSource. |
void |
shuffle()
Randomly shuffles this DataSource. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String filename
public int numInputs
public int trainingSize
Constructor Detail |
public DataSource(java.lang.String filename)
filename
- A string specifying a file from which to load some data.Method Detail |
public void addTargetNoise(double prob, java.util.ArrayList data)
prob
- The probability of class noise being added to each Example.data
- An ArrayList of Examples to apply the noise to.public java.util.ArrayList getData()
public java.util.ArrayList getTestingData()
public java.util.ArrayList getTrainingData()
public int numExamples()
public void printData()
public void shuffle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |