Package pulse.search.linear
Class GoldenSectionOptimiser
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.search.linear.LinearOptimiser
-
- pulse.search.linear.GoldenSectionOptimiser
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
public class GoldenSectionOptimiser extends LinearOptimiser
The golden-section search is a simple dichotomy search for finding the minimum of strictly unimodal functions by successively narrowing the domain of the search using the golden ratio partitioning.- See Also:
- Wikipedia page, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doublePHIThe golden section φ, which is approximately equal to 0.618033989.-
Fields inherited from class pulse.search.linear.LinearOptimiser
searchResolution
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GoldenSectionOptimisergetInstance()This class uses a singleton pattern, meaning there is only instance of this class.doublelinearStep(GeneralTask task)Letaandbbe the start and end point of aSegment, initially defined by thesuper.domain(IndexedVector,Vector)method.StringtoString()-
Methods inherited from class pulse.search.linear.LinearOptimiser
domain, getLinearResolution, listedKeywords, set, setLinearResolution
-
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 double linearStep(GeneralTask task) throws SolverException
Let
aandbbe the start and end point of aSegment, initially defined by thesuper.domain(IndexedVector,Vector)method. This method will start a loop, which at each step i will compare the values of the target function at the end points of aSegmentconstructed from one of the end points ai or bi and substituting the second end point with either or . This theoretically ensures the least number of steps to reach the minimum (as compared to the standard dichotomy methods).- Specified by:
linearStepin classLinearOptimiser- 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
-
toString
public String toString()
- Overrides:
toStringin classLinearOptimiser
-
getInstance
public static GoldenSectionOptimiser getInstance()
This class uses a singleton pattern, meaning there is only instance of this class.- Returns:
- the single (static) instance of this class
-
-