Giter Site home page Giter Site logo

adawhatever's Introduction

adawhatever

A collection of various stochastic gradient descent (SGD) solvers implemented in MATLAB:

  • Vanilla SGD
  • AdaGrad (vanilla / with decay)
  • Adadelta
  • Adam
  • Adamax

Introduction

Stochastic gradient descent is a state of the art optimisation method in machine learning. It suits the concept of learning on many data points very well and outperforms many theoretically superior second-order methods.

All fancy SGD solvers are readily available in every machine learning framework, e.g. Lasagne. However, machine learning usage is not the goal of this repo. Instead, it attempts to facilitate transfer of novel algorithms from machine learning to other, mostly engineering, applications. These communities tend to speak MATLAB and not Python; this motivates the language choice.

Furthermore, 'classic' optimisation terms are used instead of machine learning lingo, e.g.:

  • learning rate -> step size
  • parameters -> decision variables
  • hyperparameters ~ solver parameters

How to use it

All solvers require the stochastic gradient of the objective sg, initial value of the decision variables x0, number of iterations nIter and the indices of the stochastic gradient that should be used at each iteration idxSG. Furthermore, each solver requires its specific solver parameters. See MATLAB documentation and references for further details.

The solver function returns a matrix with the i-th guess of the decision variables in the i+1-th column (first column contains x0).

A typical solver calling script would look like this:

gs = @(idx, x) <stochastic gradient function>;
x0 = <initial decision variables guess>;
nIter = <number of iterations>;
idxSG = randi(<max index of the stochastic gradient>, 1, nIter);

xMat = <solver>(gs, x0, nIter, idxSG, <solver parameter 1>, ..., <solver parameter N>);

See also the test files for usage examples.

adawhatever's People

Contributors

mp4096 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.