🚀 Socket Launch Week 🚀 Day 4: Introducing Historical Analytics.Learn More
Socket
Sign inDemoInstall
Socket

ml-direct

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-direct

Direct - DIviding RECTangles optimization algorithm

0.0.1
Source
npm
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 31 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts