Questions tagged [apache-commons-math]

Apache Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Apache Commons Lang.

Apache Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Apache Commons Lang.

Binaries and source code for Apache Commons Math can be downloaded from here.

202 questions
1
vote
1 answer

Statistics inquiry

How do I obtain critical T values? Using apache stat I can't seem to get the values? For instance Tdistribution t= new Tdistribution(10); t.CumulativeProbabilty(0.05);//alpha=0.O5 if you look in table values are different.
larry mintz
  • 109
  • 3
1
vote
1 answer

How can I get around Android's jack compiler giving Java heap space exceptions?

I recently tried to add the Apache Commons' Math library, but ran into the following exception during compilation: Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.…
Saites
  • 792
  • 7
  • 11
1
vote
1 answer

Inverse cumulative beta distribution function in Java with smaller Double value

I am using apache-commons-math for Inverse cumulative beta distribution function but it gives incorrect results for values smaller than 2E-15. Up to values 2E-15, results are correct and are also verified from R. Value 2E-15 Result in R =…
K.Liaqat
  • 143
  • 1
  • 3
  • 14
1
vote
1 answer

Confidence intervals in java, testing the random pick of an element in a list of objects

So I have this method that picks at random an object from a list of 2 objects. I would like to write a junit test (@Test) asserting based on a confidence level that somehow there's a 50% chance for each of the 2 objects to be picked. The piece of…
TPPZ
  • 4,447
  • 10
  • 61
  • 106
1
vote
1 answer

Android import Apache Commons Math - Unable to use Normal Distribution

I've imported the Apache Common Math library to use normal distribution. But it isn't working. The error is that it cannot be accessed outside of the package. I'm unable to import the normalDistributionCDFAlgorithm library. public void calc1() { …
1
vote
1 answer

Apache Commons Math: Eigendecomposition of a tridiagonal matrix yields wrong result

I am trying to find the diagonal matrix D of eigenvalues and matrix V whose columns are the corresponding right eigenvectors (where AV = VD) of the tri diagonal matrix J. I’m attempting to implement existing MATLAB code in java however the result I…
1
vote
3 answers

OLS Multiple Linear Regression with commons-math

Currently I have a dependency to commons-math 2.1 but I want to upgrade it to commons-math 3.6. Unfortunately there are some testcases that are not working any longer. I know what is causing my problem, but I don't know how to change the testcase…
Georg Leber
  • 3,470
  • 5
  • 40
  • 63
1
vote
0 answers

Implementing genetic algorithm from Apache Commons Math library

I am trying to implement genetic algorithm from Apache Commons Math library. I would like to use it together with OLS or GLS regression from the same package. But I have no idea how to do it. Could anyone help with some ideas?
1
vote
0 answers

How to perform covariance calculation on BigDecimal

I am working on a financial system that uses BigDecimal to store values. I need to calculate covariance of two groups of data, but it seems that Java lacks libraries for statistical analysis. The library I'm using is Apache Common Math, which…
Jerry Xue
  • 331
  • 2
  • 8
1
vote
0 answers

Linear Constraint in Java

I am working with a linear solver in java. (apache.commons.math3) So far the constraints are all taking the form where SUM(solutions) >= myLimit. myConstraint = new LinearConstraint(binaryMap, Relationship.GEQ, myLimit); There is a new constraint…
Deslyxia
  • 619
  • 4
  • 11
  • 32
1
vote
2 answers

methods for undertaking complex calculations in Java

I have to implement some relatively complex formulas in a Java application. The inputs to these formulas are include up to 30 or so variables. Some of these variables in their natural form are integers, some are reals with a precision of around 3…
skyman
  • 2,255
  • 4
  • 32
  • 55
1
vote
1 answer

Changing parameters during Thompson sampling

Thompson sampling uses a Beta probability distribution to sample parameters. After each sample, the distribution is changed, according to the sample value got. Currently I am doing the following : dist = new BetaDistribution(alpha,…
user3575425
  • 478
  • 3
  • 11
1
vote
1 answer

Percentile calculation mismatch using apache.math3.stat.descriptive

I am calculating the 95th percentile of the following list of numbers: 66,337.8,989.7,1134.6,1118.7,1097.9,1122.1,1121.3,1106.7,871,325.2,285.1,264.1,295.8,342.4 The apache libraries use the NIST standards to calculate the percentile which is the…
eeijlar
  • 1,232
  • 3
  • 20
  • 53
1
vote
2 answers

Calculate probability of bivariate normal distribution over area / polygon

I'm trying to calculate the probability of a bivariate normal distribution over a specific area respectively a specific polygon in java. The mathematical description would be to integrate the probability density function (pdf) of the bivariate…
horge
  • 11
  • 5
1
vote
1 answer

Changing distribution parameters during program flow in Apache Commons Math

I need to generate random numbers in my code but I want to change the parameters of the Distribution based on the current scenario. The application can run as single or multi-threaded application. My question is that, should I initialize the…
Atif
  • 345
  • 1
  • 4
  • 16