org.ddogleg.fitting.modelset.distance
Class FitByMedianStatistics<Model,Point>
- java.lang.Object
-
- org.ddogleg.fitting.modelset.distance.FitByMedianStatistics<Model,Point>
-
- All Implemented Interfaces:
- StatisticalFit<Model,Point>
public class FitByMedianStatistics<Model,Point> extends java.lang.Object implements StatisticalFit<Model,Point>
Computes the median error and prunes points if they have more than the specified percentile error.
-
-
Constructor Summary
Constructors Constructor and Description FitByMedianStatistics(double pruneThreshold)Creates a new FitByMedianStatistics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcomputeStatistics()Computes the statistic error of the model to the data points.doublegetErrorMetric()Returns the computed statistical error.voidinit(DistanceFromModel<Model,Point> modelError, java.util.LinkedList<PointIndex<Point>> allPoints)This is called once to provide access to internal data structures of the owner.voidprune()Removes all samples which have an error larger than the specified percentile error.
-
-
-
Constructor Detail
-
FitByMedianStatistics
public FitByMedianStatistics(double pruneThreshold)
Creates a new FitByMedianStatistics.- Parameters:
pruneThreshold- Fraction of samples that are not pruned.
-
-
Method Detail
-
init
public void init(DistanceFromModel<Model,Point> modelError, java.util.LinkedList<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()
Removes all samples which have an error larger than the specified percentile error.- 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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG