fmin is a JavaScript library designed for unconstrained numerical function minimization, offering implementations of several common optimization algorithms. These include the Nelder-Mead method, Gradient Descent, Wolf Line Search, and the Non-Linear Conjugate Gradient method. Currently at version 0.0.4, the package appears to be largely unmaintained; its last known commit was over eight years ago, indicating an abandoned status. While it originally differentiated itself by providing interactive visualizations and an accompanying blog post to explain the algorithms, these are external to the core npm package. Due to its very early development stage (sub-1.0 version) and prolonged inactivity, users should be aware of potential limitations regarding modern JavaScript compatibility, lack of TypeScript type definitions, and unoptimized performance compared to contemporary alternatives. The project has no clear release cadence, and development seems to have ceased.
npm install fminVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the Nelder-Mead algorithm to find the minimum of a simple 2D function, logging the solution and iterations.
Consider more actively maintained numerical optimization libraries for production systems. If used, thoroughly review the code and be prepared to fork or fix issues yourself.
Manual type declarations (`.d.ts` files) would need to be created, or explicit `any` types used, compromising type safety.
For performance-critical applications, evaluate contemporary optimization libraries that leverage modern JS features and optimization techniques.
Ensure proper module bundling (e.g., Webpack, Rollup) or use Node.js's CommonJS `require` syntax. For browser environments, ensure your code is bundled to resolve `require` calls.
Ensure you have `const fmin = require('fmin');` at the top of your CommonJS file, or that your bundler correctly handles the import in an ESM context.Verify that `const fmin = require('fmin');` correctly assigns the module's export to the `fmin` variable, and that the `nelderMead` function is indeed available as a property on it. Avoid named imports like `import { nelderMead } from 'fmin';` as it's not a named export.If in a pure ESM environment, you may need a bundler to process `require` statements or investigate dynamic `import()` if feasible. For browser usage, ensure your code is bundled to resolve `require` calls.
No dependency data recorded yet.