Ahoy and Servus, Everyone.
I’m happy to announce the first release (v0.1.0-alpha) of FSML (Fortran Statistics and Machine Learning). Some notes below:
Summary
FSML is a toolkit for statistical and machine learning (ML) procedures, including basic statistics (e.g., correlation), hypothesis tests (e.g., Mann–Whitney U, ANOVA), linear parametric methods and models (e.g., multiple OLS regression, discriminant analysis), and non-linear statistical and ML procedures (e.g., k-means clustering). There are more procedures (esp. on the ML side) that I plan to rework and include, but integrating those requires a little more care and thought.
To make it more accessible to contributors, students, researchers, and other users, it is kept relatively simple (KISS), overengineering is avoided, requirements are minimal (stdlib for linalg, and fpm for building/distributing), and much of the API should look familiar to those used to popular packages for other languages (Python and R). Several of my students with no prior Fortran experience were able to use it already (with only the FSML docs pages and the fortran-lang.org tutorials). Ultimately, I hope LFortran’s interactivity will lower the barrier for adoption of the lib and ultimately of Fortran, because I see a lot of potential for Fortran in ML.
Some Background
After discovering the growing online Fortran community, stdlib, fpm, LFortran and other great projects, I had decided to rework parts of my personal statistics and ML Fortran research library (that grew organically over the past ~15 years), clean it up, and open it up to everyone. I replaced standalone LAPAPCK with stdlib, moved from Makefiles to fpm, added, improved and homogenised some things here and there, and also test it with LFortran (hence the couple of bug reports).
Code and Docs
The code can be found here, and its documentation (with Handbook and API doc pages) can be found on fsml.mutz.science. It’s MIT licenced, so it’s compatible with Fortran-lang projects, and the API documentation follows a similar style as Fortran-lang stdlib (so it would be less work to add some FSML code to new stdlib stats modules, for example).
JOSS Paper
The associated paper was just published in JOSS (Journal of Open Source Software). A “thank you” goes out to the editor (J. Atkinson) and reviewers (@ivanpribec and M. A. Kowalski) for their time and effort. Generally, having Fortran better represented in the publication landscape may help with its promotion, so why not. ![]()
Blog Post
I also published a blog post to provide a little more context, notes on some design choices, and where I see it fit into the Fortran statistics/machine learning ecosystem. (I migrated my academic website to quarto and decided to include a blog - thanks for giving me the idea, @loiseaujc! I also took the liberty to cite you, @certik et al. about LFortran, and @jorgeg.)