/** * used by {@link #getNumericalMean()} * * @return the mean of this distribution */ protected double calculateNumericalMean() { final double sh = getShape(); final double sc = getScale(); return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh))); }
/** * used by {@link #getNumericalVariance()} * * @return the variance of this distribution */ protected double calculateNumericalVariance() { final double sh = getShape(); final double sc = getScale(); final double mn = getNumericalMean(); return (sc * sc) * FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - (mn * mn); }
/** * used by {@link #getNumericalMean()} * * @return the mean of this distribution */ protected double calculateNumericalMean() { final double sh = getShape(); final double sc = getScale(); return sc * Math.exp(Gamma.logGamma(1 + (1 / sh))); }
/** * @param param * shape * @param param2 * scale * @return Weibull distribution */ WeibullDistribution getWeibullDistribution(double param, double param2) { if (weibull == null || weibull.getShape() != param || weibull.getScale() != param2) { weibull = new WeibullDistribution(param, param2); } return weibull; }
/** * used by {@link #getNumericalVariance()} * * @return the variance of this distribution */ protected double calculateNumericalVariance() { final double sh = getShape(); final double sc = getScale(); final double mn = getNumericalMean(); return (sc * sc) * Math.exp(Gamma.logGamma(1 + (2 / sh))) - (mn * mn); }
/** * used by {@link #getNumericalMean()} * * @return the mean of this distribution */ protected double calculateNumericalMean() { final double sh = getShape(); final double sc = getScale(); return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh))); }
/** * used by {@link #getNumericalVariance()} * * @return the variance of this distribution */ protected double calculateNumericalVariance() { final double sh = getShape(); final double sc = getScale(); final double mn = getNumericalMean(); return (sc * sc) * FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - (mn * mn); }
} else if (c == WeibullDistribution.class) { WeibullDistribution wb = (WeibullDistribution) d; j.writeNumberField("alpha", wb.getShape()); j.writeNumberField("beta", wb.getScale()); } else {
} else if (c == WeibullDistribution.class) { WeibullDistribution wb = (WeibullDistribution) d; j.writeNumberField("alpha", wb.getShape()); j.writeNumberField("beta", wb.getScale()); } else if (c == LogUniformDistribution.class){