| Package | Description |
|---|---|
| org.apache.commons.math4.analysis |
Parent package for common numerical analysis procedures, including root finding,
function interpolation and integration.
|
| org.apache.commons.math4.analysis.function |
The
function package contains function objects that wrap the
methods contained in Math, as well as common
mathematical functions such as the gaussian and sinc functions. |
| org.apache.commons.math4.analysis.integration |
Numerical integration (quadrature) algorithms for univariate real functions.
|
| org.apache.commons.math4.analysis.integration.gauss |
Gauss family of quadrature schemes.
|
| org.apache.commons.math4.analysis.solvers |
Root finding algorithms, for univariate real functions.
|
| org.apache.commons.math4.distribution |
Implementations of common discrete and continuous distributions.
|
| org.apache.commons.math4.distribution.fitting |
Fitting of parameters against distributions.
|
| org.apache.commons.math4.genetics |
This package provides Genetic Algorithms components and implementations.
|
| org.apache.commons.math4.linear |
Linear algebra support.
|
| org.apache.commons.math4.optim.nonlinear.scalar |
Algorithms for optimizing a scalar function.
|
| org.apache.commons.math4.optim.nonlinear.scalar.noderiv |
This package provides optimization algorithms that do not require derivatives.
|
| org.apache.commons.math4.random |
Random Data Generation
|
| org.apache.commons.math4.stat.correlation |
Correlations/Covariance computations.
|
| org.apache.commons.math4.stat.inference |
Classes providing hypothesis testing.
|
| org.apache.commons.math4.stat.interval |
Classes providing binomial proportion confidence interval construction.
|
| org.apache.commons.math4.transform |
Implementations of transform methods, including Fast Fourier transforms.
|
| org.apache.commons.math4.util |
Convenience routines and common data structures used throughout the commons-math library.
|
| Modifier and Type | Method | Description |
|---|---|---|
static double[] |
FunctionUtils.sample(UnivariateFunction f,
double min,
double max,
int n) |
Samples the specified univariate real function on the specified interval.
|
| Modifier and Type | Method | Description |
|---|---|---|
double[] |
Gaussian.Parametric.gradient(double x,
double... param) |
Computes the value of the gradient at
x. |
double[] |
Logistic.Parametric.gradient(double x,
double... param) |
Computes the value of the gradient at
x. |
double |
Gaussian.Parametric.value(double x,
double... param) |
Computes the value of the Gaussian at
x. |
double |
Logistic.Parametric.value(double x,
double... param) |
Computes the value of the sigmoid at
x. |
| Constructor | Description |
|---|---|
Gaussian(double mean,
double sigma) |
Normalized gaussian with given mean and standard deviation.
|
Gaussian(double norm,
double mean,
double sigma) |
Gaussian with given normalization factor, mean and standard deviation.
|
Logistic(double k,
double m,
double b,
double q,
double a,
double n) |
| Constructor | Description |
|---|---|
BaseAbstractUnivariateIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Construct an integrator with given accuracies and iteration counts.
|
BaseAbstractUnivariateIntegrator(int minimalIterationCount,
int maximalIterationCount) |
Construct an integrator with given iteration counts.
|
IterativeLegendreGaussIntegrator(int n,
double relativeAccuracy,
double absoluteAccuracy) |
Builds an integrator with given accuracies.
|
IterativeLegendreGaussIntegrator(int n,
double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Builds an integrator with given accuracies and iterations counts.
|
IterativeLegendreGaussIntegrator(int n,
int minimalIterationCount,
int maximalIterationCount) |
Builds an integrator with given iteration counts.
|
MidPointIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Build a midpoint integrator with given accuracies and iterations counts.
|
MidPointIntegrator(int minimalIterationCount,
int maximalIterationCount) |
Build a midpoint integrator with given iteration counts.
|
RombergIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Build a Romberg integrator with given accuracies and iterations counts.
|
RombergIntegrator(int minimalIterationCount,
int maximalIterationCount) |
Build a Romberg integrator with given iteration counts.
|
SimpsonIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Build a Simpson integrator with given accuracies and iterations counts.
|
SimpsonIntegrator(int minimalIterationCount,
int maximalIterationCount) |
Build a Simpson integrator with given iteration counts.
|
TrapezoidIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount) |
Build a trapezoid integrator with given accuracies and iterations counts.
|
TrapezoidIntegrator(int minimalIterationCount,
int maximalIterationCount) |
Build a trapezoid integrator with given iteration counts.
|
| Modifier and Type | Method | Description |
|---|---|---|
Pair<double[],double[]> |
BaseRuleFactory.getRule(int numberOfPoints) |
Gets a copy of the quadrature rule with the given number of integration
points.
|
GaussIntegrator |
GaussIntegratorFactory.legendre(int numberOfPoints,
double lowerBound,
double upperBound) |
Creates a Gauss-Legendre integrator of the given order.
|
GaussIntegrator |
GaussIntegratorFactory.legendreHighPrecision(int numberOfPoints) |
Creates a Gauss-Legendre integrator of the given order.
|
GaussIntegrator |
GaussIntegratorFactory.legendreHighPrecision(int numberOfPoints,
double lowerBound,
double upperBound) |
Creates an integrator of the given order, and whose call to the
integrate method will perform an integration on the given interval. |
| Modifier and Type | Method | Description |
|---|---|---|
static double[] |
UnivariateSolverUtils.bracket(UnivariateFunction function,
double initial,
double lowerBound,
double upperBound) |
This method simply calls
bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)
with q and r set to 1.0 and maximumIterations set to Integer.MAX_VALUE. |
static double[] |
UnivariateSolverUtils.bracket(UnivariateFunction function,
double initial,
double lowerBound,
double upperBound,
int maximumIterations) |
This method simply calls
bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)
with q and r set to 1.0. |
| Modifier and Type | Method | Description |
|---|---|---|
Object[] |
EnumeratedDistribution.Sampler.sample(int sampleSize) |
Generates a random sample from the distribution.
|
T[] |
EnumeratedDistribution.Sampler.sample(int sampleSize,
T[] array) |
Generates a random sample from the distribution.
|
| Constructor | Description |
|---|---|
ExponentialDistribution(double mean,
double inverseCumAccuracy) |
Creates a distribution.
|
FDistribution(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom) |
Creates a using the given degrees of freedom.
|
FDistribution(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom,
double inverseCumAccuracy) |
Creates a distribution.
|
GammaDistribution(double shape,
double scale) |
Creates a distribution.
|
GammaDistribution(double shape,
double scale,
double inverseCumAccuracy) |
Creates a distribution.
|
HypergeometricDistribution(int populationSize,
int numberOfSuccesses,
int sampleSize) |
Creates a new hypergeometric distribution.
|
LogNormalDistribution(double scale,
double shape) |
Creates a log-normal distribution.
|
LogNormalDistribution(double scale,
double shape,
double inverseCumAccuracy) |
Creates a log-normal distribution.
|
NormalDistribution(double mean,
double sd) |
Creates a distribution.
|
NormalDistribution(double mean,
double sd,
double inverseCumAccuracy) |
Creates a distribution.
|
ParetoDistribution(double scale,
double shape) |
Creates a Pareto distribution.
|
ParetoDistribution(double scale,
double shape,
double inverseCumAccuracy) |
Creates a Pareto distribution.
|
PascalDistribution(int r,
double p) |
Create a Pascal distribution with the given number of successes and
probability of success.
|
PoissonDistribution(double p) |
Creates a new Poisson distribution with specified mean.
|
PoissonDistribution(double p,
double epsilon) |
Creates a new Poisson distribution with the specified mean and
convergence criterion.
|
PoissonDistribution(double p,
double epsilon,
int maxIterations) |
Creates a new Poisson distribution with specified mean, convergence
criterion and maximum number of iterations.
|
TDistribution(double degreesOfFreedom) |
Creates a distribution.
|
TDistribution(double degreesOfFreedom,
double inverseCumAccuracy) |
Creates a distribution.
|
WeibullDistribution(double alpha,
double beta) |
Creates a distribution.
|
WeibullDistribution(double alpha,
double beta,
double inverseCumAccuracy) |
Creates a distribution.
|
ZipfDistribution(int numberOfElements,
double exponent) |
Creates a distribution.
|
| Modifier and Type | Method | Description |
|---|---|---|
static MixtureMultivariateNormalDistribution |
MultivariateNormalMixtureExpectationMaximization.estimate(double[][] data,
int numComponents) |
Helper method to create a multivariate normal mixture model which can be
used to initialize
MultivariateNormalMixtureExpectationMaximization.fit(MixtureMultivariateNormalDistribution). |
void |
MultivariateNormalMixtureExpectationMaximization.fit(MixtureMultivariateNormalDistribution initialMixture) |
Fit a mixture model to the data supplied to the constructor.
|
void |
MultivariateNormalMixtureExpectationMaximization.fit(MixtureMultivariateNormalDistribution initialMixture,
int maxIterations,
double threshold) |
Fit a mixture model to the data supplied to the constructor.
|
| Constructor | Description |
|---|---|
MultivariateNormalMixtureExpectationMaximization(double[][] data) |
Creates an object to fit a multivariate normal mixture model to data.
|
| Constructor | Description |
|---|---|
NPointCrossover(int crossoverPoints) |
Creates a new
NPointCrossover policy using the given number of points. |
| Modifier and Type | Method | Description |
|---|---|---|
abstract FieldMatrix<T> |
AbstractFieldMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> of the same type as the instance with
the supplied row and column dimensions. |
abstract RealMatrix |
AbstractRealMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
FieldMatrix<T> |
Array2DRowFieldMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> of the same type as the instance with
the supplied row and column dimensions. |
RealMatrix |
Array2DRowRealMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
FieldMatrix<T> |
BlockFieldMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> of the same type as the instance with
the supplied row and column dimensions. |
BlockRealMatrix |
BlockRealMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
RealMatrix |
DiagonalMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
FieldMatrix<T> |
FieldMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> of the same type as the instance with
the supplied row and column dimensions. |
OpenMapRealMatrix |
OpenMapRealMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
RealMatrix |
RealMatrix.createMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
| Constructor | Description |
|---|---|
AbstractFieldMatrix(Field<T> field,
int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> with the supplied row and column dimensions. |
AbstractRealMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix with the supplied row and column dimensions.
|
Array2DRowFieldMatrix(Field<T> field,
int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> with the supplied row and column dimensions. |
Array2DRowRealMatrix(int rowDimension,
int columnDimension) |
Create a new RealMatrix with the supplied row and column dimensions.
|
BlockFieldMatrix(int rows,
int columns,
T[][] blockData,
boolean copyArray) |
Create a new dense matrix copying entries from block layout data.
|
BlockFieldMatrix(Field<T> field,
int rows,
int columns) |
Create a new matrix with the supplied row and column dimensions.
|
BlockRealMatrix(double[][] rawData) |
Create a new dense matrix copying entries from raw layout data.
|
BlockRealMatrix(int rows,
int columns) |
Create a new matrix with the supplied row and column dimensions.
|
BlockRealMatrix(int rows,
int columns,
double[][] blockData,
boolean copyArray) |
Create a new dense matrix copying entries from block layout data.
|
DiagonalMatrix(int dimension) |
Creates a matrix with the supplied dimension.
|
OpenMapRealMatrix(int rowDimension,
int columnDimension) |
Build a sparse matrix with the supplied row and column dimensions.
|
| Constructor | Description |
|---|---|
MultiStartMultivariateOptimizer(MultivariateOptimizer optimizer,
int starts,
RandomVectorGenerator generator) |
Create a multi-start optimizer from a single-start optimizer.
|
| Constructor | Description |
|---|---|
PopulationSize(int size) |
| Constructor | Description |
|---|---|
SobolSequenceGenerator(int dimension,
InputStream is) |
Construct a new Sobol sequence generator for the given space dimension with
direction vectors loaded from the given stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected RealMatrix |
Covariance.computeCovarianceMatrix(double[][] data) |
Create a covariance matrix from a rectangular array whose columns represent
covariates.
|
protected RealMatrix |
Covariance.computeCovarianceMatrix(double[][] data,
boolean biasCorrected) |
Compute a covariance matrix from a rectangular array whose columns represent
covariates.
|
| Constructor | Description |
|---|---|
Covariance(double[][] data) |
Create a Covariance matrix from a rectangular array
whose columns represent covariates.
|
Covariance(double[][] data,
boolean biasCorrected) |
Create a Covariance matrix from a rectangular array
whose columns represent covariates.
|
| Modifier and Type | Method | Description |
|---|---|---|
double |
ChiSquareTest.chiSquare(double[] expected,
long[] observed) |
|
static double |
InferenceTestUtils.chiSquare(double[] expected,
long[] observed) |
|
double |
ChiSquareTest.chiSquareTest(double[] expected,
long[] observed) |
Returns the observed significance level, or
p-value, associated with a
Chi-square goodness of fit test comparing the
observed
frequency counts to those in the expected array. |
boolean |
ChiSquareTest.chiSquareTest(double[] expected,
long[] observed,
double alpha) |
Performs a
Chi-square goodness of fit test evaluating the null hypothesis that the
observed counts conform to the frequency distribution described by the expected
counts, with significance level
alpha. |
static double |
InferenceTestUtils.chiSquareTest(double[] expected,
long[] observed) |
|
static boolean |
InferenceTestUtils.chiSquareTest(double[] expected,
long[] observed,
double alpha) |
|
double |
GTest.g(double[] expected,
long[] observed) |
|
static double |
InferenceTestUtils.g(double[] expected,
long[] observed) |
|
double |
GTest.gTest(double[] expected,
long[] observed) |
Returns the observed significance level, or p-value,
associated with a G-Test for goodness of fit comparing the
observed frequency counts to those in the expected array. |
boolean |
GTest.gTest(double[] expected,
long[] observed,
double alpha) |
Performs a G-Test (Log-Likelihood Ratio Test) for goodness of fit
evaluating the null hypothesis that the observed counts conform to the
frequency distribution described by the expected counts, with
significance level
alpha. |
static double |
InferenceTestUtils.gTest(double[] expected,
long[] observed) |
|
static boolean |
InferenceTestUtils.gTest(double[] expected,
long[] observed,
double alpha) |
|
double |
GTest.gTestIntrinsic(double[] expected,
long[] observed) |
Returns the intrinsic (Hardy-Weinberg proportions) p-Value, as described
in p64-69 of McDonald, J.H.
|
static double |
InferenceTestUtils.gTestIntrinsic(double[] expected,
long[] observed) |
|
protected double |
TTest.homoscedasticTTest(double m1,
double m2,
double v1,
double v2,
double n1,
double n2) |
Computes p-value for 2-sided, 2-sample t-test, under the assumption
of equal subpopulation variances.
|
protected double |
TTest.tTest(double m1,
double m2,
double v1,
double v2,
double n1,
double n2) |
Computes p-value for 2-sided, 2-sample t-test.
|
| Modifier and Type | Method | Description |
|---|---|---|
ConfidenceInterval |
BinomialConfidenceInterval.createInterval(int numberOfTrials,
int numberOfSuccesses,
double confidenceLevel) |
Create a confidence interval for the true probability of success
of an unknown binomial distribution with the given observed number
of trials, successes and confidence level.
|
| Modifier and Type | Method | Description |
|---|---|---|
double[] |
RealTransformer.transform(UnivariateFunction f,
double min,
double max,
int n,
TransformType type) |
Returns the (forward, inverse) transform of the specified real function,
sampled on the specified interval.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
MathArrays.checkPositive(double[] in) |
Check that all entries of the input array are strictly positive.
|
| Constructor | Description |
|---|---|
MultidimensionalCounter(int... size) |
Create a counter.
|
Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.