Class TrimmedEstimator<D extends Distribution>
- java.lang.Object
-
- elki.math.statistics.distribution.estimator.meta.TrimmedEstimator<D>
-
- Type Parameters:
D
- Distribution type
- All Implemented Interfaces:
DistributionEstimator<D>
public class TrimmedEstimator<D extends Distribution> extends java.lang.Object implements DistributionEstimator<D>
Trimmed wrapper around other estimators. Sorts the data, trims it, then analyzes it using another estimator.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private DistributionEstimator<D>
inner
Distribution estimator to use.private double
trim
Amount of data to trim.
-
Constructor Summary
Constructors Constructor Description TrimmedEstimator(DistributionEstimator<D> inner, double trim)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <A> D
estimate(A data, NumberArrayAdapter<?,A> adapter)
General form of the parameter estimationjava.lang.Class<? super D>
getDistributionClass()
Get the class that is produced by the estimator.static <A> double[]
toPrimitiveDoubleArray(A data, NumberArrayAdapter<?,A> adapter)
Local copy, see ArrayLikeUtil.toPrimitiveDoubleArray.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.math.statistics.distribution.estimator.DistributionEstimator
estimate
-
-
-
-
Field Detail
-
inner
private DistributionEstimator<D extends Distribution> inner
Distribution estimator to use.
-
trim
private double trim
Amount of data to trim.
-
-
Constructor Detail
-
TrimmedEstimator
public TrimmedEstimator(DistributionEstimator<D> inner, double trim)
Constructor.- Parameters:
inner
- Inner estimator.trim
- Trimming parameter.
-
-
Method Detail
-
estimate
public <A> D estimate(A data, NumberArrayAdapter<?,A> adapter)
Description copied from interface:DistributionEstimator
General form of the parameter estimation- Specified by:
estimate
in interfaceDistributionEstimator<D extends Distribution>
- Parameters:
data
- Data setadapter
- Number array adapter- Returns:
- Estimated distribution
-
toPrimitiveDoubleArray
public static <A> double[] toPrimitiveDoubleArray(A data, NumberArrayAdapter<?,A> adapter)
Local copy, see ArrayLikeUtil.toPrimitiveDoubleArray.- Parameters:
data
- Dataadapter
- Adapter- Returns:
- Copy of the data, as
double[]
-
getDistributionClass
public java.lang.Class<? super D> getDistributionClass()
Description copied from interface:DistributionEstimator
Get the class that is produced by the estimator.- Specified by:
getDistributionClass
in interfaceDistributionEstimator<D extends Distribution>
- Returns:
- Distribution class
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-