Class ContinuousLinearFitter

java.lang.Object
nz.org.riskscape.defaults.curves.ContinuousLinearFitter
All Implemented Interfaces:
CurveFitter<Double>, nz.org.riskscape.engine.Identified

public class ContinuousLinearFitter extends Object implements CurveFitter<Double>
  • Field Details

  • Constructor Details

    • ContinuousLinearFitter

      public ContinuousLinearFitter()
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface nz.org.riskscape.engine.Identified
    • getParameters

      public nz.org.riskscape.engine.bind.ParameterSet getParameters()
      Description copied from interface: CurveFitter

      The parameters for this fitter

      Specified by:
      getParameters in interface CurveFitter<Double>
    • bind

      public nz.org.riskscape.problem.ResultOrProblems<Double> bind(nz.org.riskscape.engine.bind.BindingContext context, Map<String,List<?>> unbound)
      Description copied from interface: CurveFitter

      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.

      Specified by:
      bind in interface CurveFitter<Double>
    • getBindingClass

      public Class<Double> getBindingClass()
      Description copied from interface: CurveFitter

      The type that bind returns and fit accepts.

      Specified by:
      getBindingClass in interface CurveFitter<Double>
    • fit

      public FitCurve<Double> fit(Double score, ObservedPoints points)
      Description copied from interface: CurveFitter

      Attempt to fit the given points to this curve/function, using the given start parameters.

      Specified by:
      fit in interface CurveFitter<Double>
    • getFunction

      public nz.org.riskscape.engine.function.UntypedFunction getFunction(double[] xsAndYs)