Divooka Reference

Sample Data

7 nodes

On this page 7

Add Noise

Function

A noisy version of some numbers: each plus random normal noise, as measurements of a true value would be.

Signature
AddNoise(values: Vector, noise: Number, seed: Integer) -> Vector
DivookaTensor1D AddNoise(
    DivookaTensor1D values,
    double noise = 1,
    int seed = 1)

Parameters

nametypedefaultdescription
valuesVector—The true values.
noiseNumber1The noise's standard deviation.
seedInteger1The same seed always gives the same noise.

Returns

VectorVector
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Dates

Function

Dates a fixed number of days apart.

Signature
Dates -> Date & Time Array
    start: Date & Time
    count: Integer
    daysApart: Number
DateTime[] Dates(
    DateTime start,
    int count = 30,
    double daysApart = 1)

Parameters

nametypedefaultdescription
startDate & Time—The first date.
countInteger30How many dates.
daysApartNumber1The days between one date and the next.

Returns

DatesDate & Time Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Evenly Spaced

Function

Numbers evenly spaced from one value to another, both ends included.

Signature
EvenlySpaced(from: Number, to: Number, count: Integer) -> Vector
DivookaTensor1D EvenlySpaced(
    double from = 0,
    double to = 1,
    int count = 100)

Parameters

nametypedefaultdescription
fromNumber0The first number.
toNumber1The last number.
countInteger100How many numbers.

Returns

VectorVector
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Normal Sample

Function

Random numbers from a normal (bell-curve) distribution.

Signature
NormalSample -> Vector
    count: Integer
    mean: Number
    deviation: Number
    seed: Integer
DivookaTensor1D NormalSample(
    int count = 200,
    double mean = 0,
    double deviation = 1,
    int seed = 1)

Parameters

nametypedefaultdescription
countInteger200How many numbers.
meanNumber0The distribution's middle.
deviationNumber1Its standard deviation: how widely the numbers spread.
seedInteger1The same seed always gives the same numbers.

Returns

VectorVector
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Peaks Surface

Function

A smooth surface with two peaks and a pit - the function MATLAB calls peaks - sampled on a square grid from -3 to 3 each way, for heat maps and contour maps.

Signature
PeaksSurface(size: Integer) -> Vector Array
DivookaTensor1D[] PeaksSurface(int size = 40)

Parameters

nametypedefaultdescription
sizeInteger40How many samples along each side.

Returns

RowsVector Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Random Walk

Function

A random walk: each value the last plus a random step, like a price over time.

Signature
RandomWalk -> Vector
    count: Integer
    start: Number
    step: Number
    drift: Number
    seed: Integer
DivookaTensor1D RandomWalk(
    int count = 100,
    double start = 100,
    double step = 1,
    double drift = 0,
    int seed = 1)

Parameters

nametypedefaultdescription
countInteger100How many values.
startNumber100The first value.
stepNumber1The typical size of a step.
driftNumber0How much each step leans up (positive) or down (negative).
seedInteger1The same seed always gives the same walk.

Returns

VectorVector
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics

Uniform Sample

Function

Random numbers spread evenly between two values.

Signature
UniformSample -> Vector
    count: Integer
    min: Number
    max: Number
    seed: Integer
DivookaTensor1D UniformSample(
    int count = 200,
    double min = 0,
    double max = 1,
    int seed = 1)

Parameters

nametypedefaultdescription
countInteger200How many numbers.
minNumber0The lowest possible number.
maxNumber1The highest possible number.
seedInteger1The same seed always gives the same numbers.

Returns

VectorVector
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Sample Data
Package
Data Analytics