Class FitByMeanStatistics<Model,Point>
java.lang.Object
org.ddogleg.fitting.modelset.distance.FitByMeanStatistics<Model,Point>
- All Implemented Interfaces:
StatisticalFit<Model,Point>
Computes the mean error and prunes points based on the number of standard deviations they are away.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayDeque<PointIndex<Point>>protected DistanceFromModel<Model,Point> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidComputes the statistic error of the model to the data points.doubleReturns the computed statistical error.voidinit(DistanceFromModel<Model, Point> modelError, ArrayDeque<PointIndex<Point>> allPoints) This is called once to provide access to internal data structures of the owner.voidprune()Prunes points based on the error and the computed statistics.
-
Field Details
-
modelError
-
allPoints
-
-
Constructor Details
-
FitByMeanStatistics
public FitByMeanStatistics(double pruneThreshold) - Parameters:
pruneThreshold- Number of standard deviations away that points will be pruned.
-
-
Method Details
-
init
public void init(DistanceFromModel<Model, Point> modelError, ArrayDeque<PointIndex<Point>> allPoints) Description copied from interface:StatisticalFitThis is called once to provide access to internal data structures of the owner.- Specified by:
initin interfaceStatisticalFit<Model,Point> - Parameters:
modelError- Computes the error between a point and the modelallPoints- Contains all the points which are currently considered part of the model.
-
computeStatistics
public void computeStatistics()Description copied from interface:StatisticalFitComputes the statistic error of the model to the data points.- Specified by:
computeStatisticsin interfaceStatisticalFit<Model,Point>
-
prune
public void prune()Description copied from interface:StatisticalFitPrunes points based on the error and the computed statistics.- Specified by:
prunein interfaceStatisticalFit<Model,Point>
-
getErrorMetric
public double getErrorMetric()Description copied from interface:StatisticalFitReturns the computed statistical error.- Specified by:
getErrorMetricin interfaceStatisticalFit<Model,Point> - Returns:
- The error.
-