EEMS Basic

The EEMS Basic library contains several commands for performing basic, non-fuzzy operations on data. These include arithmetic commands (e.g., Sum, AMinusB), aggregation commands, and utility commands.

Copy(InFieldName)

Creates a copy of the input data.

Parameters:

InFieldName – (Result) The result to copy.

AMinusB(A, B)

Performs the operation A - B.

Parameters:
Sum(InFieldNames)

Produces an array in which each value is the sum of all input arrays at that index.

Parameters:

InFieldNames – (List [Result]) A list of the results to sum.

WeightedSum(InFieldNames, Weights)

Produces an array in which each value is the sum of all input arrays at that index, weighted by the input weights. E.g., values 8 and 10, with weights of 0.6 and 0.4 respectively will produce a result of 8.8.

Parameters:
  • InFieldNames – (List [Result]) A list of the results to sum.

  • Weights – (List [Number]) A list of weights; one for each input. The number of weights must match the number of results specified by InFieldNames.

Multiply(InFieldNames)

Multiplies multiple results together.

Parameters:

InFieldNames – (List [Result]) A list of the results to multiply.

ADividedByB(A, B)

Performs the operation A / B.

Parameters:
  • A – (Result) The numerator.

  • B – (Result) The denominator.

Minimum(InFieldNames)

Produces an array in which each value is the minimum of all input arrays at that index.

Parameters:

InFieldNames – (List [Result]) A list of the results to derive minimum values from.

Maximum(InFieldNames)

Produces an array in which each value is the maximum of all input arrays at that index.

Parameters:

InFieldNames – (List [Result]) A list of the results to derive maximum values from.

Mean(InFieldNames)

Produces an array in which each value is the mean of all input arrays at that index.

Parameters:

InFieldNames – (List [Result]) A list of the results to derive mean values from.

WeightedMean(InFieldNames, Weights)

Produces an array in which each values is the mean of all inputs arrays at that index, weighted by the input weights. E.g., values 8 and 10 with weights of 2 and 1 respectively will produce a result of 8.667

Parameters:
  • InFieldNames – (List [Result]) A list of the results to derive mean values from.

  • Weights – (List [Number]) A list of weights; one for each input. The number of weights must match the number of results specified by InFieldNames.

Normalize(InFieldName, StartVal, EndVal)

Normalize values to a specified range, where the minimum value will be mapped to StartVal, the maximum value will be mapped to EndVal, and values between will be processed by linear interpolation between StartVal and EndVal.

Parameters:
  • InFieldName – (Result) The result to normalize.

  • StartVal – (Number) Optional. The lowest value of the normalized array. Defaults to 0.

  • EndVal – (Number) Optional. The highest value of the normalized array. Defaults to 1.

NormalizeZScore(InFieldName, TrueThresholdZScore, FalseThresholdZScore, StartVal, EndVal)

Converts input values into normalized values using linear interpolation based on Z Score.

Parameters:
  • InFieldName – (Result) The result to normalize

  • TrueThresholdZScore – (Number) Optional. The normalized “True” value. Defaults to 1.

  • FalseThresholdZScore – (Number) Optional. The normalized “False” value. Defaults to 0.

  • StartVal – (Number) Optional. The lowest value of the normalized array. Defaults to 0.

  • EndVal – (Number) Optional. The highest value of the normalized array. Defaults to 1.

NormalizeCat(InFieldName, RawValues, NormalValues, DefaultNormalValue)

Converts integer input values into normalized values based on user specification.

Parameters:
  • InFieldName – (Result) The result to convert to normalize.

  • RawValues – (List [Number]) A list of unique values from the input data.

  • NormalValues – (List [Number]) A list of normalized values that will be used to normalize values matching those in RawValues. The RawValues and NormalValues lists must be the same size.

  • DefaultNormalValue – (Number) The default normal value used to convert any input value not specified in RawValues.

NormalizeCurve(InFieldName, RawValues, NormalValues)

Converts input values into normalized values based on user-defined curve

Parameters:
  • InFieldName – (Result) The result to normalize.

  • RawValues – (List [Number]) A list of unique values from the input data.

  • NormalValues – (List [Number]) A list of normalized values that will be used to map values matching those in RawValues to normalized ones. The RawValues and NormalValues lists must be the same size.

NormalizeMeanToMid(InFieldName, IgnoreZeros, NormalValues)

Uses “NormalizeCurve” to create a non-linear transformation that is a good match for the input data.

Parameters:
  • InFieldName – (Result) The result to normalize.

  • IgnoreZeros – (Boolean) Ignore 0 values when determining the mean.

  • NormalValues – (List [Number]) A list of normalized values that will be used to map input values to normalized ones.

NormalizeCurveZScore(InFieldName, ZScoreValues, NormalValues)

Converts input values into narmalized values based on user-defined curve

Parameters:
  • InFieldName – (Result) The result to normalize.

  • ZScoreValues – (List [Number]) A list of z scores that will be used to map input values to normalized ones.

  • NormalValues – (List [Number]) A list of normalized values that will be used to map values to normalized ones. The ZScoreValues and NormalValues lists must be the same size.

PrintVars(InFieldNames, OutFileName)

Print or write results for debugging purposes. If OutFileName is provided, the results will be written to that file, otherwise they will be printed to STDOUT.

Parameters:
  • InFieldNames – (List [Result]) The results to print.

  • OutFileName – (Path) Optional. The file to write results to. This file will be overwritten if it exists.