Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- linReg :: (KnownNat i, KnownNat o) => Model (Just (LRp i o)) Nothing (R i) (R o)
- logReg :: (KnownNat i, KnownNat o) => Model (Just (LRp i o)) Nothing (R i) (R o)
- data LRp (i :: Nat) (o :: Nat) = LRp {}
- lrAlpha :: forall i o. Lens' (LRp i o) (R o)
- lrBeta :: forall i o i. Lens (LRp i o) (LRp i o) (L o i) (L o i)
- runLRp :: (KnownNat i, KnownNat o, Reifies s W) => BVar s (LRp i o) -> BVar s (R i) -> BVar s (R o)
- reshapeLRpInput :: (ContGen d, PrimMonad m, KnownNat i, KnownNat i', KnownNat o) => d -> Gen (PrimState m) -> LRp i o -> m (LRp i' o)
- reshapeLRpOutput :: (ContGen d, PrimMonad m, KnownNat i, KnownNat o, KnownNat o') => d -> Gen (PrimState m) -> LRp i o -> m (LRp i o')
- expandLRpInput :: (PrimMonad m, ContGen d, KnownNat i, KnownNat j, KnownNat o) => LRp i o -> d -> Gen (PrimState m) -> m (LRp (i + j) o)
- expandLRpOutput :: (PrimMonad m, ContGen d, KnownNat i, KnownNat o, KnownNat p) => LRp i o -> d -> Gen (PrimState m) -> m (LRp i (o + p))
- premuteLRpInput :: (KnownNat i, KnownNat o) => Vector i' (Finite i) -> LRp i o -> LRp i' o
- permuteLRpOutput :: (KnownNat i, KnownNat o) => Vector o' (Finite o) -> LRp i o -> LRp i o'
- arima :: forall p d q. (KnownNat p, KnownNat d, KnownNat q) => Model (Just (ARIMAp p q)) (Just (ARIMAs p d q)) Double Double
- autoregressive :: KnownNat p => Model (Just (ARIMAp p 0)) (Just (ARIMAs p 0 0)) Double Double
- movingAverage :: KnownNat q => Model (Just (ARIMAp 0 q)) (Just (ARIMAs 0 0 q)) Double Double
- arma :: (KnownNat p, KnownNat q) => Model (Just (ARIMAp p q)) (Just (ARIMAs p 0 q)) Double Double
- data ARIMAp :: Nat -> Nat -> Type where
- data ARIMAs :: Nat -> Nat -> Nat -> Type where
- arimaPhi :: forall a b a. Lens (ARIMAp a b) (ARIMAp a b) (R a) (R a)
- arimaTheta :: forall a b b. Lens (ARIMAp a b) (ARIMAp a b) (R b) (R b)
- arimaConstant :: forall a b. Lens' (ARIMAp a b) Double
- arimaYPred :: forall a b c. Lens' (ARIMAs a b c) Double
- arimaYHist :: forall a b c a b. Lens (ARIMAs a b c) (ARIMAs a b c) (R ((+) a b)) (R ((+) a b))
- arimaEHist :: forall a b c c. Lens (ARIMAs a b c) (ARIMAs a b c) (R c) (R c)
Linear Regression
data LRp (i :: Nat) (o :: Nat) Source #
Linear Regression parameter
Instances
runLRp :: (KnownNat i, KnownNat o, Reifies s W) => BVar s (LRp i o) -> BVar s (R i) -> BVar s (R o) Source #
Reshape
reshapeLRpInput :: (ContGen d, PrimMonad m, KnownNat i, KnownNat i', KnownNat o) => d -> Gen (PrimState m) -> LRp i o -> m (LRp i' o) Source #
Reshape an LRp
to take more or less inputs. If more, new parameters
are initialized randomly according to the given distribution.
reshapeLRpOutput :: (ContGen d, PrimMonad m, KnownNat i, KnownNat o, KnownNat o') => d -> Gen (PrimState m) -> LRp i o -> m (LRp i o') Source #
Reshape an LRp
to return more or less outputs If more, new
parameters are initialized randomly according to the given distribution.
expandLRpInput :: (PrimMonad m, ContGen d, KnownNat i, KnownNat j, KnownNat o) => LRp i o -> d -> Gen (PrimState m) -> m (LRp (i + j) o) Source #
Adjust an LRp
to take extra inputs, initialized randomly.
Initial contributions to each output is randomized.
expandLRpOutput :: (PrimMonad m, ContGen d, KnownNat i, KnownNat o, KnownNat p) => LRp i o -> d -> Gen (PrimState m) -> m (LRp i (o + p)) Source #
Adjust an LRp
to return extra ouputs, initialized randomly
premuteLRpInput :: (KnownNat i, KnownNat o) => Vector i' (Finite i) -> LRp i o -> LRp i' o Source #
Premute (or remove) inputs
Removed inputs will simply have their contributions removed from each output.
permuteLRpOutput :: (KnownNat i, KnownNat o) => Vector o' (Finite o) -> LRp i o -> LRp i o' Source #
Premute (or remove) outputs
ARIMA
arima :: forall p d q. (KnownNat p, KnownNat d, KnownNat q) => Model (Just (ARIMAp p q)) (Just (ARIMAs p d q)) Double Double Source #
autoregressive :: KnownNat p => Model (Just (ARIMAp p 0)) (Just (ARIMAs p 0 0)) Double Double Source #
movingAverage :: KnownNat q => Model (Just (ARIMAp 0 q)) (Just (ARIMAs 0 0 q)) Double Double Source #
arma :: (KnownNat p, KnownNat q) => Model (Just (ARIMAp p q)) (Just (ARIMAs p 0 q)) Double Double Source #
data ARIMAp :: Nat -> Nat -> Type where Source #
ARIMA
parmaeters
ARIMAp | |
|
Instances
data ARIMAs :: Nat -> Nat -> Nat -> Type where Source #
ARIMA
state
ARIMAs | |
|