Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ml-direct

NPM version npm download

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

API Documentation

License

MIT

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
You can’t perform that action at this time.