Loading TOC...

cts functions (Math Lexicon)

MarkLogic Server provides aggregate math functions that make use of value lexicons to calculate results. The math lexicon functions differ from the math functions in the math: namespace in that math lexicon functions take frequency into consideration.

This section describes the math lexicon APIs.

21 functions
Function name Description
cts:aggregate Executes a user-defined extension aggregate function against a value lexicon or n-way co-occurrence of multiple value lexicons.
cts:avg [DEPRECATED: use cts:avg-aggregate] Returns a frequency-weighted average of a sequence.
cts:avg-aggregate Returns the average of the values given a value lexicon.
cts:correlation Returns the frequency-weighted correlation given a 2-way co-occurrence.
cts:count [DEPRECATED: use cts:count-aggregate] Returns a frequency-weighted count of a sequence.
cts:count-aggregate Returns the count of a value lexicon.
cts:covariance Returns the frequency-weighted sample covariance given a 2-way co-occurrence.
cts:covariance-p Returns the frequency-weighted covariance of the population given a 2-way co-occurrence.
cts:linear-model Returns a linear model that fits the frequency-weighted data set.
cts:max Returns the maximal value given a value lexicon.
cts:median Returns a frequency-weighted median of a sequence.
cts:min Returns the minimal value given a value lexicon.
cts:percent-rank Returns the rank of a value in a data set as a percentage of the data set.
cts:percentile Returns a sequence of percentile(s) given a sequence of percentage(s).
cts:rank Returns the rank of a value in a data set.
cts:stddev Returns a frequency-weighted sample standard deviation given a value lexicon.
cts:stddev-p Returns a frequency-weighted standard deviation of the population given a value lexicon.
cts:sum [DEPRECATED: use cts:sum-aggregate] Returns a frequency-weighted sum of a sequence.
cts:sum-aggregate Returns the sum of the values given a value lexicon.
cts:variance Returns a frequency-weighted sample variance given a value lexicon.
cts:variance-p Returns a frequency-weighted variance of the population given a value lexicon.