Component

# Randomizer

Generates numeric matrices filled with random values. Several random distributions are supported.

Version 1.0 tools Analysis Kristian Ovaska (kristian.ovaska@helsinki.fi) View/Report issues R component.xml Randomizer.r Example with default values

## Outputs

Name Type Description
out Matrix Matrix of generated random numbers.

## Parameters

Name Type Default Description
columnNamePattern string "Column%d" Printf-like pattern for generating column names in the result. The pattern is evaluated using the current column number as an integer parameter, accessible using %d.
columns int (no default) Number of columns in the result.
distribution string "uniform" Distribution from which random numbers are fetched. Valid values are "uniform", "normal", "exponential" and "poisson".
firstColumn string "RowName" Name of first column; this is the first cell in the matrix.
max float 1 For the uniform distribution, this is the maximum possible generated value. Not used for other distributions.
mean float 0 For normal, exponential and poisson distributions, this gives the expected value of the generated values. For exponential, this is the inverse of rate. For poisson, this is lambda. Not used for the uniform distribution.
min float 0 For the uniform distribution, this is the minimum possible generated value. Not used for other distributions.
rowNamePattern string "Row%d" Printf-like pattern for generating row names in the result. The pattern is evaluated using the current row number as an integer parameter, accessible using %d.
rows int (no default) Number of rows in the result.
sd float 1 For the normal distribution, this is the standard deviation of generated values. Not used for other distributions.

## Test cases

Test case Parameters OUT
out
case01_uniform properties out

columns=3,
rows=5,
columnNamePattern=MyColumn%d,
rowNamePattern=MyRow%d,
firstColumn=MyRowName

case02_normal properties out

columns=3,
rows=5,
columnNamePattern=MyColumn%d,
rowNamePattern=MyRow%d,
firstColumn=MyRowName,
distribution=normal

case03_exp properties out

columns=3,
rows=5,
distribution=exponential,
mean=5,
min=0.1,
max=3

case04_poisson properties out

columns=3,
rows=5,
columnNamePattern=MyColumn%d,
rowNamePattern=MyRow%d,
firstColumn=MyRowName,
distribution=poisson,
mean=10

Generated 2019-02-08 07:42:19 by Anduril 2.0.0