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
Modifier and TypeFieldDescriptionprotected ArrayDeque<PointIndex<Point>>
protected DistanceFromModel<Model,
Point> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Computes the statistic error of the model to the data points.double
Returns the computed statistical error.void
init
(DistanceFromModel<Model, Point> modelError, ArrayDeque<PointIndex<Point>> allPoints) This is called once to provide access to internal data structures of the owner.void
prune()
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:StatisticalFit
This is called once to provide access to internal data structures of the owner.- Specified by:
init
in 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:StatisticalFit
Computes the statistic error of the model to the data points.- Specified by:
computeStatistics
in interfaceStatisticalFit<Model,
Point>
-
prune
public void prune()Description copied from interface:StatisticalFit
Prunes points based on the error and the computed statistics.- Specified by:
prune
in interfaceStatisticalFit<Model,
Point>
-
getErrorMetric
public double getErrorMetric()Description copied from interface:StatisticalFit
Returns the computed statistical error.- Specified by:
getErrorMetric
in interfaceStatisticalFit<Model,
Point> - Returns:
- The error.
-