Stream Evaluator Reference

Stream evaluators are different then stream sources or stream decorators. Both
stream sources and stream decorators return streams of tuples. Stream evaluators are more like
a traditional function that evaluates its parameters and
returns an result. That result can be a single value, array, map or other structure.

Stream evaluators can be nested so that the output of an evaluator becomes the input
for another evaluator.

Stream evaluators can be called in different contexts. For example a stream evaluator
can be called on its own or it can be called within the context of a streaming expression.

abs

The abs function will return the absolute value of the provided single parameter. The abs function will fail to execute if the value is non-numeric. If a null value is found then null will be returned as the result.

abs Parameters

Field Name | Raw Number | Number Evaluator

abs Syntax

The expressions below show the various ways in which you can use the abs evaluator. Only one parameter is accepted. Returns a numeric value.

abs(1) // 1, not really a good use case for it
abs(-1) // 1, not really a good use case for it
abs(add(fieldA,fieldB)) // absolute value of fieldA + fieldB
abs(fieldA) // absolute value of fieldA

acos

The acos function returns the trigonometric arccosine of a number.

acos Parameters

Field Name | Raw Number | Number Evaluator: The value to return the arccosine of.

acos Syntax

acos(100.4) // returns the arccosine of 100.4
acos(fieldA) // returns the arccosine for fieldA.
if(gt(fieldA,fieldB),sin(fieldA),sin(fieldB)) // if fieldA > fieldB then return the arccosine of fieldA, else return the arccosine of fieldB

add

The add function will take 2 or more numeric values and add them together. The add function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.

add Parameters

Field Name | Raw Number | Number Evaluator

Field Name | Raw Number | Number Evaluator

…​…​

Field Name | Raw Number | Number Evaluator

add Syntax

The expressions below show the various ways in which you can use the add evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.

analyze

The analyze function analyzes text using a Lucene/Solr analyzer and returns a list of tokens
emitted by the analyzer. The analyze function can be called on its own or within the
select and cartesianProduct streaming expressions.

analyze Parameters

Field Name | Raw Text: Either the field in a tuple or the raw text to be analyzed.

Analyzer Field Name: The field name of the analyzer to use to analyze the text.

analyze Syntax

The expressions below show the various ways in which you can use the analyze evaluator.

Analyze the raw text: analyze("hello world", analyzerField)

Analyze a text field within a select expression. This will annotate tuples with the output of the analyzer: select(expr, analyze(textField, analyzerField) as outField)

Analyze a text field with a cartesianProduct expression. This will stream each token emitted by the analyzer in its own tuple: cartesianProduct(expr, analyze(textField, analyzer) as outField)

and

The and function will return the logical AND of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.

and Parameters

Field Name | Raw Boolean | Boolean Evaluator

Field Name | Raw Boolean | Boolean Evaluator

…​…​

Field Name | Raw Boolean | Boolean Evaluator

and Syntax

The expressions below show the various ways in which you can use the and evaluator. At least two parameters are required, but there is no limit to how many you can use.

ceil

The ceil function rounds a decimal value to the next highest whole number.

ceil Parameters

Field Name | Raw Number | Number Evaluator: The decimal to round up.

ceil Syntax

The expressions below show the various ways in which you can use the ceil evaluator.

ceil(100.4) // returns 101.
ceil(fieldA) // returns the next highest whole number for fieldA.
if(gt(fieldA,fieldB),ceil(fieldA),ceil(fieldB)) // if fieldA > fieldB then return the ceil of fieldA, else return the ceil of fieldB.

col

The col function returns a numeric array from a list of Tuples. The col
function is used to create numeric arrays from stream sources.

col Parameters

list of Tuples

field name: The field to create the array from.

col Syntax

col(tupleList, fieldName)

colAt

The colAt function returns the column of a matrix at a specific index as a numeric array.

colAt Parameters

matrix: the matrix to operate on

integer: the index of the column to return

colAt Syntax

colAt(matrix, 10)

colAt Returns

numeric array : the column of the matrix

columnCount

The columnCount function returns the number of columns in a matrix.

columnCount Parameters

matrix: the matrix to operate on

columnCount Syntax

columnCount(matrix)

columnCount Returns

integer : number columns in the matrix.

constantDistribution

