Class MTClassifierTest

java.lang.Object
matchedTemplateClassifer.MTClassifierTest

public class MTClassifierTest extends Object
Test for the MTClassifier. Specifically testing comparisons to MATLAB to make sure all the maths is right.
Author:
Jamie Macaulay
  • 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

      public static void printFFt(ComplexArray complexArray)
    • printWaveform

      public static void printWaveform(double[] complexArray)
    • makeTestClick

      public static double[] makeTestClick()
      Create a test click.
      Returns:
      the test click
    • importClicks

      public static ArrayList<MatchTemplate> importClicks(String filePath, float sR)
      Import a bunch of clicks from a .mat file
    • importTemplates

      public static ArrayList<MatchTemplate> importTemplates(String filePath)
      Import a multiple templates. These are just waveforms and a sample rtae.
    • importTemplate

      public static ArrayList<MatchTemplate> importTemplate(String filePath)
      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

      public static void main(String[] args)