Interface VariationParameter
-
- All Known Implementing Classes:
AbstractVariationParameter,KnobVariationParameter
public interface VariationParameterthe interface, which represents a parameter, which is varied by the fitting algorithm. It stores an offset to the original parameters. There is no method to set the actual value directly. This is because the actual value may be different for different models.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDelta()adds the delta-value to the parameter.voidaddValueScaled(double value)adds the given value to the parameter.java.lang.DoublegetActiveMeasurementAbsoluteValue()java.lang.DoublegetActiveMeasurementInitialValue()java.lang.DoublegetActiveMeasurementRelativeChange()doublegetActualOffset()doublegetDelta()get the delta, which is used by a Calculator to vary the parameter in order to calculate the differential quotient.doublegetError()doublegetInitialOffset()java.lang.StringgetKey()returns the key, for storage in an HashMapjava.lang.StringgetName()doublegetOffsetChange()doublegetSensitivity()doublegetUpdateFactor()voidreset()resets the actual value to the initial one.voidsetActualOffset(double actualOffset)set the actual offset to the initial valuevoidsetDelta(double delta)sets the deltavoidsetError(double error)set the error for the parameter from the last calculationvoidsetInitialOffset(double initialOffset)sets the initial valuevoidsetSensitivity(double sensitivity)The sensitivity of the parameter during the last fit-iteration.voidsetUpdateFactor(double factor)sets the factor which is applied when updating the data for this parameter.voidundo()reverts the actual value to the last one.
-
-
-
Method Detail
-
reset
void reset()
resets the actual value to the initial one.
-
undo
void undo()
reverts the actual value to the last one. this only works once!
-
getActualOffset
double getActualOffset()
- Returns:
- the actual value
-
setActualOffset
void setActualOffset(double actualOffset)
set the actual offset to the initial value- Parameters:
actualOffset- the value to set
-
getKey
java.lang.String getKey()
returns the key, for storage in an HashMap- Returns:
- the key for this parameter
-
getName
java.lang.String getName()
- Returns:
- the name
-
getInitialOffset
double getInitialOffset()
- Returns:
- the initial value for this parameter
-
getActiveMeasurementAbsoluteValue
java.lang.Double getActiveMeasurementAbsoluteValue()
- Returns:
- the total value for the actively selected measurement
-
getActiveMeasurementInitialValue
java.lang.Double getActiveMeasurementInitialValue()
-
getOffsetChange
double getOffsetChange()
-
getActiveMeasurementRelativeChange
java.lang.Double getActiveMeasurementRelativeChange()
-
setInitialOffset
void setInitialOffset(double initialOffset)
sets the initial value- Parameters:
initialOffset- the value to set
-
getDelta
double getDelta()
get the delta, which is used by a Calculator to vary the parameter in order to calculate the differential quotient.- Returns:
- the delta
-
setDelta
void setDelta(double delta)
sets the delta- Parameters:
delta- the new delta- See Also:
getDelta()
-
addValueScaled
void addValueScaled(double value)
adds the given value to the parameter. (may be scaled internally)- Parameters:
value- the value that shall be added
-
addDelta
void addDelta()
adds the delta-value to the parameter. This is used, when calculating the gradient. It has to be used together with undo().
-
setUpdateFactor
void setUpdateFactor(double factor)
sets the factor which is applied when updating the data for this parameter. A lower factor means slower convergence. a factor 1 means applying the whole calculated value.- Parameters:
factor-
-
getUpdateFactor
double getUpdateFactor()
- Returns:
- the update factor
-
setSensitivity
void setSensitivity(double sensitivity)
The sensitivity of the parameter during the last fit-iteration.- Parameters:
sensitivity- the sensitivity to set
-
getSensitivity
double getSensitivity()
- Returns:
- the sensitivity of the parameter
-
setError
void setError(double error)
set the error for the parameter from the last calculation- Parameters:
error- the error from the last calculation
-
getError
double getError()
- Returns:
- the error resulting from the last fit iteration
-
-