Class RLogSplineDistribution
- java.lang.Object
-
- org.apache.commons.math3.distribution.AbstractRealDistribution
-
- org.processmining.plugins.stochasticpetrinet.distribution.RLogSplineDistribution
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.commons.math3.distribution.RealDistribution
- Direct Known Subclasses:
RCensoredLogSplineDistribution
public class RLogSplineDistribution extends org.apache.commons.math3.distribution.AbstractRealDistributionLogspline density fitting to data using the logspline package in R.- Author:
- Andreas Rogge-Solti
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.rosuda.JRI.Rengineenginereference to the R engineprotected java.lang.StringmethodThe logspline method is used of the logspline package of Rprotected doublenumericalMeanprotected java.lang.StringrNamename of the spline in Rprotected doubleupperBoundprotected double[]values
-
Constructor Summary
Constructors Constructor Description RLogSplineDistribution()RLogSplineDistribution(double maxValue)RLogSplineDistribution(double maxValue, java.lang.String name)RLogSplineDistribution(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValues(double... values)doublecumulativeProbability(double x)doubledensity(double x)doublegetNumericalMean()Calculates the numerical mean under the plot function of the log-spline fit.doublegetNumericalVariance()doublegetSupportLowerBound()doublegetSupportUpperBound()java.lang.StringgetValsString()booleanisSupportConnected()booleanisSupportLowerBoundInclusive()booleanisSupportUpperBoundInclusive()doubleprobability(double x)doublesample()double[]sample(int sampleSize)
-
-
-
Field Detail
-
upperBound
protected double upperBound
-
rName
protected java.lang.String rName
name of the spline in R
-
engine
protected org.rosuda.JRI.Rengine engine
reference to the R engine
-
method
protected java.lang.String method
The logspline method is used of the logspline package of R
-
numericalMean
protected double numericalMean
-
values
protected double[] values
-
-
Constructor Detail
-
RLogSplineDistribution
public RLogSplineDistribution()
-
RLogSplineDistribution
public RLogSplineDistribution(double maxValue)
-
RLogSplineDistribution
public RLogSplineDistribution(java.lang.String name)
-
RLogSplineDistribution
public RLogSplineDistribution(double maxValue, java.lang.String name)
-
-
Method Detail
-
addValues
public void addValues(double... values) throws NonConvergenceException- Throws:
NonConvergenceException
-
getValsString
public java.lang.String getValsString()
-
probability
public double probability(double x)
- Specified by:
probabilityin interfaceorg.apache.commons.math3.distribution.RealDistribution- Overrides:
probabilityin classorg.apache.commons.math3.distribution.AbstractRealDistribution
-
density
public double density(double x)
-
cumulativeProbability
public double cumulativeProbability(double x)
-
getNumericalMean
public double getNumericalMean()
Calculates the numerical mean under the plot function of the log-spline fit. The upper bound for integration is the longest observed trace. Might return Double.NaN in the worst case.
-
getNumericalVariance
public double getNumericalVariance()
-
getSupportLowerBound
public double getSupportLowerBound()
-
getSupportUpperBound
public double getSupportUpperBound()
-
isSupportLowerBoundInclusive
public boolean isSupportLowerBoundInclusive()
-
isSupportUpperBoundInclusive
public boolean isSupportUpperBoundInclusive()
-
isSupportConnected
public boolean isSupportConnected()
-
sample
public double sample()
- Specified by:
samplein interfaceorg.apache.commons.math3.distribution.RealDistribution- Overrides:
samplein classorg.apache.commons.math3.distribution.AbstractRealDistribution
-
sample
public double[] sample(int sampleSize)
- Specified by:
samplein interfaceorg.apache.commons.math3.distribution.RealDistribution- Overrides:
samplein classorg.apache.commons.math3.distribution.AbstractRealDistribution
-
-