Saturday, November 17, 2018

Hipparchus 1.4 Released

We just cut another Hipparchus release, which should now be available on Maven Central.  Hipparchus is a library of lightweight, self-contained  mathematics and statistics components addressing the most common  problems not available in the Java programming language. 

New features and enhancements include:

  • Bilinear interpolation for 2D grids
  • Field version of sinCos
  • Support for complex ordinary differential equations (both primary and secondary equations)
  • Accessors for state transition matrix, Jacobian matrix H
  • Innovation covariance matrix and Kalman gain in Kalman filters
  • Three-dimensional field arrays
  • Several fixes in the Euclidean 3D and spherical 2D partitioning 

The release is available on the Hipparchus download page.  The release jars are available from maven central with groupId org.hipparchus and artifactId by library component.  For example, the ODE jar is here:


<dependency>
  <groupId>org.hipparchus</groupId>
  <artifactId>hipparchus-ode</artifactId>
  <version>1.4</version>
  <type>pom</type>
</dependency>

Bug reports, patches, suggestions for improvement are always welcome.   Subscribe to our mailing lists and dive into our source code to get involved.

Monday, June 11, 2018

Read the proofs!

Now and then one of my friends asks me for recommendations for books to use to re-engage with mathematics.  I am always happy to help and I try to come up with recommendations that will be "goldilocks hard" but also interesting and fun for the person who is asking.  I also selfishly think a little about what it will be like for me to talk about the book's content with my friend.

I look for books that motivate the material well, but also actually prove things and I always make a point of telling my friends that they have to read and understand the proofs, ideally well enough that they can reproduce them.  Today I asked myself why I always make such a big deal of this.  Here's what I came up with:

  1. Mathematics is a progression of ideas, expressed in arguments that prove results.  The results are often useful in solving problems, but the arguments are really where the mathematics is.  If you understand the arguments, you will be able to do problems - often in many different ways.
  2. Proofs show exactly what is needed to get results.  They show you, therefore, exactly where the limits are in applying the results.  When you understand a proof, you know exactly what you have to work with.
  3. Proofs are rigorous and often hard.  If your goal is to be able to apply mathematical concepts and hone your mathematical intuition, working through hard proofs is much better training than just practicing algorithms.  
  4. What you can prove in mathematics is what you know.  Results that you can apply, but don't understand the proofs for, are what Plato would call "true opinions," not knowledge.  Not grounded in proof, your understanding of algorithms and their valid application might "fly away" at any time (See Plato's Meno 97-98, for a delightful account of this).
  5. Go back to 1.  The beautiful thing about studying mathematics "for fun" is that you get to actually do it.  Under time / grade / getting applications done pressure, the mathematics ends up taking a back seat to the applications.  It's like fast-forwarding the show and watching the commercials.  Coming back now, you can actually watch the show.
So read the proofs!

Tuesday, May 8, 2018

Hipparchus 1.3 Released

Today we cut another release of our little Java mathematics library.  Hipparchus is based on a fork of Apache Commons Math.

The 1.3 release includes some nice new features - most notably a redesigned Kalman filter implementation capable of handling nonlinear processes, along with quite a few additional enhancements and bug fixes. 

  • Support was added for complex eigenvalue decomposition.
  • A solver for continuous time algebraic Riccati equations was added.
  • Secondary equations can now update the derivatives of the primary equation in ODE.
  • A matrix decomposer was added to allow configuration of decomposition thresholds independently of the matrix.
  • FastMath was extended to cover the new Java 9 methods so it can still serve as a drop-in replacement for java.lang.Math.


    I had fun fixing some bugs in the stat package and reviewing the Kalman filter design and implementation.  One of the bug fixes, for the Mann-Whitney test implementation, included implementation of exact computation of the sampling distribution of the Mann-Whitney U statistic.  The algorithm for this is nice and simple, but it does not handle the case where there are ties in the data.  I have started working on generalizing the algorithm (to some extent, the definition, actually) to support this.  Comments, patches welcome!

    The release is available on the Hipparchus download page.  The release jars are available from maven central with these coordinates:


    <dependency>
      <groupId>org.hipparchus</groupId>
      <artifactId>hipparchus-aggregator</artifactId>
      <version>1.3</version>
      <type>pom</type>
    </dependency>