The constantDistribution function returns a constant probability distribution based on its parameter.
This function is part of the probability distribution framework and is designed to
work with the sample and cumulativeProbability functions.

When sampled the constant distribution always returns its constant value.

cosineSimilarity Parameters

cosineSimilarity Returns

cosineSimilarity Syntax

cov

The cov function returns the covariance of two numeric array or the covariance matrix for matrix.

cov Parameters

numeric array: The first numeric array

numeric array: The second numeric array

OR

matrix: The matrix to compute the covariance matrix from. Note that covariance is computed between the columns in the matrix.

cov Syntax

cov(numericArray, numericArray) // Computes the covariance of a two numeric arrays
cov(matrix) // Computes the covariance matrix for the matrix.

cov Returns

number | matrix: Either the covariance or covariance matrix.

cumulativeProbability

The cumulativeProbability function returns the cumulative probability of a random variable within a
probability distribution. The cumulative probability is the total probability of
all random variables less then or equal to a random variable.

cumulativeProbability Parameters

probability distribution

number: Value to compute the probability for.

cumulativeProbability Returns

A double: the cumulative probability.

cumulativeProbability Syntax

cumulativeProbability(normalDistribution(500, 25), 502) // Returns the cumulative probability of the random sample 502 in a normal distribution with a mean of 500 and standard deviation of 25.

derivative

The derivative function returns the derivative of a function. The derivative function
can compute the derivative of the spline function and the loess function. The derivative can also
take the derivative of a derivative.

This function is designed to work with continuous data. To build a distribution from
a discrete data set use the enumeratedDistribution.

empiricalDistribution Parameters

numeric array: empirical observations

empiricalDistribution Returns

A probability distribution function.

empiricalDistribution Syntax

empiricalDistribution(numericArray)

enumeratedDistribution

The enumeratedDistribution function returns a discrete probability distribution function based
on an actual data set or a pre-defined set of data and probabilities.
This function is part of the probability distribution framework and is designed to
work with the sample, probability and cumulativeProbability functions.

The enumeratedDistribution can be called in two different scenarios:

1) Single array of discrete values. This works like an empirical distribution for
discrete data.

2) An array of singleton discrete values and an array of double values representing
the probabilities of the discrete values.

This function is designed to work with discrete data. To build a distribution from
a continuous data set use the empiricalDistribution.

enumeratedDistribution Parameters

enumeratedDistribution Returns

A probability distribution function.

enumeratedDistribution Syntax

enumeratedDistribution(integerArray) // This creates an enumerated distribution from the observations in the numeric array.
enumeratedDistribution(array(1,2,3,4), array(.25,.25,.25,.25)) // This creates an enumerated distribution with four discrete values (1,2,3,4) each with a probability of .25.

eor

The eor function will return the logical exclusive or of at least two boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.

eor Parameters

Field Name | Raw Boolean | Boolean Evaluator

Field Name | Raw Boolean | Boolean Evaluator

…​…​

Field Name | Raw Boolean | Boolean Evaluator

eor Syntax

The expressions below show the various ways in which you can use the eor evaluator. At least two parameters are required, but there is no limit to how many you can use.

eor(true,fieldA) // true iff fieldA is false
eor(fieldA,fieldB) // true iff either fieldA or fieldB is true but not both
eor(eq(fieldA,fieldB),eq(fieldC,fieldD)) // true iff either fieldA == fieldB or fieldC == fieldD but not both

eq

The eq function will return whether all the parameters are equal, as per Java’s standard equals(…​) function. The function accepts parameters of any type, but will fail to execute if all the parameters are not of the same type. That is, all are Boolean, all are String, or all are Numeric. If any any parameters are null and there is at least one parameter that is not null then false will be returned. Returns a boolean value.

eq Parameters

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

…​…​

Field Name | Raw Value | Evaluator

eq Syntax

The expressions below show the various ways in which you can use the eq evaluator.

geometricDistribution Parameters

geometricDistribution Syntax

geometricDistribution(.5) // Creates a geometric distribution with probability of .5

geometricDistribution Returns

A probability distribution function

getAttribute

The getAttribute function returns an attribute from a matrix by its key. Any function that returns a matrix can
also set attributes on the matrix with additional information. The setAttribute function can also be used
to set attributes on a matrix. The key to an attribute is always a string. The value of attribute can be any object
including numerics, arrays, maps, matrixes etc…​

