-- 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.1
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
-- | Nonlinear transient computing
--
-- This module was developed as a part of author's PhD project:
-- https://www.researchgate.net/project/Theory-and-Modeling-of-Complex-Nonlinear-Delay-Dynamics-Applied-to-Neuromorphic-Computing
module RC.NTC
-- | Creates an untrained NTC network
new :: StdGen -> NTCParameters -> (Int, Int, Int) -> NTC
-- | NTC training: learn the readout weights offline
learn :: NTC -> Int -> Matrix Double -> Matrix Double -> Either String NTC
-- | Run prediction using a "clean" (uninitialized) reservoir and then
-- forget the reservoir's state. This can be used for both forecasting
-- and classification tasks.
predict :: NTC -> Int -> Matrix Double -> Either String (Matrix Double)
-- | Default NTC parameters
par0 :: NTCParameters
-- | Customizable NTC parameters
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