Giter VIP home page Giter VIP logo

optimize.js's Introduction

optimize.js

This kind of optimization. Not that.

This was ported from the scipy.optimize and we seem to be about an order of magnitude faster than the Python version but that hasn't been too well tested.

Usage

To optimize some dumb function, just run

my_function = function (x) {
    return optimize.vector.dot(x, x);
};
xopt = optimize.fmin(my_function, [5.0, -3.4, 1.7, 16.3, 0.17]);

And this should say something like:

Converged in 349 iterations.
Function value = 3.954810202072493e-7

And xopt should end up being something like

[-0.0003993727670733724, -0.00027257793115893254, -0.0003811443958917447, 0.00012560283306980614, 0.00002523018782488204]

You can also include some options as follows:

xopt = optimize.fmin(my_function, [5.0, -3.4, 1.7, 16.3, 0.17], {ftol: 1e-7, maxiter: 1000});

To Do

  • Write tests.
  • Implement some better algorithms.
  • Make some demos.

optimize.js's People

Contributors

dfm avatar

Watchers

James Cloos avatar Sanchit Aggarwal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.