getAttribute Parameters

matrix : The matrix to set the attribute on

string : The key for the attribute

getAttribute Syntax

getAttribute(matrix, key)

getAttribute Returns

object : any object

getAttributes

The getAttributes function returns the attribute map from matrix. See the getAttribute function for more details
on attributes.

getAttributes Parameters

matrix : The matrix to retrieve the attribute map from.

getAttributes Syntax:

getAttributes(matrix)

getAttributes Returns

map : The map of attributes.

getColumnLabels

The getColumnLabels function returns the columns labels of a matrix. The column labels can be optionally
set by any function that returns a matrix. The column labels can also be set via the setColumnLabels function.

getColumnLabels Parameters

matrix: The matrix to return the column labels of.

getColumnLabels Syntax

getColumnLabels(matrix)

getColumnLabels Returns

string array : The labels for each column in the matrix

getRowLabels

The getRowLabels function returns the row labels of a matrix. The row labels can be optionally
set by any function that returns a matrix. The row labels can also be set via the setRowLabels function.

getRowLabels Parameters

matrix: The matrix to return the row labels from.

getRowLabels Syntax

getRowLabels(matrix)

getRowLabels Returns

string array : The labels for each row in the matrix

getValue

The getValue function returns the value of a single Tuple entry by key.

getValue Parameters

tuple: The Tuple to return the entry from.

key: The key of the entry to return the value for.

getValue Syntax

getValue(tuple, key)

getValue Returns

object: Returns an object of the same type as the Tuple entry.

grandSum

The grandSum function sums all the values in a matrix.

grandSum Parameters

matrix: The matrix to operate on.

grandSum Syntax

grandSum(matrix)

grandSum Returns

number: the sum of all the values in the matrix.

gt

The gt function will return whether the first parameter is greater than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.

gt Parameters

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

gt Syntax

The expressions below show the various ways in which you can use the gt evaluator.

gteq

The gteq function will return whether the first parameter is greater than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.

gteq Parameters

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

gteq Syntax

The expressions below show the various ways in which you can use the gteq evaluator.

hist

The hist function creates a histogram from a numeric array. The hist function is designed
to work with continuous variables.

hist Parameters

numeric array

bins: The number of bins in the histogram. Each returned tuple contains
summary statistics for the observations that were within the bin.

hist Syntax

hist(numericArray, bins)

hsin

The hsin function returns the trigonometric hyperbolic sine of a number.

hsin Parameters

Field Name | Raw Number | Number Evaluator: The value to return the hyperbolic sine of.

hsin Syntax

hsin(100.4) // returns the hsine of 100.4
hsin(fieldA) // returns the hsine for fieldA.
if(gt(fieldA,fieldB),sin(fieldA),sin(fieldB)) // if fieldA > fieldB then return the hsine of fieldA, else return the hsine of fieldB

if

The if function works like a standard conditional if/then statement. If the first parameter is true, then the second parameter will be returned, else the third parameter will be returned. The function accepts a boolean as the first parameter and anything as the second and third parameters. An error will occur if the first parameter is not a boolean or is null.

if Parameters

Field Name | Raw Value | Boolean Evaluator

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

if Syntax

The expressions below show the various ways in which you can use the if evaluator.

integrate Parameters

integrate Syntax

integrate Returns

numeric : The integral

length

The length function returns the length of a numeric array.

length Parameters

numeric array

length Syntax

length(numericArray)

loess

The leoss function is a smoothing curve fitter which uses a local regression algorithm.
Unlike the spline function which touches each control point, the loess function puts a smooth curve through
the control points without having to touch the control points. The loess result can be used by the derivative function to produce smooth derivatives from
data that is not smooth.

loess Positional Parameters

numeric array: (Optional) x values. If omitted a sequence will be created for the x values.

numeric array: y values

loess Named Parameters

bandwidth: (Optional) The percent of the data points to use when drawing the local regression line, defaults to .25. Decreasing the bandwidth increases the number of curves that loess can fit.

robustIterations: (Optional) The number of iterations used to smooth outliers, defaults to 2.

loess Syntax

