Bobic, Tamara | 18 Aug 10:15 2014
Picon

Correlation coefficient

Hi all,

I've recently installed this library to help me with some basic statistics in my project.
I wanted to calculate the correlation coefficient for 2 arrays, which I see I can do with "PearsonsCorrelation".
However, I realized that I should be using a special variant of Pearson if one of the variables is nominal -
Point Biserial correlation coefficient.

Could you tell me if this is somehow supported in the library and if not, if there is a similar Java library
which can calculate the Point Biserial coefficient.

Thanks for your help!

Best regards,
--
Tamara Bobic,
PhD Student

Hasso-Plattner-Institut für Softwaresystemtechnik GmbH
Prof.-Dr.-Helmert-Str. 2-3
D-14482 Potsdam
Germany

Amtsgericht Potsdam, HRB 12184
Geschäftsführung: Prof. Dr. Christoph Meinel

Phone:   +49 (0)331-5509-569
Fax:       +49 (0)331-5509-325

Email: tamara.bobic <at> hpi.uni-potsdam.de
Web:   http://www.hpi.de
(Continue reading)

Benedikt Ritter | 15 Aug 08:51 2014
Picon

[ANNOUNCE] Apache Commons CSV 1.0 released!

The Apache Commons Team is pleased to announce the release of Apache
Commons CSV 1.0.

The Apache Commons CSV library provides a simple interface for reading and
writing
CSV files of various types.

1.0 is the long awaited first GA release. The minimum required JDK version
for this release is 1.6.

Source and binary distributions are available for download from the Apache
Commons download site:
  http://commons.apache.org/proper/commons-csv/download_csv.cgi

When downloading, please verify signatures using the KEYS file available at
the above location when downloading the release.

Alternatively the release can be pulled via maven:
<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-csv</artifactId>
  <version>1.0</version>
</dependency>

Full details of all the changes in 1.0 can be found in the changelog:
  http://commons.apache.org/proper/commons-csv/changes-report.html

For complete information on Commons CSV, including instructions on how to
submit bug reports, patches, or suggestions for improvement, see the Apache
Commons CSV website:
(Continue reading)

South Light | 14 Aug 03:08 2014
Picon

[math] Curve fitting ...

Hi,

May be someone can help me with this problem.

Given the follow function: y = 10 ^ ((x + 82) / (-10 * A))

I would like to found the A value witch curve fit better for a set of x,y
values, usually the set is about 20 to 25 x,y values.

I use the CurveFitter class and the ParametricUnivariateFunction

