Class LinearBaseline
-
- All Implemented Interfaces:
Serializable,Optimisable,Descriptive,Reflexive
- Direct Known Subclasses:
SinusoidalBaseline
public class LinearBaseline extends AdjustableBaseline
A linearBaselinewhich specifies theinterceptandslopeparameters.The mathematical equivalent is the following expression:
g(x) = intercept + slope * x. TheNumericPropertyKeywordassociated with theinterceptandslopeparameters can be used as fitting variables.- See Also:
HeatingCurve,SearchTask,ParameterVector, Serialized Form
-
-
Field Summary
-
Fields inherited from class pulse.baseline.Baseline
MIN_BASELINE_POINTS
-
-
Constructor Summary
Constructors Constructor Description LinearBaseline()A primitive constructor, which initialises aCONSTANTbaseline with zero intercept and slope.LinearBaseline(double intercept, double slope)LinearBaseline(AdjustableBaseline baseline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(ParameterVector params)Assigns parameter values of thisProblemusing the optimisation vectorparams.Baselinecopy()protected voiddoFit(List<Double> x, List<Double> y)Calculates the baseline parameters based on input arguments.Set<NumericPropertyKeyword>listedKeywords()Lists theinterceptas accessible property for thisFlatBaseline.voidoptimisationVector(ParameterVector output)Calculates the vector argument defined on to the scalar objective function for thisOptimisable.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.StringtoString()-
Methods inherited from class pulse.baseline.AdjustableBaseline
getIntercept, getSlope, mean, setIntercept, setSlope, valueAt
-
Methods inherited from class pulse.baseline.Baseline
fitTo, fitTo, getDescriptor
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
LinearBaseline
public LinearBaseline()
A primitive constructor, which initialises aCONSTANTbaseline with zero intercept and slope.
-
LinearBaseline
public LinearBaseline(double intercept, double slope)
-
LinearBaseline
public LinearBaseline(AdjustableBaseline baseline)
-
-
Method Detail
-
doFit
protected void doFit(List<Double> x, List<Double> y)
Description copied from class:BaselineCalculates the baseline parameters based on input arguments.This usually runs a simple least-squares estimation of the parameters of this baseline using the specified
datawithin the time rangerangeMin < t < rangeMax. If no data is available, the method will NOT change the baseline parameters. Upon completion, the method will use the respectivesetmethods of this class to update the parameter values, triggering whatever events are associated with them.
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Overrides:
setin classAdjustableBaseline- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
optimisationVector
public void optimisationVector(ParameterVector output)
Description copied from interface:OptimisableCalculates the vector argument defined on to the scalar objective function for thisOptimisable.- Specified by:
optimisationVectorin interfaceOptimisable- Overrides:
optimisationVectorin classAdjustableBaseline- Parameters:
output- the output vector where the result will be stored
-
assign
public void assign(ParameterVector params)
Assigns parameter values of thisProblemusing the optimisation vectorparams. Only those parameters will be updated, the types of which are listed as indices in theparamsvector.- Specified by:
assignin interfaceOptimisable- Overrides:
assignin classAdjustableBaseline- Parameters:
params- the optimisation vector, containing a similar set of parameters to thisProblem- See Also:
PropertyHolder.listedTypes()
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Description copied from class:AdjustableBaselineLists theinterceptas accessible property for thisFlatBaseline.- Overrides:
listedKeywordsin classAdjustableBaseline- Returns:
- a set containing
BASELINE_INTERCEPTandBASELINE_SLOPEkeywords - See Also:
PropertyHolder
-
-