mltool-0.2.0.1: Machine Learning Toolbox

Copyright(c) Alexander Ignatyev 2017
LicenseBSD-3
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

MachineLearning.Random

Description

Randon generation uitility functions.

Synopsis

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.

getRandomRListM Source #

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

getRandomRVectorM Source #

Arguments

:: RandomGen g 
=> Int

vector's length

-> (R, R)

range

-> Rand g Vector 

Returns a vector of random values distributed in a closed interval range

getRandomRMatrixM Source #

Arguments

:: RandomGen g 
=> Int

number of rows

-> Int

number of columns

-> (R, R)

range

-> Rand g Matrix 

Returns a matrix of random values distributed in a closed interval range