Anyone know of an equivalent to (at least part of) scipy.optimize implemented in javascript? I'm trying to fit various distributions (e.g. skew normal) to quantiles, but I've needed an optimization library before.
I recently ported the derivative-free non-linear constrained optimization code COBYLA2 to Java, and Reinhard Oldenburg at the University of Frankfurt in his turn converted this code into Javascript. The Javascript code, together with a self explanatory test HTML file, can be downloaded here.
Here is an Observable notebook that implements nonlinear regression with bounds in JavaScript. The modified ''fminsearch.js'' function used in this notebook is based on the original implementation by Jonas Almeida, which can be found on GitHub.
You can explore the notebook at the following link: https://observablehq.com/@christophe-yamahata/nonlinear-regression-with-bounds-in-javascript
For comparison, the above URL also provides a Python script that uses least squares optimization from the SciPy library.
© 2022 - 2025 — McMap. All rights reserved.