empirical module¶
Empirical estimation of statistics from a dataset¶
Overview¶
The EmpiricalStatistics
class inherits from the
abstract Statistics
class and aims to estimate statistics
from a Dataset
, based on empirical estimators.
Construction¶
A EmpiricalStatistics
is built from a Dataset
and
optionally a list of variables names.
In this case, statistics are only computed for these variables.
Otherwise, statistics are computed for all variables.
Lastly, the user can name its Statistics
. By default,
the name is the concatenation of ‘EmpiricalStatistics’ and
and the name of the Dataset
.
-
class
gemseo.uncertainty.statistics.empirical.
EmpiricalStatistics
(dataset, variables_names=None, name=None)[source]¶ Bases:
gemseo.uncertainty.statistics.statistics.Statistics
Empirical estimation of statistics.
Constructor
- Parameters
dataset (Dataset) – dataset
variables_names (list(str)) – list of variables names or list of variables names. If None, the method considers all variables from dataset. Default: None.
name (str) – name of the object. If None, use the concatenation of class and dataset names. Default: None.
-
moment
(order)[source]¶ Compute the central moment for a given order.
- Parameters
order (int) – moment order.
- Returns
moment
- Return type
dict
-
probability
(thresh, greater=True)[source]¶ Compute a probability associated to a threshold. This threshold is a dictionary of arrays indexed by variables names. For a multidimensional variable, the probability to be greater (or lower) than the threshold is defined as the probability that all variables components are greater (respectively lower) than their counterparts in the threshold.
- Parameters
thresh (dict) – threshold
greater (bool) – if True, compute the probability the probability of exceeding the threshold, if False, compute the reverse. Default: True.
- Returns
probability
-
quantile
(prob)[source]¶ Get the quantile associated to a given probability.
- Parameters
merge (int) – if True, merge variables. Default: True.
- Returns
quantile
- Return type
dict