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

RealMatrix multiply without reassign

in my Java source i must execute following lines very often: vecX = EigenMat.multiply(vecX); vecY = EigenMat.multiply(vecY); EigenMat is a N x N Matrix with N~40 vecX/vecY is a N x 1 vector (intern a RealMatrix to) I used the "Sampler" from…
Matyro
  • 151
  • 1
  • 9
0
votes
1 answer

Calculate average top third of the population

Could you guys help me which apache-commons-math classes can I use to calculate the average of the top third of the population. To calculate the average I know can use org.apache.commons.math3.stat.descriptive.DescriptiveStatistics. How to get the…
KirdApe
  • 323
  • 1
  • 4
  • 12
0
votes
1 answer

Alternative for deprecated apache commons CurveFitter class?

The org.apache.commons.math3.optimization.fitting.CurveFitter is deprecated. It was a useful class. Why was it deprecated? The docs don't say what we should use instead. What is the alternative class?
Bhavin Doshi
  • 190
  • 1
  • 11
0
votes
1 answer

Is EmpiricalDistributionImpl broken on Commons-Math 3.3?

I have been using EmpiricalDistributionImpl from Apache Commons-Math library for quite a while now, upgrading from 2.x to 3.3 I am experiencing some problems. First off NaNs seem to be causing problems during load() in this version, I am pretty…
posdef
  • 6,498
  • 11
  • 46
  • 94
0
votes
1 answer

Spherical Geometry lib for java

I want to get distance of two cities having their latitude and longitude. Is there a java lib to do it? Apache common math seems to have a spherical class. Is there any one used it?
Behzad
  • 53
  • 1
  • 8
0
votes
0 answers

How to find symbolic differentiation in java

I learned that by using DerivativeStructure in org.apache.commons.math3.analysis.differentiation package, one can calculate partial derivatives of a function. DerivativeStructure x = new DerivativeStructure(1, 3, 0, 2.5); DerivativeStructure x2 =…
0
votes
1 answer

Intellij + Apache Math 3.3 giving NoClassDefFound error

I copied the apache Math 3.3 jar library into my intellij project folder and then added it to my project via the "Add to Library" option. While everything compiles and builds fine, when I run my project's jar, I get NoClassDefFoundError for the…
Opt
  • 4,774
  • 3
  • 28
  • 28
0
votes
2 answers

Calculating Log and Exp of a value using Apache Commons

I have a mortality risk calculation that requires the determination of natural logs and exp decay. The method is detailed below. I am curious to know why the methods for calculating exp etc are not static and if I use a single Log (or Exp) object…
skyman
  • 2,255
  • 4
  • 32
  • 55
0
votes
0 answers

BobyQA alters the starting point and computes sub-optimal result?

I'm trying out the Apache Commons Math's BobyQA algorithm for bound non linear optimization. I know the optimum (found it using matlab's trust-range reflective algorithm) and I'm confused about the following: I set BobyQA's starting point to optimal…
0
votes
1 answer

ArrayIndexOutOfBounds Exception When Using MillerUpdatingRegression Class

We've tried using the MillerUpdatingRegression class in one of our projects and ran into an issue. After creating an instance of the class, providing the number of variables to expect and adding observations from the entire sample set, we call the…
eugene
  • 956
  • 1
  • 11
  • 13
0
votes
2 answers

does k-means clusterer of apache commons math contains a means method?

I have to get the means of a k-means clustering. currently I'm using the apache commons math library which implements a k-means plus plus clustering algorithm. do anybody know, if there is a simple way to get the means after the clustering with this…
chef
  • 75
  • 1
  • 12
0
votes
2 answers

Memory Requirement of Commons Math: The Apache Commons Mathematics Library

I would like to know if all the operations in Apache Commons Math are in memory operations. I am particularly interested in OLSMultipleLinearRegression and using this for big data. Also is there any existing JAVA API for running regression on big…
unnik
  • 1,123
  • 5
  • 18
  • 37
0
votes
1 answer

How to use PolynomialSplineFunction from Apache Commons Math

I do not understand number two: The value of the polynomial spline function for an argument x is computed as follows: The knot array is searched to find the segment to which x belongs. If x is less than the smallest knot point or greater than…
smuggledPancakes
  • 9,881
  • 20
  • 74
  • 113
0
votes
1 answer

Why have Apache commons-math based it's Fraction on int type?

Why have Apache commons-math3 based it's Fraction on int type??? Are there any reasons to use int instead of long? Do we have some performance gains here? Aren't longs process at the same speed as ints on modern CPUs? I think we got only unneeded…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
0
votes
1 answer

ClassDefNotFoundException after adding jar to simple java project

I am adding commons.math jar to my project in NetBeans but during creating instance of simple Class, project throws ClassDefNotFoundException. Any suggestions guys? Math jar located on desktop, but even moving it to .m2 repo did not affect the…
johnny-b-goode
  • 3,792
  • 12
  • 45
  • 68
1 2 3
13
14