Package org.hipparchus.fitting
Class SimpleCurveFitter
java.lang.Object
org.hipparchus.fitting.AbstractCurveFitter
org.hipparchus.fitting.SimpleCurveFitter
Fits points to a user-defined
function.-
Nested Class Summary
Nested classes/interfaces inherited from class org.hipparchus.fitting.AbstractCurveFitter
AbstractCurveFitter.TheoreticalValuesFunction -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleCurveFittercreate(ParametricUnivariateFunction f, double[] start) Creates a curve fitter.protected LeastSquaresProblemgetProblem(Collection<WeightedObservedPoint> observations) Creates a least squares problem corresponding to the appropriate curve.withMaxIterations(int newMaxIter) Configure the maximum number of iterations.withStartPoint(double[] newStart) Configure the start point (initial guess).Methods inherited from class org.hipparchus.fitting.AbstractCurveFitter
fit, getOptimizer
-
Method Details
-
create
Creates a curve fitter. The maximum number of iterations of the optimization algorithm is set toInteger.MAX_VALUE.- Parameters:
f- Function to fit.start- Initial guess for the parameters. Cannot benull. Its length must be consistent with the number of parameters of the function to fit.- Returns:
- a curve fitter.
- See Also:
-
withStartPoint
Configure the start point (initial guess).- Parameters:
newStart- new start point (initial guess)- Returns:
- a new instance.
-
withMaxIterations
Configure the maximum number of iterations.- Parameters:
newMaxIter- maximum number of iterations- Returns:
- a new instance.
-
getProblem
Creates a least squares problem corresponding to the appropriate curve.- Specified by:
getProblemin classAbstractCurveFitter- Parameters:
observations- Sample points.- Returns:
- the least squares problem to use for fitting the curve to the
given
points.
-