Package matchedTemplateClassifer
Class MTClassifierTest
java.lang.Object
matchedTemplateClassifer.MTClassifierTest
Test for the MTClassifier. Specifically testing comparisons to MATLAB to make
sure all the maths is right.
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayList<MatchTemplate>
importClicks
(String filePath, float sR) Import a bunch of clicks from a .mat filestatic ArrayList<MatchTemplate>
importTemplate
(String filePath) Import a bunch of clicks from a .mat filestatic ArrayList<MatchTemplate>
importTemplates
(String filePath) Import a multiple templates.static void
static double[]
Create a test click.static void
normalizeTest
(double[] wave) Test the normalisation of a wave.static void
printFFt
(ComplexArray complexArray) static void
printWaveform
(double[] complexArray) static List<MatchedTemplateResult>
testCorrelation
(double[] testWaveform, float sR, ArrayList<MatchTemplate> templates) Test the correlation of several templatesstatic List<MatchedTemplateResult>
testCorrelation
(double[] testWaveform, float sR, ArrayList<MatchTemplate> templates, int normalisation) Test the correlation of several templatesstatic void
Test the match corr algorithm by cross correlating a waveform with itself.static void
Test how the length of the waveform affects the match correlation valuesstatic void
TESTS
-
Constructor Details
-
MTClassifierTest
public MTClassifierTest()
-
-
Method Details
-
testCorrelation
public static List<MatchedTemplateResult> testCorrelation(double[] testWaveform, float sR, ArrayList<MatchTemplate> templates) Test the correlation of several templates- Parameters:
testWaveform
- - the waveform to correlate against.sR
- - the sample rate of the waveform.templates
- - the match templates to test.
-
testCorrelation
public static List<MatchedTemplateResult> testCorrelation(double[] testWaveform, float sR, ArrayList<MatchTemplate> templates, int normalisation) Test the correlation of several templates- Parameters:
testWaveform
- - the waveform to correlate against.sR
- - the sample rate of the waveform.templates
- - the match templates to test.normalisation
- - the normalisation type to use e.g. MatchedTemplateParams.NORMALIZATION_RMS- Returns:
- a list of the correlation results.
-
printFFt
-
printWaveform
public static void printWaveform(double[] complexArray) -
makeTestClick
public static double[] makeTestClick()Create a test click.- Returns:
- the test click
-
importClicks
Import a bunch of clicks from a .mat file -
importTemplates
Import a multiple templates. These are just waveforms and a sample rtae. -
importTemplate
Import a bunch of clicks from a .mat file -
normalizeTest
public static void normalizeTest(double[] wave) Test the normalisation of a wave. -
testMatchReject
public static void testMatchReject()TESTS -
testMatchCorrLen
public static void testMatchCorrLen()Test how the length of the waveform affects the match correlation values -
testMatchCorr
public static void testMatchCorr()Test the match corr algorithm by cross correlating a waveform with itself. -
main
-