loess(yValues) // This creates the xValues automatically and fits a smooth curve through the data points.
loess(xValues, yValues) // This will fit a smooth curve through the data points.
loess(xValues, yValues, bandwidth=.15) // This will fit a smooth curve through the data points using 15 percent of the data points for each local regression line.

loess Returns

function: The function can be treated as both a numeric array of the smoothed data points and function.

log

The log function will return the natural log of the provided single parameter. The log function will fail to execute if the value is non-numeric. If a null value is found, then null will be returned as the result.

log Parameters

Field Name | Raw Number | Number Evaluator

log Syntax

The expressions below show the various ways in which you can use the log evaluator. Only one parameter is accepted. Returns a numeric value.

kolmogorovSmirnov Parameters

kolmogorovSmirnov Returns

result tuple : A tuple containing the p-value and d-statistic for the test result.

kolmogorovSmirnov Syntax

kolmogorovSmirnov(normalDistribution(10, 2), sampleSet)

lt

The lt function will return whether the first parameter is less than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.

lt Parameters

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

lt Syntax

The expressions below show the various ways in which you can use the lt evaluator.

lteq

The lteq function will return whether the first parameter is less than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.

lteq Parameters

Field Name | Raw Value | Evaluator

Field Name | Raw Value | Evaluator

lteq Syntax

The expressions below show the various ways in which you can use the lteq evaluator.

markovChain

The markovChain function can be used to perform Markov Chain simulations.
The markovChain function takes as its parameter a transition matrix and
returns a mathematical model that can be sampled using the sample function. Each sample taken
from the Markov Chain represents the current state of system.

markovChain Parameters

matrix: Transition matrix

markovChain Syntax

sample(markovChain(transitionMatrix), 5) // This creates a Markov Chain given a specific transition matrix. The sample function takes 5 samples from the Markov Chain, representing the next five states of the system.

markovChain Returns

Markov Chain model: The Markoff Chain model can be used with sample function.

matrix

The matrix function returns a matrix which can be operated on by functions that support matrix operations.

matrix Parameters

numeric array …​: One or more numeric arrays that will be the rows of the matrix.

matrix Syntax

matrix Returns

meanDifference

The meanDifference function calculates the mean of the differences following the element-by-element subtraction between two numeric arrays.

meanDifference Parameters

numeric array

numeric array

meanDifference Returns

A numeric.

meanDifference Syntax

meanDifference(numericArray, numericArray)

minMaxScale

The minMaxScale function scales numeric arrays within a minimum and maximum value.
By default minMaxScale scales between 0 and 1. The minMaxScale function can operate on
both numeric arrays and matrices.

When operating on a matrix the minMaxScale function operates on each row of the matrix.

minMaxScale Parameters

numeric array | matrix: The array or matrix to scale

double: (Optional) The min value. Defaults to 0.

double: (Optional) The max value. Defaults to 1.

minMaxScale Syntax

minMaxScale(numericArray) // scale a numeric array between 0 and 1
minMaxScale(numericArray, 0, 100) // scale a numeric array between 1 and 100
minMaxScale(matrix) // Scale each row in a matrix between 0 and 1
minMaxScale(matrix, 0, 100) // Scale each row in a matrix between 0 and 100

minMaxScale Returns

A numeric array or matrix

mod

The mod function returns the remainder (modulo) of the first parameter divided by the second parameter.

mod Parameters

Field Name | Raw Number | Number Evaluator: Parameter 1

Field Name | Raw Number | Number Evaluator: Parameter 2

mod Syntax

The expressions below show the various ways in which you can use the mod evaluator.

mod(100,3) // returns the remainder of 100 / 3 .
mod(100,fieldA) // returns the remainder of 100 divided by the value of fieldA.
mod(fieldA,1.4) // returns the remainder of fieldA divided by 1.4.
if(gt(fieldA,fieldB),mod(fieldA,fieldB),mod(fieldB,fieldA)) // if fieldA > fieldB then return the remainder of fieldA/fieldB, else return the remainder of fieldB/fieldA.

monteCarlo Returns

monteCarlo Syntax

In the expression above the monteCarlo function is running the function add(sample(a), sample(b))
1000 times and returning the result. Each time the function is run samples are drawn from the
probability distributions stored in variables a and b.

movingAvg

The movingAvg function calculates a moving average over an array of numbers.

