Package whistleClassifier.training
Class TrainingDataSet
java.lang.Object
whistleClassifier.training.TrainingDataSet
- All Implemented Interfaces:
Serializable
,ManagedParameters
Training contours from a single file, each contour representing
one whistle.
For each species, several of these will probably be held in a TrainingDataGroup
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTrainingDataSet
(Class sourceDataClass, String species, float sampleRate, int fftLength, int ffthop) -
Method Summary
Modifier and TypeMethodDescriptionint
addContour
(double[] t, double[] f) int
addContour
(WhistleContour contour) int
int
int
This method was only added so that nContours would be included in the PamParameterSet when getParameterSet is calledint
Get the number of contours in the data set.int
getNumFragments
(WhistleFragmenter fragmenter, double minFreq, double maxFreq, int minContourLength) Get the number of fragments based on the fragment lengthGet a set of data that describes all of the parameters in a classfloat
getTrainingContour
(int iContour) Get a specific training contourlong
void
setFfthop
(int ffthop) void
setFftLength
(int fftLength) void
setSampleRate
(float sampleRate) void
setSpecies
(String species) void
setStorageSource
(String storageSource) toString()
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
TrainingDataSet
-
-
Method Details
-
toString
-
addContour
-
addContour
public int addContour(double[] t, double[] f) -
getSpecies
-
getTrainingTime
public long getTrainingTime() -
getSourceDataType
-
getTrainingContours
-
getTrainingContour
Get a specific training contour- Parameters:
iContour
- contour index- Returns:
- contour
-
setSpecies
-
getFftLength
public int getFftLength() -
setFftLength
public void setFftLength(int fftLength) -
getSampleRate
public float getSampleRate() -
setSampleRate
public void setSampleRate(float sampleRate) -
getFfthop
public int getFfthop() -
setFfthop
public void setFfthop(int ffthop) -
getNumContours
public int getNumContours()Get the number of contours in the data set.- Returns:
- number of contours.
-
getNContours
public int getNContours()This method was only added so that nContours would be included in the PamParameterSet when getParameterSet is called- Returns:
-
getNumFragments
public int getNumFragments(WhistleFragmenter fragmenter, double minFreq, double maxFreq, int minContourLength) Get the number of fragments based on the fragment length- Parameters:
fragLen
- length of each fragment- Returns:
- number of fragments.
-
getStorageSource
-
setStorageSource
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-