Safe Haskell | Safe |
---|

- data Ogdstate v x = Ogdstate Int (v x)
- newtype Lambda x = Lambda x
- predictReg :: (Metric v, Floating x) => Ogdstate v x -> v x -> x
- fitRidge :: (Metric v, Ord x, Floating x) => LearningRate x -> Lambda x -> FitReg v x
- initialOGDState :: (Additive v, Floating x) => v x -> Ogdstate v x
- squaredRate :: Floating x => x -> LearningRate x
- fixedRate :: Floating x => x -> LearningRate x
- type LearningRate x = Floating x => Int -> x
- type FitReg v x = Ogdstate v x -> v x -> x -> Ogdstate v x

# Documentation

Algorithm state for OGD. Encodes both the round count and the last action w.

Ogdstate Int (v x) |

predictReg :: (Metric v, Floating x) => Ogdstate v x -> v x -> x Source #

Prediction function

fitRidge :: (Metric v, Ord x, Floating x) => LearningRate x -> Lambda x -> FitReg v x Source #

Online ridge regressor via OGD.

initialOGDState :: (Additive v, Floating x) => v x -> Ogdstate v x Source #

Helper. Builds an initial state for `ogd`

.

squaredRate :: Floating x => x -> LearningRate x Source #

Inverse squared learning rate.

fixedRate :: Floating x => x -> LearningRate x Source #

Fixed learning rate.

type LearningRate x = Floating x => Int -> x Source #

Learning Rate.