Interface CurveFitter<T>
- Record Components:
T
- the type of object returned from bind.TODO remove the generics from here as they help more than hinder. Collections of generic things like the curve fitter that have different types really upset Java's generics and results in a lot of raw types to make things compile. We can always add a TypeSafeCurveFitter base class to improve things
- All Superinterfaces:
nz.org.riskscape.engine.Identified
- All Known Implementing Classes:
ContinuousLinearFitter
,LinearFitter
,PowerLawFitter
Interface for some code that can fit a function to a set of 2d data points
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<T>
Bind any curve fitting parameters in to an object that is used for the fit function.static <T> double
computeRSquared
(FitCurve<T> curve) Compute the r2 value of aFitCurve
https://en.wikipedia.org/wiki/Coefficientofdeterminationfit
(T parameters, ObservedPoints points) Attempt to fit the given points to this curve/function, using the given start parameters.The type thatbind
returns andfit
accepts.nz.org.riskscape.engine.bind.ParameterSet
The parameters for this fitterMethods inherited from interface nz.org.riskscape.engine.Identified
getId, getIdentifiedClass
-
Method Details
-
computeRSquared
Compute the r2 value of a
FitCurve
https://en.wikipedia.org/wiki/Coefficientofdetermination -
getParameters
nz.org.riskscape.engine.bind.ParameterSet getParameters()The parameters for this fitter
-
bind
nz.org.riskscape.problem.ResultOrProblems<T> bind(nz.org.riskscape.engine.bind.BindingContext context, Map<String, List<?>> unbound) Bind any curve fitting parameters in to an object that is used for the fit function. This is done in this way (as opposed to passing in unbound to fit or even bound parameters) to allow each curve fitter to do any parameter binding and up-front computation once and then use this for many fits.
-
getBindingClass
The type that
bind
returns andfit
accepts. -
fit
Attempt to fit the given points to this curve/function, using the given start parameters.
-