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
3
votes
1 answer

zScore and p-value in Java (survival function)

What would be the java equivalent of the following code? import scipy from scipy.stats import zscore zlist = [9967,11281,10752,10576,2366,11882,11798,] z = zscore(zlist) for e in z: print e,scipy.stats.norm.sf(abs(e))
Vivek
  • 657
  • 11
  • 14
3
votes
2 answers

Loop through a result set to generate averages by group

Background: I am attempting to determine statistics for ambulances using Apache Commons Math. I am able to do very basic univariate statistics for one ambulance, however I get stuck when I want to determine statistics for all the ambulances in my…
David Fort Myers
  • 333
  • 1
  • 5
  • 17
3
votes
2 answers

How to solve this set of nonlinear trigonometric equations in Java?

I am trying to solve a system of trigonometric equations in Java, but I don't know where to start. I've used commons-math3 before to solve simple linear sets of equations, but this is above my head. Equations I am trying to solve: a - e + bcosθ1 +…
herrtim
  • 2,697
  • 1
  • 26
  • 36
3
votes
1 answer

Specify Start Position for Apache Commons Kalman Filter 2D Positioning Estmation

I use the kalmanfilter implementation of the apache commons math library to improve the accuracy of my indoor positioning framework. I think I got the matrices setup correctly for 2D positioning while the state consists of the position(x,y) and…
3
votes
1 answer

How do I postmultiply a RealMatrix by a RealVector (org.apache.commons commons-math3)

I am trying to do some analytic geometry using Java after having done a lot of my work in blender and python. After poking around a bit, I think I should be using org.apache.commons commons-math3 . But then I tried to compute M*v and hit a…
Mutant Bob
  • 3,121
  • 2
  • 27
  • 52
3
votes
0 answers

Inverse of Complex Matrix using Apache Commons

Currently in the process of converting some Matlab Code over to Java w/ the Apache Commons library. How would I go about inverting a complex matrix? My usual method of creating a LUDecomposition object on the matrix and calling getSolver() doesn't…
Amrik Sadhra
  • 75
  • 1
  • 3
3
votes
1 answer

How to get function's min/max on spesific interval with apache-common-maths

I can't find any word about looking for function extrema (max/min) in apache-commons-math userguide. How to find function min/max with help of apache-commons-math? P.S. At least for polynomial function
VB_
  • 45,112
  • 42
  • 145
  • 293
3
votes
2 answers

Apache Commons Math Normal Cumulative Probability

Wikipedia has listed a variety of numerical methods for computing cumulative probability of a normal distribution. However, with Apache Commons Math you do not need know about any of them as the library simply does the job for…
3
votes
2 answers

Apache Commons Math optimization

Does anyone have any experience with the Apache Commmons Math optimization package? More specifically, the Nelder-Mead method implementation? Is it pretty high quality?
alex
  • 625
  • 3
  • 7
  • 12
3
votes
4 answers

Thread safety warnings

I'm using org.apache.commons.math3.distribution.NormalDistribution in a large distributed Scala & Akka application. During debugging I found sample() was occasionally returning NaN, which propagated silently and caused threads to hang in…
Pengin
  • 4,692
  • 6
  • 36
  • 62
3
votes
2 answers

LevenbergMarquardtOptimizer unable to perform Q.R decomposition on the 107x2 jacobian matrix

I really need some help to get the LevenbergMarquardtOptimizer up and running. Please see the following compileable code (needs apache common math 3). No matter how I try to return the gradients an Exception will raise ... hmmm get stuck ...…
KIC
  • 5,887
  • 7
  • 58
  • 98
3
votes
2 answers

apache commons math - NotStrictlyPositiveException when only 1 value exists in bin

I am trying to use apache commons math for kernel density estimation for a group of values. One bin happens to have only one value, and when I try to call cumulativeProbability() I get a NotStrictlyPositiveException. Is there any way to prevents…
barisdad
  • 515
  • 7
  • 19
3
votes
2 answers

Install commons math library for java in Ubuntu

So I've been looking for a while, and found that I need to import the org.apache.commons.math3.util.ArithmeticUtils library in a Java program I'm writing. Now this is my first Java program, and I can't figure out how to use the library. Am I…
Tropical_Peach
  • 1,143
  • 3
  • 16
  • 29
3
votes
1 answer

Commons Math - could not find class org.apache.commons

I have downloaded the binary Zip from here. I extracted the zip to a folder. Then I right clicked on libs folder in Eclipse. I Imported the *.jar file to the libs folder, and then I right clicked on it and added to path. I added import…
KingsInnerSoul
  • 1,373
  • 4
  • 20
  • 49
2
votes
1 answer

How to calculate the centroids in k-means++ by using distances?

I am using the k-means++ clusterer from Apache Commons Math in a interactive genetic algorithm to reduce the number of individuals that are evaluated by the user. Commons Math makes it very easy to use. The user only needs to implement the…
Stephan
  • 4,395
  • 3
  • 26
  • 49
1 2
3
13 14