fmin

WebJar for fmin

Лицензия

Лицензия

BSD 3-Clause
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

fmin
Последняя версия

Последняя версия

0.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

fmin
WebJar for fmin
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/benfred/fmin

Скачать fmin

Имя Файла Размер
fmin-0.0.2.pom
fmin-0.0.2.jar 63 KB
fmin-0.0.2-sources.jar 22 bytes
fmin-0.0.2-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/fmin/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>fmin</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/fmin/
implementation 'org.webjars.npm:fmin:0.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/fmin/
implementation ("org.webjars.npm:fmin:0.0.2")
'org.webjars.npm:fmin:jar:0.0.2'
<dependency org="org.webjars.npm" name="fmin" rev="0.0.2">
  <artifact name="fmin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='fmin', version='0.0.2')
)
libraryDependencies += "org.webjars.npm" % "fmin" % "0.0.2"
[org.webjars.npm/fmin "0.0.2"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.webjars.npm : tape jar [4.5.1,5)
org.webjars.npm : uglify-js jar [2.6.2,3)
org.webjars.npm : contour_plot jar [0.0.1,0.0.2)
org.webjars.npm » json2module jar [0.0.3,0.0.4)
org.webjars.npm : rollup jar [0.25.8,0.26)

Модули Проекта

Данный проект не имеет модулей.

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);

Версии библиотеки

Версия
0.0.2