org.ddogleg.fitting.modelset
Class MeanModelFitter
- java.lang.Object
-
- org.ddogleg.fitting.modelset.MeanModelFitter
-
- All Implemented Interfaces:
- ModelFitter<double[],java.lang.Double>, ModelGenerator<double[],java.lang.Double>
public class MeanModelFitter extends java.lang.Object implements ModelFitter<double[],java.lang.Double>, ModelGenerator<double[],java.lang.Double>
Computes the mean of a set of points.
-
-
Constructor Summary
Constructors Constructor and Description MeanModelFitter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanfitModel(java.util.List<java.lang.Double> dataSet, double[] initParam, double[] foundParam)Fits a model to a set of points.booleangenerate(java.util.List<java.lang.Double> dataSet, double[] param)Creates a list of hypotheses from the set of sample points.intgetMinimumPoints()The minimum number of points required to fit a data set
-
-
-
Method Detail
-
generate
public boolean generate(java.util.List<java.lang.Double> dataSet, double[] param)Description copied from interface:ModelGeneratorCreates a list of hypotheses from the set of sample points.- Specified by:
generatein interfaceModelGenerator<double[],java.lang.Double>- Parameters:
dataSet- Set of sample points. Typically the minimum number possible.param- Storage for generated model.- Returns:
- true if a model was generated, otherwise false is none were
-
fitModel
public boolean fitModel(java.util.List<java.lang.Double> dataSet, double[] initParam, double[] foundParam)Description copied from interface:ModelFitterFits a model to a set of points. Note that initial and found can be the same instance.- Specified by:
fitModelin interfaceModelFitter<double[],java.lang.Double>- Parameters:
dataSet- Set of points the model is being fit to.initParam- Initial hypothesisfoundParam- The found model. Can be the same instance as initial.- Returns:
- true if a model was found and false if one was not.
-
getMinimumPoints
public int getMinimumPoints()
Description copied from interface:ModelGeneratorThe minimum number of points required to fit a data set- Specified by:
getMinimumPointsin interfaceModelGenerator<double[],java.lang.Double>- Returns:
- Number of points.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG