Class LinearOptimiser
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.search.linear.LinearOptimiser
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
- Direct Known Subclasses:
GoldenSectionOptimiser,WolfeOptimiser
public abstract class LinearOptimiser extends PropertyHolder implements Reflexive
The most basicLinearSolverclass, which defines the notion of the linear resolution, defines the method signature for estimating the step of the linear search (i.e., the position of the minimum), and provides a simple algorithm to initialise the calculation domain.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static doublesearchResolution
-
Constructor Summary
Constructors Modifier Constructor Description protectedLinearOptimiser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Segmentdomain(ParameterVector x, Vector p)Sets the domain for this linear search onp.static NumericPropertygetLinearResolution()The linear resolution determines the minimum distance between any two points belonging to thedomainof this search while they still are considered separate.abstract doublelinearStep(GeneralTask task)Finds the minimum of the target function on thedomainSegment.Set<NumericPropertyKeyword>listedKeywords()TheLINEAR_RESOLUTIONis the single listed parameter for this class.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.static voidsetLinearResolution(NumericProperty searchError)StringtoString()-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, 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
-
-
-
-
Method Detail
-
linearStep
public abstract double linearStep(GeneralTask task) throws SolverException
Finds the minimum of the target function on thedomainSegment.- Parameters:
task- the target function is the sum of squared residuals (SSR) for thistask- Returns:
- a double, representing the step magnitude that needs to be
multiplied by the direction of the search determined previously using the
PathSolverto arrive at the next set of parameters corresponding to a lower SSR value of thistask - Throws:
SolverException
-
domain
public static Segment domain(ParameterVector x, Vector p)
Sets the domain for this linear search onp.The domain is defined as a
Segment[0; max], wheremaxdetermines the maximum magnitude of thelinearStep. This value is calculated initially asmax = 0.5*xi/pi, where i is the index of theDIFFUSIVITY NumericProperty. Later it is corrected to ensure that the change in theHEAT_LOSSNumericPropertyis less than unity.- Parameters:
x- the current set of parameterp- the result of the direction search with thePathSolver- Returns:
- a
Segmentdefining the domain of this search
-
getLinearResolution
public static NumericProperty getLinearResolution()
The linear resolution determines the minimum distance between any two points belonging to the
domainof this search while they still are considered separate. In case of a partitioning method, e.g. the golden-section search, this determines the partitioning limit. Note differentPathSolvers can have different sensitivities to the linear search and may require different linear resolutions to work effectively.- Returns:
- a
NumericPropertywith the current value of the linear resolution - See Also:
domain(IndexedVector,IndexedVector,Vector)
-
setLinearResolution
public static void setLinearResolution(NumericProperty searchError)
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
TheLINEAR_RESOLUTIONis the single listed parameter for this class.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder. - See Also:
NumericPropertyKeyword
-
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.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
-