-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Reservoir Computing, fast RNNs -- -- Please see the README on Github at -- https://github.com/masterdezign/rc#readme @package rc @version 0.1.0.0 module RC.Helpers -- | Prepend a row of ones -- --
--   >>> addBiases $ (2><3) [20..26]
--   (3><3)
--    [  1.0,  1.0,  1.0
--    , 20.0, 21.0, 22.0
--    , 23.0, 24.0, 25.0 ]
--   
addBiases :: Matrix Double -> Matrix Double randList :: (Random a, Floating a) => Int -> StdGen -> [a] -- | Random matrix with elements in the range of [minVal; maxVal] randMatrix :: StdGen -> (Int, Int) -> (Double, Double) -> Matrix Double -- | Random sparse matrix -- -- NB: at the moment, the matrix is stored in memory as an ordinary -- (dense) matrix. randSparse :: StdGen -> (Int, Int) -> (R, R) -> R -> Matrix R -- | Hard sigmoid hsigmoid :: (Fractional a, Ord a) => (a, a, a) -> a -> a module RC.NTC new :: StdGen -> NTCParameters -> (Int, Int, Int) -> NTC -- | Offline NTC training learn :: NTC -> Int -> Matrix Double -> Matrix Double -> Either String NTC predict :: NTC -> Int -> Matrix Double -> Either String (Matrix Double) -- | Default NTC parameters par0 :: NTCParameters data NTCParameters Par :: (Matrix Double -> Matrix Double) -> (Double, Double) -> (StdGen -> (Int, Int) -> (Double, Double) -> Matrix Double) -> (Matrix Double -> Matrix Double) -> Par -> NTCParameters -- | Modify data before masking (e.g. compression) [_preprocess] :: NTCParameters -> Matrix Double -> Matrix Double -- | Input weights (mask) range [_inputWeightsRange] :: NTCParameters -> (Double, Double) [_inputWeightsGenerator] :: NTCParameters -> StdGen -> (Int, Int) -> (Double, Double) -> Matrix Double -- | Modify data before training or prediction (e.g. add biases) [_postprocess] :: NTCParameters -> Matrix Double -> Matrix Double [_reservoirModel] :: NTCParameters -> Par -- | Model parameters data Par :: * -- | Mackey-Glass model (no external input) MackeyGlass :: Double -> Double -> Par [_beta] :: Par -> Double [_gamma] :: Par -> Double RC :: (Double -> Double) -> Double -> BandpassFiltering -> Par -- | Nonlinear transformation [_fnl] :: Par -> Double -> Double -- | External forcing weight [_rho] :: Par -> Double [_filt] :: Par -> BandpassFiltering -- | Bandpass filter (linear) parameters data BandpassFiltering :: * BandpassFiltering :: Double -> Double -> BandpassFiltering -- | System response time, s (epsilon = tau / tau_D) [_tau] :: BandpassFiltering -> Double -- | Integration time, s (delta = tau_D / theta) [_theta] :: BandpassFiltering -> Double