java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.mhtvar.SimpleChi2Var
All Implemented Interfaces:
MHTChi2Var<PamDataUnit>, Cloneable
Direct Known Subclasses:
BearingChi2, CorrelationChi2, IDIChi2, LengthChi2, PeakFrequencyChi2, SimpleChi2VarDelta, TimeDelayChi2Delta

public abstract class SimpleChi2Var extends Object implements MHTChi2Var<PamDataUnit>
Calculate the ICI value of amplitude.
Author:
Jamie Macaulay
  • Constructor Details

    • SimpleChi2Var

      public SimpleChi2Var()
  • Method Details

    • calcChi2

      public double calcChi2(ArrayList<PamDataUnit> mhtDataUnits, IDIManager iciManager)
      Description copied from interface: MHTChi2Var
      Calculate the chi2 value for a particular variable from a list of data units in a track.
      Specified by:
      calcChi2 in interface MHTChi2Var<PamDataUnit>
      Parameters:
      mhtDataUnits - - a list of items in the track
      iciManager - - class with the the times of the data series starting from data unit 0 at time 0 in seconds. The time series may be based on simply the millisecond time or a more accurate time using sample number and cross correlation.
      Returns:
      chi2 value.
    • updateChi2

      public double updateChi2(PamDataUnit newDataUnit, BitSet bitSet, int bitcount, int kcount, IDIManager iciManager)
      Description copied from interface: MHTChi2Var
      Update the existing chi2 value with a new data unit and track bitset.
      Specified by:
      updateChi2 in interface MHTChi2Var<PamDataUnit>
      Parameters:
      newDataUnit - - the new data unit.
      bitSet - - the bitset for the track.
      bitcount - - the number of detections in the track.
      kcount - - the current kcount, the total number of detections added to possibility mix.
      iciManager - - the IDI manager.
      Returns:
      the new chi^2 value
    • getDiffValue

      public abstract double getDiffValue(PamDataUnit pamDataUnit0, PamDataUnit pamDataUnit1)
      Get the difference in value between two sequential data units. This is top of the chi2 equation.
      Parameters:
      pamDataUnit0 - - the first data unit.
      pamDataUnit1 - - the second data unit.
      Returns:
      - the difference in selected variable between the two data units.
    • getErrValue

      public abstract double getErrValue(PamDataUnit pamDataUnit0, PamDataUnit pamDataUnit1)
      Get the error value between two sequential data units. This is denominator of the chi2 equation.
      Parameters:
      pamDataUnit0 - - the first data unit.
      pamDataUnit1 - - the second data unit.
      Returns:
      - the error between the difference
    • getMinCutValue

      public double getMinCutValue()
      The minimum value of chi^2. If chi^2 is below this vlaue then it is return as this value.
      Returns:
      the minimum value chi^" can be.
    • getError

      public double getError()
      Get the error value. This a percentage of whatever variable is
      Specified by:
      getError in interface MHTChi2Var<PamDataUnit>
      Returns:
      the error
    • setError

      public void setError(double error)
      Set the error value
      Parameters:
      error - the error to set
    • getSettingsPane

      public MHTVarSettingsPane<SimpleChi2VarParams> getSettingsPane()
      Description copied from interface: MHTChi2Var
      Get the settings pane with controls to change MHTChi2Var settings
      Specified by:
      getSettingsPane in interface MHTChi2Var<PamDataUnit>
      Returns:
      the MHTChiVar specific settings pane.
    • setSimpleChiVarParams

      public void setSimpleChiVarParams(SimpleChi2VarParams simpleChiVarParams)
      Set the chi2 params for the chi2variable.
      Parameters:
      simpleChiVarParams -
    • getSimpleChiVarParams

      public SimpleChi2VarParams getSimpleChiVarParams()
      Get the chi2 variable params.
      Returns:
      the chi2variable params.
    • getSettingsObject

      public Object getSettingsObject()
      Description copied from interface: MHTChi2Var
      Get the settings object for the variable
      Specified by:
      getSettingsObject in interface MHTChi2Var<PamDataUnit>
      Returns:
      the settings object.
    • setSettingsObject

      public void setSettingsObject(Object object)
      Description copied from interface: MHTChi2Var
      Set the settings object for saving the parameters. This is only used for saving params.
      Specified by:
      setSettingsObject in interface MHTChi2Var<PamDataUnit>
      Parameters:
      object - - the settings object.
    • getChi2

      public double getChi2()
      Get the current chi2 value. Note: this is the raw stored chi2 value without being divided by total number of data units. Only use for sub classes.
      Specified by:
      getChi2 in interface MHTChi2Var<PamDataUnit>
      Returns:
      the current chi2 value
    • clear

      public void clear()
      Reset everything.
      Specified by:
      clear in interface MHTChi2Var<PamDataUnit>
    • clone

      public SimpleChi2Var clone()
      Description copied from interface: MHTChi2Var
      Deep clone of the variable.
      Specified by:
      clone in interface MHTChi2Var<PamDataUnit>
      Returns:
      deep clone of the variable.
    • isDataBlockCompatible

      public boolean isDataBlockCompatible(PamDataBlock parentDataBlock)
      Description copied from interface: MHTChi2Var
      Check whether a data block is compatible with this type of data unit.
      Specified by:
      isDataBlockCompatible in interface MHTChi2Var<PamDataUnit>
      Parameters:
      parentDataBlock - - the parent data block
      Returns:
      true if the data block is allowed