|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectwhistleClassifier.training.TrainingSelector
public abstract class TrainingSelector
Class containing functions to randomly select suitable groups of training and test data from a TrainingDataCollection
TrainingDataCollection,
WhistleFragmenter| Field Summary | |
|---|---|
private TrainingDataCollection |
trainingDataCollection
|
private WhistleFragmenter |
whistleFragmenter
|
| Constructor Summary | |
|---|---|
TrainingSelector()
|
|
| Method Summary | |
|---|---|
(package private) abstract int[] |
createSections(int iSpecies,
double trainingFraction,
int sectionLength)
Tell the training selector to create a new (hopefully randomised) set of training and test data for a species. |
(package private) abstract FragmentStore |
getFragmentStore(boolean training,
int iFragmentGroup)
|
int |
getNumSpecies()
|
double[][] |
getParameterArray(boolean training)
|
(package private) abstract java.util.List<FragmentStore> |
getTestStoreList()
|
int |
getTotalFragments(int iSpecies)
|
(package private) abstract int |
getTotalSections(int iSpecies,
int sectionLength)
Get the total number of training + test sections, each consisting of sectionLength fragments |
TrainingDataCollection |
getTrainingDataCollection()
get the training data collection |
(package private) abstract java.util.List<FragmentStore> |
getTrainingStoreList()
|
WhistleFragmenter |
getWhistleFragmenter()
Get the whistle fragmenter |
void |
setTrainingDataCollection(TrainingDataCollection trainingDataCollection)
Sets the training data collection |
void |
setWhistleFragmenter(WhistleFragmenter whistleFragmenter)
Set the whistle fragmenter to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private TrainingDataCollection trainingDataCollection
private WhistleFragmenter whistleFragmenter
| Constructor Detail |
|---|
public TrainingSelector()
| Method Detail |
|---|
public void setTrainingDataCollection(TrainingDataCollection trainingDataCollection)
trainingDataCollection - training datapublic TrainingDataCollection getTrainingDataCollection()
public void setWhistleFragmenter(WhistleFragmenter whistleFragmenter)
whistleFragmenter - whistle fragmenterpublic WhistleFragmenter getWhistleFragmenter()
public int getNumSpecies()
public int getTotalFragments(int iSpecies)
abstract int getTotalSections(int iSpecies,
int sectionLength)
iSpecies - species index in training setsectionLength - length of each training or test section
abstract int[] createSections(int iSpecies,
double trainingFraction,
int sectionLength)
It does not actually have to create the data sets at the moment - if it want's to save memory it can set up appropriate data structures to define what the sets are and then create them when they are asked for later. Whether or not this is possible may depend on the type of randomisation and grouping employed in the concrete class.
trainingFraction - fraction of data to be used in training (usually 2/3)
abstract FragmentStore getFragmentStore(boolean training,
int iFragmentGroup)
public double[][] getParameterArray(boolean training)
abstract java.util.List<FragmentStore> getTestStoreList()
abstract java.util.List<FragmentStore> getTrainingStoreList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||