@hackage sgd0.8.0.2
Stochastic gradient descent library
Categories
License
BSD-3-Clause
Maintainer
waszczuk.kuba@gmail.com
Links
Versions
Installation
Dependencies (18)
- base >=4.7 && <5
- binary >=0.5 && <0.9
- bytestring >=0.9 && <0.11
- containers >=0.4 && <0.7
- data-default >=0.7 && <0.8
- deepseq >=1.3 && <1.5 Show all…
Dependents (9)
@hackage/crf-chain2-tiers, @hackage/acme-everything, @hackage/nerf, @hackage/crf-chain1, @hackage/concraft-hr, @hackage/concraft-pl, Show all…
Haskell stochastic gradient descent library
Stochastic gradient descent (SGD) is a method for optimizing a global objective function defined as a sum of smaller, differentiable functions. In each iteration of SGD the gradient is calculated based on a subset of the training dataset. In Haskell, this process can be simply represented as a fold over a of subsequent dataset subsets (singleton elements in the extreme).
However, it can be beneficial to select the subsequent subsets randomly (e.g.,
shuffle the entire dataset before each pass). Moreover, the dataset can be
large enough to make it impractical to store it all in memory. Hence, the
sgd library adopts a pipe-based
interface in which SGD takes the form of a process consuming dataset subsets
(the so-called mini-batches) and producing a stream of output parameter values.
The sgd library implements several SGD variants (SGD with momentum, AdaDelta,
Adam) and handles heterogeneous parameter representations (vectors, maps, custom
records, etc.). It can be used in combination with automatic differentiation
libraries (ad,
backprop), which can be used to
automatically calculate the gradient of the objective function.
Look at the hackage repository for a library documentation.