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
0
votes
0 answers

Optimize parameters of an equation in Java

I'm trying to figure out a way how to optimize a function in Java, however, I'm struggling to do this. I've found the Apache Math library, but I somehow cannot come up with a implementation that suits my problem. What I want to achieve is an…
0
votes
1 answer

Apache Commons Math SimpleRegression: get prediction stderr

Apache commons math SimpleRegression has a very handy predict method for predicting a y value for a given x value. What it doesn't have, however, is an out of the box means for getting the standard error of that prediction, which would be very…
PaddyD
  • 1,097
  • 1
  • 9
  • 19
0
votes
1 answer

Octave dfdp.m for JAVA

I want to implement Levenberg Marquardt fitting in JAVA and found apache commons math suitable. Since I want to fit a function, where I dont have the derivative to calculate the gradient or Jacobian, I need somthing like dfdp.m from GNU octave to…
0
votes
2 answers

Apache Commons Math: get derivate/integrate function

I'm working with PolynomialFunction. I derivate/integrate my function f in the next way: // derivation ... new PolynomialFunction(vector).value(x).getPartialDerivative(derivationOrder) // integration ... UnivariateIntegrator integrator = new…
VB_
  • 45,112
  • 42
  • 145
  • 293
0
votes
1 answer

Apache Commons Math3: Multiply row with column vector

I want to multiply two vectors a^T = (1,2,3) and b = (4,5,6). With pen and pencil, I got c = 1*4 + 2*5 + 3*6 = 4 + 10 + 18 = 32 With apache commons math3 I do ArrayRealVector a = new ArrayRealVector(new double []{1, 2, 3}); ArrayRealVector b = new…
waXve
  • 792
  • 2
  • 9
  • 30
0
votes
1 answer

initialize complex Sparse matrix

I have declared a Sparse complex matrix with the apache commons-math and I have absolutely no clue on how to initialize it, besides, the documentation seems quite poor. import…
Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
0
votes
0 answers

Using apache simple regression

I have an application that uses linear regression. I downloaded common math apache library where there is a class SimpleRegression. I read the documentation but i didn't understand it very well. Here is what i want to do: Every 200ms i am going…
Pavle Pavlov
  • 189
  • 2
  • 13
0
votes
1 answer

How to fix java.lang.NoClassDefFoundError in Netbeans?

I'm developing a library (fpotencia) wich I use from a GUI program (fpotenciaui). The library uses the commons math library. When I run the GUI program I get: Exception in thread "main" java.lang.NoClassDefFoundError:…
Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
0
votes
2 answers

Finding optima of PolynomialFunction in commons.math

Is there a simple way to find the optimum of a PolynomialFunction (which is also a UnivariateDifferentiableFunction) in commons.math? There are a bewildering array of multidimensional optimizers, but AFAICS the only explicitly univariate optimizer…
0
votes
2 answers

Interpolation and derivative on Java

I am trying to make a project witch involves calculating an interpolation from raw data and its derivative. I have two arrays looking like this: A = { 1, 2, 3, 4, ... , n } B = { 0.23, 0.43, 0.24, 0.19, ... , n } I want a function to describe the…
Sielar
  • 292
  • 2
  • 10
0
votes
1 answer

Why does tail probability in apache math drop to zero after 1E-16?

Apache Math 3.4 (and 3.3), java 1.8.0_25 import org.apache.commons.math3.distribution.ChiSquaredDistribution; ChiSquaredDistribution chisq = new ChiSquaredDistribution(23) System.out.println(1.0 - chisq.cumulativeProbability(130) // …
N. Sriram
  • 3
  • 2
0
votes
2 answers

Apache Commons Math ' SummaryStatistics cannot be resolved to a type '

I am attempting to use Apache Commons Math 3.3 for a static data processing class, and am using Eclipse Mars to create it. I have successfully downloaded the bin and src files, and added them to the build path of my project; I can see them in my JRE…
Dan
  • 15
  • 5
0
votes
1 answer

Apache DBSCANClusterer always return 0 clusters

I'm trying to use DBSCANClusterer from apache.commons.math3.ml.clustering. Function cluster returns list of clusters but for me size of list is always 0. What am I doing wrong? Below is my test code: public class ClusterTest { public static…
user3626048
  • 706
  • 4
  • 19
  • 52
0
votes
2 answers

How to calculate eigenvalues using QR method?

How can I get eigenvalues of matrix using Apache Commons Math? I know there is 2 classes EigenDecomposition and QRDecomposition, but how to combine them to get eigenvalues?
Sevak.Avet
  • 111
  • 1
  • 10
0
votes
1 answer

Compiling LUDecompsitionTest from apache common math without common-math3-3.3.jar and maven

javac -cp .:/dcsdata/home/hdokani2/.m2/repository/junit/junit/4.11/junit-4.11.jar:/dcsdata/home/hdokani2/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/dcsdata/home/hdokani2/Desktop/cs527/commons-math3-3.3.jar…
Biparite
  • 203
  • 1
  • 2
  • 13