ParametricUnivariateFunction function = new  ParametricUnivariateFunction()
{

​  ​
 <at> Override
​  ​
public double[] gradient(double x, double[] params) {
​
(????? comment)
​  ​
}

​  ​
 <at> Override
​  ​
public double value(double x, double[] params) {

​    ​
double a = params[0];
(Continue reading)

Bernd Eckenfels | 6 Aug 21:54 2014
Picon

Rule profiles for community projects on nemo

On nemo.sonarqube.org are a number of usefull open source projects
are measured.

I wonder if it is possible to influence the rules used
for a specific project? Apche VFS has braces-on-new-line coding
style and this results in 4098 major(!) issues. (besides I wonder if
this is really a major event?)

http://nemo.sonarqube.org/dashboard/index/org.apache.commons:commons-vfs2-project

Gruss
Bernd
Alexander Nozik | 6 Aug 15:53 2014
Picon

[math] FiniteDifferencesDifferentiator is not convenient for simple differentiation task

A DerivativeStructure and UnivariateDifferentiableFunction are great 
tools if one needs to investigate the whole function but are not 
convenient if one just needs derivative in a given point.
In order to calculate a derivative of function in a given point one 
needs something like that:

     public static double calculateDerivative(UnivariateFunction 
function, double point, double step) {
         FiniteDifferencesDifferentiator diff = new 
FiniteDifferencesDifferentiator(numPoints, step);
         UnivariateDifferentiableFunction derivative = 
diff.differentiate(function);
         DerivativeStructure x = new DerivativeStructure(1, 1, 0, point);
         DerivativeStructure y = derivative.value(x);
         return y.getPartialDerivative(1);
     }

which is not very convenient. Perhaps you could add some helper methods 
to FiniteDifferencesDifferentiator or to utility class like 
FunctionUtils. Also it would be good to have helper methods to get the 
derivatives of UnivariateDifferentiableFunction or 
MultivariateDifferentiableFunction as simple Univariate or Multivariate 
functions (or vector-functions). In java 8 it could be simply done by 
adding some default methods to corresponding interfaces. But since 
commons-math does not support java 8 (as far as I can understand), it 
should be some utility class.

With best regards, Alexander Nozik.
Parth Patil | 6 Aug 02:34 2014
Picon

[dbcp] How to create replication aware connection pool ?

Hi Friends,
I am using DBCP2 in my project and I am pleased with the performance of the
library. Though I am only able to provide a single mysql host in the
connection string. What do I need to do inorder to make the DBCP connection
pool replication aware ? I am going to use 1 master and 2 slaves in my
setup. Am I correct in assuming that its possible to create connection pool
over several mysql hosts ?

I tried to use the replication aware mysql jdbc driver
(com.mysql.jdbc.ReplicationDriver) but that doesn't seem to work and I am
getting an exception. Following is my test code

import org.apache.commons.dbcp2.BasicDataSource;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;

public class MyJdbcTest {
    public static void main(String[] args)  throws Exception {
        String connectionString =
"jdbc:mysql:replication://localhost,localhost/my_database";
        String driverName = "com.mysql.jdbc.ReplicationDriver";

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(driverName);
        ds.setUsername("root");
        ds.setUrl(connectionString);

        Connection conn = ds.getConnection();
        Statement stmt = conn.createStatement();
(Continue reading)

Ted Dunning | 4 Aug 21:10 2014
Picon

Re: [math] Calculating gain matrix in KalmanFilter

Arne,

I think you are correct.

On Mon, Aug 4, 2014 at 7:34 AM, Arne Schwarz <schwarz.arne <at> gmail.com> wrote:

> 2014-08-04 13:43 GMT+02:00 Gilles <gilles <at> harfang.homelinux.org>:
> > On Sun, 3 Aug 2014 18:18:24 +0200, Arne Schwarz wrote:
> >>
> >> Hi,
> >>
> >> I saw that to calculate the gain matrix the actual inverse of the
> >> residual covariance matrix is calculated. Wouldn't it be faster to use
> >> for example a Cholesky decomposition to solve the linear system? Since
> >> a covariance matrix is always symmetric and at least positive
> >> semi-definite.
> >
> >
> > Reading the code (in class "MatrixUtils"), it looks like QR decomposition
> > is used; any problem with that choice?
> >
> > Regards,
> > Gilles
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe <at> commons.apache.org
> > For additional commands, e-mail: user-help <at> commons.apache.org
> >
(Continue reading)

Alexander Nozik | 4 Aug 12:41 2014
Picon

[math] UnivariateIntegrator stop conditions

The univariate integrator class provides iterative integration 
procedure. It throws exception if the number of evaluations is larger 
than given number. The problem arises when one is limited by some 
performance issues and wants to minimize the number of evaluations even 
at the expense of accuracy. So for example I need to calculate an 
integral with best possible accuracy with limited number of evaluations 
(and check the accuracy afterwards). I can't do that because if 
UnivariateIntegrator throws the exception, I can not access the result. 
Also it does not make sense why the accurasy is provided in the 
constructor and maximum number of evaluations is the parameter of 
integrate method.
Of course one could use the GaussIntegrator, but it does not implement 
UnivariateIntegrator class, so if one needs to use these integrators 
interchangeably (I do need), than the only option is to write some 
wrapper class.
It would be good to have a default UnivariateIntegrator wrapper for 
GaussIntegrator. Also perhaps it makes sense to move maximum evaluations 
to the constructor.

I believe this question has already been discussed somewhere last year 
but I can't remember the answer.

With best regards, Alexander Nozik.
Arne Schwarz | 3 Aug 18:18 2014
Picon

[math] Calculating gain matrix in KalmanFilter

Hi,

I saw that to calculate the gain matrix the actual inverse of the
residual covariance matrix is calculated. Wouldn't it be faster to use
for example a Cholesky decomposition to solve the linear system? Since
a covariance matrix is always symmetric and at least positive
semi-definite.

Arne Schwarz

P.S. Sorry in case this is third mail with the same content,
accidentally send the first two html-formatted.
Arne Schwarz | 3 Aug 17:53 2014
Picon

[math] Calculating gain matrix in KalmanFilter

Hi,

I saw that to calculate the gain matrix the accual inverse of the residual
covariance matrix is calculated. Wouldn't it be faster to use for example a
Cholesky decomposition to solve the linear system? Since a covariance
Matrix is always symmetric and at least positive semi-definite.

Arne Schwarz
Benjamin Eltzner | 1 Aug 18:29 2014
Picon
Picon

[math3.fitting.leastsquares]

Dear mailing list,

I would like to do a Levenberg-Marquardt least mean square fit (i. e.
min( |f(x)|^2 ) for f: R^d -> R^n, d in [2,8], n in [~50, ~10000]) using
org.apache.commons.math3.fitting.leastsquares.LevenbergMarquardtOptimizer and
I am somewhat confused by the relevant API.

tl/dr: Is there a way to do this in a simple way, providing only a
function f, its derivative function df and an initial guess for x?

Long form: it seems that I have to create a LeastSquaresProblem which
requires a lot of input

* MultivariateVectorFunction model: done
* MultivariateMatrixFunction jacobian: done
* double[] observed: [0,...,0] in my case, since i want least mean
squares, right?
* double[] start: done
* RealMatrix weight: should this be a "new DiagonalMatrix([1,...,1])" of
the dimension of "observed"?
* ConvergenceChecker<LeastSquaresProblem.Evaluation> checker: no clue
* int maxEvaluations: no clue
* int maxIterations: no clue

Is there a way to get "reasonable defaults" for the three or four last
arguments? Or put differently, what would be "typical" inputs for the
last four arguments?

I would be very glad, if you could help me with this problem. I have
been trying to figure out, what would be sensible inputs be reading the
(Continue reading)


Gmane