Package whistleClassifier.training
Class TrainingSelector
java.lang.Object
whistleClassifier.training.TrainingSelector
- Direct Known Subclasses:
SequentialTrainingSelector
Class containing functions to randomly select suitable groups of
training and test data from a TrainingDataCollection
- Author:
- Doug Gillespie
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
abstract int
double[][]
getParameterArray
(int testTrainSet) Get a parameter array for feeding straight into the classifier for either the training set or the test set.int
getTotalFragments
(int iSpecies, double minFreq, double maxFreq, int minContourLength) get the training data collectionGet the whistle fragmentervoid
setTrainingDataCollection
(TrainingDataCollection trainingDataCollection) Sets the training data collectionvoid
setWhistleFragmenter
(WhistleFragmenter whistleFragmenter) Set the whistle fragmenter to use.
-
Constructor Details
-
TrainingSelector
public TrainingSelector()
-
-
Method Details
-
setTrainingDataCollection
Sets the training data collection- Parameters:
trainingDataCollection
- training data
-
getTrainingDataCollection
get the training data collection- Returns:
- training data collection
-
setWhistleFragmenter
Set the whistle fragmenter to use.- Parameters:
whistleFragmenter
- whistle fragmenter
-
getWhistleFragmenter
Get the whistle fragmenter- Returns:
- fragmenter
-
getNumSpecies
public int getNumSpecies()- Returns:
-
getNumTestSets
public abstract int getNumTestSets() -
getTotalFragments
public int getTotalFragments(int iSpecies, double minFreq, double maxFreq, int minContourLength) -
getParameterArray
public double[][] getParameterArray(int testTrainSet) Get a parameter array for feeding straight into the classifier for either the training set or the test set.- Parameters:
testTrainSet
- index o set: 0 = training; 1 - n = test.
-