Fast and primitive based math library.
NOTE
Due to significant change in SMILE 2.x API I decided to remove ML namespaces: regression and classification. The ML functionality is now available in scicloj.ml
[generateme/fastmath "2.1.8"]
Important Note
Fastmath relies on SMILE 2.6.0 which relies on BLAS/LAPACK via MKL and/or OpenBlas. MKL (preferred) and OpenBlas are included as dependencies in fastmath
. This leads to addional 1GB of jar files. I can't assure that all functionalities will work on OpenBlas (see: #15) but 99% should. If you need fastmath
to be lighter, please exclude MKL from your path.
[generateme/fastmath "2.1.8" :exclusions [com.github.haifengl/smile-mkl]]
{:deps {generateme/fastmath {:mvn/version "2.1.8"
:exclusions [com.github.haifengl/smile-mkl]}}}
If you don't need certain interpolation or clustering methods you can exclude OpenBlas as well (be warned that other things can break):
:exclusions [com.github.haifengl/smile-mkl org.bytedeco/openblas]
When MKL is not available fastmath
(SMILE actually, here and here) will throw two exceptions with full stack traces about lack of MKL. You can safely ignore them.
[main] DEBUG smile.math.blas.LAPACK - Failed to create MKL instance:
java.lang.ClassNotFoundException: smile.math.blas.mkl.MKL
[...]
[main] DEBUG smile.math.blas.BLAS - Failed to create MKL instance:
java.lang.ClassNotFoundException: smile.math.blas.mkl.MKL
[...]
Based on SMILE 1.5.3 and including: regression and classification.
[generateme/fastmath "1.5.3"]
Code adopted from Zach Tellmans' library.
[* + - / > < >= <= == rem quot mod bit-or bit-and bit-xor bit-not bit-shift-left bit-shift-right unsigned-bit-shift-right inc dec zero? neg? pos? min max even? odd? bool-and bool-or bool-xor bool-not << >> >>> not==]
Most of them backed by Jafama FastMath 2.3.1 or Apache Commons Math 3.6.1
Vec2
), 3d (Vec3
) and 4d (Vec4
) vector types.With following groups of functions:
1d, 2d interpolations
Several easing functions (in, out, in-out)
Great collection (100+) of R^2->R^2 functions.
Gaussian Processes
Various clustering algorithms including K-Means++, DBSCAN, CLARANS, DENCLUE, MEC, Spectral, Deterministic Annealing
L-BFGS-B, Gradient, Nelder-Mead, Simplex, Powell, BOBYQA, CMAES, BayesianOptimizer
Hexagonal, squared, triangular, rhomboidal grid functions
Collection of various kernels (density, RBF, correlation)
Floating point operations with error bounds
Plenty of constant values
Almost all functions optimized to work with double
and long
primitives
Since this library is only JVM version, you can check following Clojure/ClojureScript libraries as replacement
Java classes are compiled for java 1.8
If you see place of improvement, I'm accepting PRs.
Copyright (c) 2020 generateme
Can you improve this documentation? These fine people already did:
tsulej, GenerateMe, genmeblog, generateme, teesel, Carsten Behring & Josef PospíšilEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close