protocol
statisticsp
ï
Statistical calculations over a list of numbers protocol.
logtalk_load(statistics(loader))
static
Public predicatesï
product/2
ï
Calculates the product of all list numbers. Fails if the list is empty.
static
product(List,Product)
product(+list(number),-number)
- zero_or_one
sum/2
ï
Calculates the sum of all list numbers. Fails if the list is empty.
static
sum(List,Sum)
sum(+list(number),-number)
- zero_or_one
min/2
ï
Determines the minimum value in a list of numbers. Fails if the list is empty.
static
min(List,Minimum)
min(+list,-number)
- zero_or_one
max/2
ï
Determines the list maximum value in a list of numbers. Fails if the list is empty.
static
max(List,Maximum)
max(+list,-number)
- zero_or_one
min_max/3
ï
Determines the minimum and maximum values in a list of numbers. Fails if the list is empty.
static
min_max(List,Minimum,Maximum)
min_max(+list(number),-number,-number)
- zero_or_one
range/2
ï
Range is the length of the smallest interval which contains all the numbers in List. Fails if the list is empty.
static
range(List,Range)
range(+list,-number)
- zero_or_one
arithmetic_mean/2
ï
Calculates the arithmetic mean of a list of numbers. Fails if the list is empty.
static
arithmetic_mean(List,Mean)
arithmetic_mean(+list(number),-float)
- zero_or_one
geometric_mean/2
ï
Calculates the geometric mean of a list of numbers. Fails if the list is empty.
static
geometric_mean(List,Mean)
geometric_mean(+list(number),-float)
- zero_or_one
harmonic_mean/2
ï
Calculates the harmonic mean of a list of numbers. Fails if the list is empty.
static
harmonic_mean(List,Mean)
harmonic_mean(+list(number),-float)
- zero_or_one
weighted_mean/3
ï
Calculates the weighted mean of a list of numbers. Fails if the list is empty or if the two lists have different lengths. Wights are assume to be non-negative.
static
weighted_mean(Weights,List,Mean)
weighted_mean(+list(number),+list(number),-float)
- zero_or_one
median/2
ï
Calculates the median of a list of numbers. Fails if the list is empty.
static
median(List,Median)
median(+list(number),-float)
- zero_or_one
modes/2
ï
Returns the list of modes of a list of numbers in ascending order. Fails if the list is empty.
static
modes(List,Modes)
modes(+list(number),-list(number))
- zero_or_one
average_deviation/3
ï
Calculates the average absolute deviation of a list of numbers given a central tendency (e.g. mean, median, or mode). Fails if the list is empty.
static
average_deviation(List,CentralTendency,Deviation)
average_deviation(+list(number),+float,-float)
- zero_or_one
mean_deviation/2
ï
Calculates the mean absolute deviation of a list of numbers. Fails if the list is empty.
static
mean_deviation(List,Deviation)
mean_deviation(+list(number),-float)
- zero_or_one
median_deviation/2
ï
Calculates the median absolute deviation of a list of numbers. Fails if the list is empty.
static
median_deviation(List,Deviation)
median_deviation(+list(number),-float)
- zero_or_one
standard_deviation/2
ï
Calculates the standard deviation of a list of numbers. Fails if the list is empty.
static
standard_deviation(List,Deviation)
standard_deviation(+list(number),-float)
- zero_or_one
coefficient_of_variation/2
ï
Calculates the coefficient of variation of a list of numbers. Fails if the list is empty.
static
coefficient_of_variation(List,Coefficient)
coefficient_of_variation(+list(number),-float)
- zero_or_one
relative_standard_deviation/2
ï
Calculates the relative standard deviation of a list of numbers. Fails if the list is empty.
static
relative_standard_deviation(List,Percentage)
relative_standard_deviation(+list(number),-float)
- zero_or_one
skewness/2
ï
Calculates the (moment) skewness of a list of numbers. Fails if the list is empty.
static
skewness(List,Skewness)
skewness(+list(number),-float)
- zero_or_one
kurtosis/2
ï
Calculates the (excess) kurtosis of a list of numbers. Fails if the list is empty.
static
kurtosis(List,Kurtosis)
kurtosis(+list(number),-float)
- zero_or_one
variance/2
ï
Calculates the unbiased variance of a list of numbers. Fails if the list is empty.
static
variance(List,Variance)
variance(+list(number),-float)
- zero_or_one
z_normalization/2
ï
Normalizes a list of number such that for the resulting list the mean of is close to zero and the standard deviation is close to 1. Fails if the list is empty.
static
z_normalization(List,NormalizedList)
z_normalization(+list(number),-list(float))
- zero_or_one
fractile/3
ï
Calculates the smallest value in a list of numbers such that the list elements in its fraction P
are less or equal to that value (with P
in the open interval (0.0, 1.0)
). Fails if the list is empty.
static
fractile(P,List,Fractile)
fractile(+float,+list(integer),-integer)
- zero_or_one
fractile(+float,+list(float),-float)
- zero_or_one
valid/1
ï
Term is a closed list of numbers.
static
valid(Term)
valid(@nonvar)
- zero_or_one
Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)
See also