Package nz.org.riskscape.defaults.curves
Class DefaultFitCurve<T>
java.lang.Object
nz.org.riskscape.defaults.curves.DefaultFitCurve<T>
- All Implemented Interfaces:
FitCurve<T>
-
Constructor Summary
ConstructorDescriptionDefaultFitCurve
(CurveFitter<T> fitter, nz.org.riskscape.engine.function.UntypedFunction function, T fitParameters, ObservedPoints observedPoints, Function<DefaultFitCurve<T>, Double> scoringFunction) -
Method Summary
Modifier and TypeMethodDescriptiondouble
nz.org.riskscape.engine.function.UntypedFunction
-
Constructor Details
-
DefaultFitCurve
public DefaultFitCurve(CurveFitter<T> fitter, nz.org.riskscape.engine.function.UntypedFunction function, T fitParameters, ObservedPoints observedPoints, Function<DefaultFitCurve<T>, Double> scoringFunction)
-
-
Method Details
-
getFitScore
public double getFitScore()- Specified by:
getFitScore
in interfaceFitCurve<T>
- Returns:
- an
r²
value for this curve against the original data points
-
getFitter
-
getFunction
public nz.org.riskscape.engine.function.UntypedFunction getFunction()- Specified by:
getFunction
in interfaceFitCurve<T>
- Returns:
- the untyped part of a
RiskscapeFunction
that can be used to computef(x) = y
, should accept and return doubles.
-
getFitParameters
- Specified by:
getFitParameters
in interfaceFitCurve<T>
- Returns:
- the parameters, specific to each type of function, that were produced when this function was fit
-
getObservedPoints
- Specified by:
getObservedPoints
in interfaceFitCurve<T>
- Returns:
- that dataset that was used to fit this curve
-