What is the best math library to use with java? [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to use math functions for data mining and analytics purpose.
I need an opinion about a library that I can use for this purpose with java.
Do you have any recommendations?

There is colt.
The Colt library provides fundamental general-purpose data structures optimized for numerical data, such as resizable arrays, dense and sparse matrices (multi-dimensional arrays), linear algebra, associative containers and buffer management.
The Jet library contains mathematical and statistical tools for data analysis, powerful histogramming functionality, Random Number Generators and Distributions useful for (event) simulations, and more.
The CoreJava library contains C-like print formatting. The Concurrent library contains standardized, efficient utility classes commonly encountered in parallel & concurrent programming.

Apache Commons Math might be helpful. So might JAMA.
UPDATE: In the 2.5 years since I last answered this, I've become aware of Apache's Mahout and WEKA. Both are excellent Java libraries for data analysis.
Both are more appropriate answers for the narrower concern of data mining.

JScience is certainly worth a look. Some examples involving rational arithmetic and unit conversion are seen here, here and here.

java.lang.Math
has got a lot of useful math functions.

Your question is a little vague but check out Weka.

Related

Scala vs Groovy vs Java for testing [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
If you need to choose the language to write your integration tests, what language would you pick? (from the above, or maybe another language).
The requirements that I think the language should meet are at least the following: fast, reasonable IDE, easy to learn.
Thanks!
I'd say Groovy is probably the best choice.
It offers significant advantages over Java (closures, list/map literals, very compact implementation of mocks)
It's very easy to learn incrementally for anyone familiar with Java (Scala is much more different, and many also consider the language inherently more difficult)
Groovy is pretty well supported by IDE plugins by now
The speed of the language is almost certainly not going to matter for integration tests, as the system being tested will probably contain much larger overheads (especially if a database is involved)
However, if you're already using Scala elsewhere (especially in the system under test) and can assume youre developers to be familiar with it, Scala may be a better choice.

Math Intensive, Calculation Based Website - Which Language Should I Use? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am very new to programming. I am familiar with HTML, C++ and learning PHP to start a database.
I want to make a website which tracks a stock price. I have written various algorithms in Matlab however, MATLAB only has a to-Java conversion.
I was wondering what language would be the best to do a lot of calculations. I want my calculations to be done in real time and plotted. Would Java be the best language for this?
I can do the calculations in C++ but I don't know how to put the plots on the website. Likewise I believe I can do everything in Matlab but the conversion looks a little sketchy.
I would be very thankful if someone with experience with Java, or I also heard python, would comment on my post.
My advice: write the website code in Python with Django and do the calculations in Numpy/Scipy. Those two libraries provide a very Matlab-like API for heavy computations. Their performance is excellent. Matplotlib is the associated plotting library.
It's not so much the language that matters, it's making sure that you have a good mathematics library for it. MATLAB is neat because it does all that matrix math super fast for you, but of course you need to link it with another language like you said.
Your goal should be to either find a good math library for the language you like, or find a language with a good math library you like.
For What It's Worth: I know Python has NumPy (scientific computing package) and Sage Math (a libre Mathematica clone).
I think you can use PHP or Java Web.
I would do C++ and write them to a database, then using php you can grab them from the same database and show them online, otherwise then java can do all that but make sure all calculations aren't done on the fly since that will kill your server, especially with stocks that can turn into a lot of data.
if you want to plot data, then you may be able to pass off some of the calculation to the google chart api:
http://code.google.com/apis/chart/

Java library for matrix operations involving complex numbers? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to rewrite some signal processing code of mine from C++ to Java. I wind up with matrices of complex numbers (numbers with imaginary components). I need to find the inverse of an NxN complex matrix, as well as the principle eigenvector.
There are several Java libraries to do this with real numbers, but I couldn't find anything that supported complex numbers. I found one library but it was proprietary and had to be licensed.
Has this been implemented anywhere?
I can always wrap the needed C code with JNI, but I was doing this to avoid platform dependence.
I'd recommend Apache Commons Math. I believe that it carries on from where JAMA left off.
In a past university course, I worked with JAMA.
There is a java LAPACK that's basically an automatic translation of the FORTRAN one: http://www.netlib.org/java/f2j/ . The packaged sources don't include the complex ones unfortunately, but you can apply the same technique to those, I guess. Might be a lot of effort though, and I can't vouch for the performance to be satisfactory.
Also have a look at JavaNumerics at http://math.nist.gov/javanumerics/#libraries . They have a quite comprehensive list of things that might help you.
I recommend Michael Thomas Flanagan's Java Scientific Library: http://www.ee.ucl.ac.uk/~mflanaga/java/index.html
I found it much easier to use than the others mentioned in this post so far.
cern.colt is worth trying.

QP solver for Java [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm looking for a good easy to use Java based Quadratic Programming (QP) solver.
Googling around I came across ojAlgo (http://ojalgo.org).
However, I was wondering if there are any other/better alternatives.
Have a look at Apache Commons Math. I haven't used ojalgo, and I really can't say I've used Commons Lang enough to be able to provide you with a lot of details, but it did do what I needed.
Description from their website:
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 Commons Lang.
Guiding principles:
Real-world application use cases determine development priority.
This package emphasizes small, easily integrated components rather
than large libraries with complex
dependencies and configurations.
All algorithms are fully documented and follow generally
accepted best practices.
In situations where multiple standard algorithms exist, a Strategy
pattern is used to support multiple
implementations.
Limited dependencies. No external dependencies beyond Commons
components and the core Java platform
(at least Java 1.3 up to version 1.2
of the library, at least Java 5
starting with version 2.0 of the
library).
SuanShu has implemented the Active Set method to solve quadratic programming problem.
Examples are found here:
http://redmine.numericalmethod.com/projects/public/repository/entry/Examples/src/main/java/com/numericalmethod/suanshu/examples/QuadraticProgramming.java

Dataflow Programming API for Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking for a Dataflow / Concurrent Programming API for Java.
I know there's DataRush, but it's not free. What I'm interested in specifically is multicore data processing, and not distributed, which rules out MapReduce or Hadoop.
Any thoughts?
Thanks,
Rollo
You might try gpars; it apparently has implementations of data flow variables and streams in Java even though it is geared towards providing concurrent programming goodies for Groovy.
Might try the upcoming fork/join library which will (hopefully) be in Java 7 as part of the JSR 166y update.
Main project page:
- http://gee.cs.oswego.edu/dl/concurrency-interest/index.html
Pointers to lots of links about what it is:
- http://tech.puredanger.com/java7#jsr166
Does the built in Java concurrent package meet your needs? It's a very nice package, built in ThreadPools, CopyOnWriteCollections, Executors, Future. We use it to process large volumns of data in thread pools.
https://github.com/rfqu/df4j is simple but powerful dataflow library. If it lacks some desired features, they can be added easly. It can exploit java.concurrent.ExecutorService.

Categories

Resources