Loading TOC...

MarkLogic 12 EA 2 Product Documentation
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.

18 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.avgAggregate Returns the average of the values given a value lexicon.
cts.correlation Returns the frequency-weighted correlation given a 2-way co-occurrence.
cts.countAggregate Returns the count of a value lexicon.
cts.covariance Returns the frequency-weighted sample covariance given a 2-way co-occurrence.
cts.covarianceP Returns the frequency-weighted covariance of the population given a 2-way co-occurrence.
cts.linearModel 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.percentile Returns a sequence of percentile(s) given a sequence of percentage(s).
cts.percentRank Returns the rank of a value in a data set as a percentage of the data set.
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.stddevP Returns a frequency-weighted standard deviation of the population given a value lexicon.
cts.sumAggregate Returns the sum of the values given a value lexicon.
cts.variance Returns a frequency-weighted sample variance given a value lexicon.
cts.varianceP Returns a frequency-weighted variance of the population given a value lexicon.