Package Exports
- ml-direct
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-direct) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ml-direct
Direct - DIviding RECTangles algorithm.
The algorithm is intended to minimize real valued multivariate scalar fields over a hyper-rectangular region of N, theoretically the only prerequisite to achieve convergence is that the function must be continuous in the domain or at least continuous over a neighborhood of the global minimum.
A tool for global optimization of real valued functions .
Installation
$ npm i ml-direct
Usage
import direct from 'ml-direct';
const options = {
iterations: 25,
};
const lowerBoundaries = [-5, 3];
const upperBoundaries = [4, -2];
const quadratic = function (x) {
let result = 0;
for (let i = 0; i < x.length; i++) {
result += Math.pow(x[i], 2);
}
return result;
};
const predicted = Direct(
quadratic,
lowerBoundaries,
upperBoundaries,
options,
);
// predicted.minFunctionValue = 0
// Array.from(predicted.optimum[0]) = [0, 0];