All Projects → benfred → Fmin

benfred / Fmin

Licence: bsd-3-clause
Unconstrained function minimization in Javascript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Fmin

hyper-engine
Python library for Bayesian hyper-parameters optimization
Stars: ✭ 80 (-74.76%)
Mutual labels:  optimization-algorithms
ThrottleControlledAvionics
A mod for KerbalSaceProgram
Stars: ✭ 45 (-85.8%)
Mutual labels:  optimization-algorithms
vqf
Implementation of Variational Quantum Factoring algorithm.
Stars: ✭ 32 (-89.91%)
Mutual labels:  optimization-algorithms
FirstOrderSolvers.jl
Large scale convex optimization solvers in julia
Stars: ✭ 20 (-93.69%)
Mutual labels:  optimization-algorithms
simobility
simobility - light-weight mobility simulation framework. Best for quick prototyping
Stars: ✭ 29 (-90.85%)
Mutual labels:  optimization-algorithms
Nonlinear-Optimization-Algorithms
MATLAB implementations of a variety of nonlinear programming algorithms.
Stars: ✭ 86 (-72.87%)
Mutual labels:  optimization-algorithms
car-racing
A toolkit for testing control and planning algorithm for car racing.
Stars: ✭ 30 (-90.54%)
Mutual labels:  optimization-algorithms
ForBES
Generic and efficient MATLAB solver for nonsmooth optimization problems
Stars: ✭ 19 (-94.01%)
Mutual labels:  optimization-algorithms
procrustes
Python library for finding the optimal transformation(s) that makes two matrices as close as possible to each other.
Stars: ✭ 48 (-84.86%)
Mutual labels:  optimization-algorithms
RelevancyTuning
Dice.com tutorial on using black box optimization algorithms to do relevancy tuning on your Solr Search Engine Configuration from Simon Hughes Dice.com
Stars: ✭ 28 (-91.17%)
Mutual labels:  optimization-algorithms
a-tour-of-pytorch-optimizers
A tour of different optimization algorithms in PyTorch.
Stars: ✭ 46 (-85.49%)
Mutual labels:  optimization-algorithms
ai-n-queens
Solving and GUI demonstration of traditional N-Queens Problem using Hill Climbing, Simulated Annealing, Local Beam Search, and Genetic Algorithm.
Stars: ✭ 30 (-90.54%)
Mutual labels:  optimization-algorithms
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (-94.64%)
Mutual labels:  optimization-algorithms
rBAS
Implementation of the (beetle antennae search) BAS algorithm and its mutations in R code
Stars: ✭ 25 (-92.11%)
Mutual labels:  optimization-algorithms
dfogn
DFO-GN: Derivative-Free Optimization using Gauss-Newton
Stars: ✭ 20 (-93.69%)
Mutual labels:  optimization-algorithms
ML-Optimizers-JAX
Toy implementations of some popular ML optimizers using Python/JAX
Stars: ✭ 37 (-88.33%)
Mutual labels:  optimization-algorithms
FrankWolfe.jl
Julia implementation for various Frank-Wolfe and Conditional Gradient variants
Stars: ✭ 47 (-85.17%)
Mutual labels:  optimization-algorithms
Curvaturefilter
Curvature Filters are efficient solvers for Variational Models
Stars: ✭ 291 (-8.2%)
Mutual labels:  optimization-algorithms
Deep-Learning-Optimization-Algorithms
Visualization of various deep learning optimization algorithms using PyTorch automatic differentiation and optimizers.
Stars: ✭ 47 (-85.17%)
Mutual labels:  optimization-algorithms
qpmad
ROS-compatible Eigen-based Goldfarb-Idnani quadratic programming solver
Stars: ✭ 41 (-87.07%)
Mutual labels:  optimization-algorithms

fmin Build Status

Unconstrained function minimization in javascript.

This package implements some basic numerical optimization algorithms: Nelder-Mead, Gradient Descent, Wolf Line Search and Non-Linear Conjugate Gradient methods are all provided.

Interactive visualizations with D3 explaining how these algorithms work are also included in this package. Descriptions of the algorithms as well as most of the visualizations are available on my blog post An Interactive Tutorial on Numerical Optimization.

Installing

If you use NPM, npm install fmin. Otherwise, download the latest release.

API Reference

# nelderMead(f, initial)

Uses the Nelder-Mead method to minimize a function f starting at location initial.

Example usage minimizing the function f(x, y) = x2 + y2 + x sin y + y sin x is: nelder mead demo

function loss(X) {
    var x = X[0], y = X[1];
    return Math.sin(y) * x  + Math.sin(x) * y  +  x * x +  y *y;
}

var solution = fmin.nelderMead(loss, [-3.5, 3.5]);
console.log("solution is at " + solution.x);

# conjugateGradient(f, initial)

Minimizes a function using the Polak–Ribière non-linear conjugate gradient method . The function f should compute both the loss and the gradient.

An example minimizing Rosenbrock's Banana function is:

conjugate gradient demo

function banana(X, fxprime) {
    fxprime = fxprime || [0, 0];
    var x = X[0], y = X[1];
    fxprime[0] = 400 * x * x * x - 400 * y * x + 2 * x - 2;
    fxprime[1] = 200 * y - 200 * x * x;
    return (1 - x) * (1 - x) + 100 * (y - x * x) * (y - x * x);
}

var solution = fmin.conjugateGradient(banana, [-1, 1]);
console.log("solution is at " + solution.x);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].