movingAvg Parameters

numeric array

window size

movingAvg Returns

A numeric array. The first element of the returned array will start from the windowSize-1 index of the original array.

movingAvg Syntax

movingAverage(numericArray, 30)

movingMedian

The movingMedian function calculates a moving median over an array of numbers.

movingMedian Parameters

numeric array

window size

movingMedian Returns

A numeric array. The first element of the returned array will start from the windowSize-1 index of the original array.

movingMedian Syntax

movingMedian(numericArray, 30)

mult

The mult function will take two or more numeric values and multiply them together. The mult function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.

mult Parameters

Field Name | Raw Number | Number Evaluator

Field Name | Raw Number | Number Evaluator

…​…​

Field Name | Raw Number | Number Evaluator

mult Syntax

The expressions below show the various ways in which you can use the mult evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.

olsRegress

The olsRegress function returns a single Tuple containing the regression model with estimated regression parameters, RSquared and regression diagnostics.

The output of olsRegress can be used with the predict function to predict values based on the regression model.

olsRegress Parameters

matrix: The regressor observation matrix. Each row in the matrix represents a single multi-variate regressor observation. Note that there is no need to add an initial unitary column (column of 1’s) when specifying a model including an intercept term, this column will be added automatically.

numeric array: The outcomes array which matches up with each row in the regressor observation matrix.

olsRegress Syntax

olsRegress(matrix, numericArray) // This performs the olsRegression analysis on given regressor matrix and outcome array.

olsRegress Returns

Tuple: The regression model including the estimated regression parameters and diagnostics.

or

The or function will return the logical OR of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.

or Parameters

Field Name | Raw Boolean | Boolean Evaluator

Field Name | Raw Boolean | Boolean Evaluator

…​…​

Field Name | Raw Boolean | Boolean Evaluator

or Syntax

The expressions below show the various ways in which you can use the or evaluator. At least two parameters are required, but there is no limit to how many you can use.

poissonDistribution Returns

poissonDistribution Syntax

polyFit

polyFit Parameters

numeric array: (Optional) x values. If omitted a sequence will be created for the x values.

numeric array: y values

integer: (Optional) polynomial degree. Defaults to 3.

polyFit Returns

A numeric array: curve that was fit to the data points.

polyFit Syntax

polyFit(yValues) // This creates the xValues automatically and fits a curve through the data points using the default 3 degree polynomial.
polyFit(yValues, 5) // This creates the xValues automatically and fits a curve through the data points using a 5 degree polynomial.
polyFit(xValues, yValues, 5) // This will fit a curve through the data points using a 5 degree polynomial.

pow

The pow function returns the value of its first parameter raised to the power of its second parameter.

pow Parameters

Field Name | Raw Number | Number Evaluator: Parameter 1

Field Name | Raw Number | Number Evaluator: Parameter 2

pow Syntax

The expressions below show the various ways in which you can use the pow evaluator.

predict Parameters

regression model | function: The model or function used for the prediction

number | numeric array | matrix: Depending on the regression model or function used, the predictor variable can be a number, numeric array or matrix.

predict Syntax

predict(regressModel, number) // predict using the output of the <<regress>> function and single numeric predictor. This will return a single numeric prediction.
predict(regressModel, numericArray) // predict using the output of the <<regress>> function and a numeric array of predictors. This will return a numeric array of predictions.
predict(splineFunc, number) // predict using the output of the <<spline>> function and single numeric predictor. This will return a single numeric prediction.
predict(splineFunc, numericArray) // predict using the output of the <<spline>> function and a numeric array of predictors. This will return a numeric array of predictions.
predict(olsRegressModel, numericArray) // predict using the output of the <<olsRegress>> function and a numeric array containing one multi-variate predictor. This will return a single numeric prediction.
predict(olsRegressModel, matrix) // predict using the output of the <<olsRegress>> function and a matrix containing rows of multi-variate predictor arrays. This will return a numeric array of predictions.

primes

The primes function returns an array of prime numbers starting from a specified number.

primes Parameters

integer: The number of primes to return in the list

integer: The starting point for returning the primes

primes Returns

A numeric array.

primes Syntax

primes(100, 2000) // returns 100 primes starting from 2000

probability

The probability function returns the probability of a random variable within a probability distribution.

