Class SimpleChi2Var
java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.mhtvar.SimpleChi2Var
- All Implemented Interfaces:
MHTChi2Var<PamDataUnit>
,Cloneable
- Direct Known Subclasses:
BearingChi2
,CorrelationChi2
,IDIChi2
,LengthChi2
,PeakFrequencyChi2
,SimpleChi2VarDelta
,TimeDelayChi2Delta
Calculate the ICI value of amplitude.
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
calcChi2
(ArrayList<PamDataUnit> mhtDataUnits, IDIManager iciManager) Calculate the chi2 value for a particular variable from a list of data units in a track.void
clear()
Reset everything.clone()
Deep clone of the variable.double
getChi2()
Get the current chi2 value.abstract double
getDiffValue
(PamDataUnit pamDataUnit0, PamDataUnit pamDataUnit1) Get the difference in value between two sequential data units.double
getError()
Get the error value.abstract double
getErrValue
(PamDataUnit pamDataUnit0, PamDataUnit pamDataUnit1) Get the error value between two sequential data units.double
The minimum value of chi^2.Get the settings object for the variableGet the settings pane with controls to change MHTChi2Var settingsGet the chi2 variable params.boolean
isDataBlockCompatible
(PamDataBlock parentDataBlock) Check whether a data block is compatible with this type of data unit.void
setError
(double error) Set the error valuevoid
setSettingsObject
(Object object) Set the settings object for saving the parameters.void
setSimpleChiVarParams
(SimpleChi2VarParams simpleChiVarParams) Set the chi2 params for the chi2variable.double
updateChi2
(PamDataUnit newDataUnit, BitSet bitSet, int bitcount, int kcount, IDIManager iciManager) Update the existing chi2 value with a new data unit and track bitset.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface clickTrainDetector.clickTrainAlgorithms.mht.mhtvar.MHTChi2Var
getName, getUnits
-
Constructor Details
-
SimpleChi2Var
public SimpleChi2Var()
-
-
Method Details
-
calcChi2
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 interfaceMHTChi2Var<PamDataUnit>
- Parameters:
mhtDataUnits
- - a list of items in the trackiciManager
- - 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 interfaceMHTChi2Var<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
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
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 interfaceMHTChi2Var<PamDataUnit>
- Returns:
- the error
-
setError
public void setError(double error) Set the error value- Parameters:
error
- the error to set
-
getSettingsPane
Description copied from interface:MHTChi2Var
Get the settings pane with controls to change MHTChi2Var settings- Specified by:
getSettingsPane
in interfaceMHTChi2Var<PamDataUnit>
- Returns:
- the MHTChiVar specific settings pane.
-
setSimpleChiVarParams
Set the chi2 params for the chi2variable.- Parameters:
simpleChiVarParams
-
-
getSimpleChiVarParams
Get the chi2 variable params.- Returns:
- the chi2variable params.
-
getSettingsObject
Description copied from interface:MHTChi2Var
Get the settings object for the variable- Specified by:
getSettingsObject
in interfaceMHTChi2Var<PamDataUnit>
- Returns:
- the settings object.
-
setSettingsObject
Description copied from interface:MHTChi2Var
Set the settings object for saving the parameters. This is only used for saving params.- Specified by:
setSettingsObject
in interfaceMHTChi2Var<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 interfaceMHTChi2Var<PamDataUnit>
- Returns:
- the current chi2 value
-
clear
public void clear()Reset everything.- Specified by:
clear
in interfaceMHTChi2Var<PamDataUnit>
-
clone
Description copied from interface:MHTChi2Var
Deep clone of the variable.- Specified by:
clone
in interfaceMHTChi2Var<PamDataUnit>
- Returns:
- deep clone of the variable.
-
isDataBlockCompatible
Description copied from interface:MHTChi2Var
Check whether a data block is compatible with this type of data unit.- Specified by:
isDataBlockCompatible
in interfaceMHTChi2Var<PamDataUnit>
- Parameters:
parentDataBlock
- - the parent data block- Returns:
- true if the data block is allowed
-