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

Custom distance metric for DBSCAN in Apache Commons Math (v3.1 vs. v3.6)

I want to use Apache Commons Math's DBSCANClusterer to perform a clustering using the DBSCAN algorithm, but with a custom distance metric as my data points contain non-numerical values. This seems to have been easily…
Janus Varmarken
  • 2,306
  • 3
  • 20
  • 42
0
votes
1 answer

Apache Commons Math: how to perform sum along rows/columns?

I'm pretty new to Apache Common Math, so please pardon the trivial questions. Based on the API doc, I'm unable to figure out how to perform column-wise or row-wise sum. import org.apache.commons.math3.linear.RealMatrix; import…
cwl
  • 501
  • 2
  • 7
  • 18
0
votes
0 answers

Multiple linear regression with matricies in Java

I am a quant newbie trying to compute regression coefficients using apache common math libraries in Java. I am trying to use OLSMultipleLinearRegression class to estimate the regression coefficients and residuals for a multiple linear regression…
0
votes
0 answers

RealMatrix doesnt like big numbers

In order to perform a LU Decomposition with Apache Commons Math, I implemented the following : The original matrix as a double[][] : A matrix : 1.9720119421779572E-13 -1.5495666760275814E-12 8.940570999398516E-6 1.1377963306426943E-6 The…
Gilles-Antoine Nys
  • 1,481
  • 16
  • 21
0
votes
0 answers

why can I not use org.apache.commons.math3 in Eclipse?

I wanted just use org.apache.commons.math3.analysis.solvers.PegasusSolver; Created a Java project in Eclipse Oxygen.3A. Extended the build-path/classpath by commons-math3-3.6.1.jar. When typing the import statement until the dot after solvers, I…
ngong
  • 754
  • 1
  • 8
  • 23
0
votes
1 answer

Mann-Whitney U Test on Apache Commons Math

I am currently trying to use Mann-Whitney U Test and I figured out that Apache Commons Math has it implemented. After consulting multiple websites (Wiki is one of them), they indicate that the U statistic of this test is the minimum among U1 and U2.…
nick.katsip
  • 868
  • 3
  • 12
  • 32
0
votes
2 answers

No library found for org.apache.commons.math3.fitting.leastsquares.LeastSquaresOptimizer

I am importing Apache Commons Math and Lemmingapex Trilateration as external jar libraries in Processing. I followed this instruction from SO: How to add external libraries in processing The processing sketch seems to work fine but i am getting the…
werty37
  • 53
  • 11
0
votes
2 answers

Apache Math: calculate the confidence interval in a t-test, which has two samples

I am using Apache Math3 to do a Student's t test for a website project. Suppose I have two samples: double[] sampleOne = new double[] {134 ,146 ,104 ,119 ,124 ,161 ,107 ,83 ,113 ,129 ,97 ,123}; double[] sampleTwo = new double[] { 70, 118, …
curious1
  • 14,155
  • 37
  • 130
  • 231
0
votes
1 answer

Deleting rows and/or columns for integer2D matrix - java

I have found a way to delete rows and columns from a 2D double matrix using Apache Commons Math. My condition for deletion was if a column or row had all zeroes. Is there a similar way for integer matrix? I want to avoid creating copies of large…
Nikhil
  • 1,126
  • 12
  • 26
0
votes
1 answer

Apache Common Maths - Univariate Function Solver

I am trying to solve the following mathematical equation for "V" using the apache-commons-math solver. Equation : V = log(X/ (V-1)) Following is the MWE; import org.apache.commons.math3.analysis.UnivariateFunction; import…
Ahmad
  • 163
  • 1
  • 2
  • 9
0
votes
1 answer

Key-valued descriptive statistics

I am using Apache DescriptiveStatistics to compute stats, but there is a problem. I have a bunch of entities generating values and on each iteration I would like to update the value associated with the entity. For example I may track current…
Denis Kulagin
  • 8,472
  • 17
  • 60
  • 129
0
votes
1 answer

how to convert double array to collection?

I have two arrays double arr[]=data.attributeToDoubleArray(4); double arr0[]=data.attributeToDoubleArray(0); To calculate p value in common apache it has been documented as follows : public double anovaPValue(Collection
0
votes
0 answers

Solving a polynomial equation

I never used Java to solve a polynomial equations before. I wonder how can I solve an equation like this: 5.5 (1 - x) + 4 x (1 - x) + 4 x^2 (1 - x) + 6 x^3 (1 - x) + 5 x^4 (1 - x) + 5 x^5 (1 - x) + 5 x^6 (1 - x) + 5 x^7 (1 - x) + 5 x^8 (1 - x) +…
Hisham Ragheb
  • 144
  • 2
  • 10
0
votes
0 answers

Java library for calculating the normal distribution function

I am using the Apache Commons library (org.apache.commons.math3.distribution.NormalDistribution) for calculating the normal distribution. My program is cyclic so it repeats this process. After some 30-40 cycles, I obtain question marks instead of…
Aidos
  • 729
  • 7
  • 20
0
votes
2 answers

How to perform Integer Linear Programming in Apache Commons Math

The org.apache.commons.math3.optim.linear package in Apache Commons Math Library allows Linear Optimization but the returned values are double. Is there any way to perform Integer Linear Programming using this library? I tried googling but there…