The probability function computes the probability between random variable ranges for both continuous and
discrete probability distributions.

The probability function can compute probabilities for a specific random variable for
discrete probability distributions only.

probability Parameters

probability distribution: the probability distribution to compute the probability from.

number: low value of the range.

number: (Optional for discrete probability distributions) high value of the range. If the high range is omitted then the probability function will compute a probability for the low range value.

probability Syntax

probability(poissonDistribution(10), 7) // Returns the probability of a random sample of 7 in a poisson distribution with a mean of 10.
probability(normalDistribution(10, 2), 7.5, 8.5) // Returns the probability between the range of 7.5 to 8.5 for a normal distribution with a mean of 10 and standard deviation of 2.

probability Returns

double: probability

rank

The rank performs a rank transformation on a numeric array.

rank Parameters

numeric array

rank Syntax

rank(numericArray)

raw

The raw function will return whatever raw value is the parameter. This is useful for cases where you want to use a string as part of another evaluator.

raw Parameters

Raw Value

raw Syntax

The expressions below show the various ways in which you can use the raw evaluator. Whatever is inside will be returned as-is. Internal evaluators are considered strings and are not evaluated.

sample Parameters

sample Returns

Either a single numeric random sample, or a numeric array depending on the sample size parameter.

sample Syntax

sample(poissonDistribution(5)) // Returns a single random sample from a poissonDistribution with mean of 5.
sample(poissonDistribution(5), 1000) // Returns 1000 random samples from poissonDistribution with a mean of 5.
sample(markovChain(transitionMatrix), 1000) // Returns 1000 random samples from a Markov Chain.

scalarAdd

The scalarAdd function adds a scalar value to every value in a numeric array or matrix.
When working with numeric arrays, scalarAdd returns a new array with the new values. When working
with a matrix, scalarAdd returns a new matrix with new values.

scalarAdd Parameters

scalarAdd Syntax

scalarAdd(number, numericArray) // Adds the number to each element in the number in the array.
scalarAdd(number, matrix) // Adds the number to each value in a matrix

scalarAdd Returns

numericArray | matrix: Depending on what is being operated on.

scalarDivide

The scalarDivide function divides each number in numeric array or matrix by a scalar value.
When working with numeric arrays, scalarDivide returns a new array with the new values. When working
with a matrix, scalarDivide returns a new matrix with new values.

scalarDivide Parameters

number: value to divide by
numeric array | matrix: the numeric array or matrix to divide by the value to.

scalarDivide Syntax

scalarDivide(number, numericArray) // Divides each element in the numeric array by the number.
scalarDivide(number, matrix) // Divides each element in the matrix by the number.

scalarDivide Returns

numericArray | matrix: depending on what is being operated on.

scalarMultiply

The scalarMultiply function multiplies each element in a numeric array or matrix by a
scalar value. When working with numeric arrays, scalarMultiply returns a new array with the new values. When working
with a matrix, scalarMultiply returns a new matrix with new values.

scalarMultiply Parameters

number: value to divide by
numeric array | matrix: the numeric array or matrix to divide by the value to.

scalarMultiply Syntax

scalarMultiply(number, numericArray) // Multiplies each element in the numeric array by the number.
scalarMultiply(number, matrix) // Multiplies each element in the matrix by the number.

scalarMultiply Returns

numericArray | matrix: depending on what is being operated on

scalarSubtract

The scalarSubtract function subtracts a scalar value from every value in a numeric array or matrix.
When working with numeric arrays, scalarSubtract returns a new array with the new values. When working
with a matrix, scalarSubtract returns a new matrix with new values.

standardize

The standardize function standardizes a numeric array so that values within the array
have a mean of 0 and standard deviation of 1.

standardize Parameters

numeric array: the array to standardize

standardize Syntax

standardize(numericArray)

standardize Returns

numeric array: the standardized values

sub

The sub function will take 2 or more numeric values and subtract them, from left to right. The sub function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.

sub Parameters

Field Name | Raw Number | Number Evaluator

Field Name | Raw Number | Number Evaluator

…​…​

Field Name | Raw Number | Number Evaluator

sub Syntax

The expressions below show the various ways in which you can use the sub evaluator. The number of these parameters does not matter and is not limited except that at least two parameters are required. Returns a numeric value.