Copyright | (c) Alexander Ignatyev 2017 |
---|---|
License | BSD-3 |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
MachineLearning.Random
Description
Randon generation uitility functions.
- sample :: RandomGen g => g -> Int -> Vector a -> (Vector a, g)
- sampleM :: RandomGen g => Int -> Vector a -> Rand g (Vector a)
- getRandomRListM :: (RandomGen g, Random a) => Int -> (a, a) -> Rand g [a]
- getRandomRVectorM :: RandomGen g => Int -> (R, R) -> Rand g Vector
- getRandomRMatrixM :: RandomGen g => Int -> Int -> (R, R) -> Rand g Matrix
Documentation
sample :: RandomGen g => g -> Int -> Vector a -> (Vector a, g) Source #
Samples n
(given as a second parameter) values from list
(given as a third parameter).
sampleM :: RandomGen g => Int -> Vector a -> Rand g (Vector a) Source #
Samples n
(given as a second parameter) values from list
(given as a third parameter) inside RandomMonad.
Arguments
:: (RandomGen g, Random a) | |
=> Int | list's lengths |
-> (a, a) | range |
-> Rand g [a] | list of random values inside RandomMonad |
Returns a list of random values distributed in a closed interval range
Returns a vector of random values distributed in a closed interval range