DistributionFactory¶
-
class
DistributionFactory
(*args)¶ Base class for probability distribution factories.
Notes
This class generally describes the factory mechanism of each OpenTURNS distribution. Refer to Parametric Estimation for information on the specific estimators used for each distribution.
Methods
Accessor to the list of continuous multivariate factories.
Accessor to the list of continuous univariate factories.
Accessor to the list of discrete multivariate factories.
Accessor to the list of discrete univariate factories.
Accessor to the list of multivariate factories.
Accessor to the list of univariate factories.
build
(self, \*args)Build the distribution.
buildEstimator
(self, \*args)Build the distribution and the parameter distribution.
getClassName
(self)Accessor to the object’s name.
getId
(self)Accessor to the object’s id.
getImplementation
(self)Accessor to the underlying implementation.
getName
(self)Accessor to the object’s name.
setName
(self, name)Accessor to the object’s name.
-
__init__
(self, \*args)¶ Initialize self. See help(type(self)) for accurate signature.
-
static
GetContinuousMultiVariateFactories
()¶ Accessor to the list of continuous multivariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid continuous multivariate factories.
- listFactoriescollection of
-
static
GetContinuousUniVariateFactories
()¶ Accessor to the list of continuous univariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid continuous univariate factories.
- listFactoriescollection of
-
static
GetDiscreteMultiVariateFactories
()¶ Accessor to the list of discrete multivariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid discrete multivariate factories.
- listFactoriescollection of
-
static
GetDiscreteUniVariateFactories
()¶ Accessor to the list of discrete univariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid discrete univariate factories.
- listFactoriescollection of
-
static
GetMultiVariateFactories
()¶ Accessor to the list of multivariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid multivariate factories.
- listFactoriescollection of
-
static
GetUniVariateFactories
()¶ Accessor to the list of univariate factories.
- Returns
- listFactoriescollection of
DistributionFactory
All the valid univariate factories.
- listFactoriescollection of
-
build
(self, \*args)¶ Build the distribution.
Available usages:
build(sample)
build(param)
- Parameters
- sample2-d sequence of float
Sample from which the distribution parameters are estimated.
- paramCollection of
PointWithDescription
A vector of parameters of the distribution.
- Returns
- dist
Distribution
The built distribution.
- dist
-
buildEstimator
(self, \*args)¶ Build the distribution and the parameter distribution.
- Parameters
- sample2-d sequence of float
Sample from which the distribution parameters are estimated.
- parameters
DistributionParameters
Optional, the parametrization.
- Returns
- resDist
DistributionFactoryResult
The results.
- resDist
Notes
According to the way the native parameters of the distribution are estimated, the parameters distribution differs:
Moments method: the asymptotic parameters distribution is normal and estimated by Bootstrap on the initial data;
Maximum likelihood method with a regular model: the asymptotic parameters distribution is normal and its covariance matrix is the inverse Fisher information matrix;
Other methods: the asymptotic parameters distribution is estimated by Bootstrap on the initial data and kernel fitting (see
KernelSmoothing
).
If another set of parameters is specified, the native parameters distribution is first estimated and the new distribution is determined from it:
if the native parameters distribution is normal and the transformation regular at the estimated parameters values: the asymptotic parameters distribution is normal and its covariance matrix determined from the inverse Fisher information matrix of the native parameters and the transformation;
in the other cases, the asymptotic parameters distribution is estimated by Bootstrap on the initial data and kernel fitting.
-
getClassName
(self)¶ Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
-
getId
(self)¶ Accessor to the object’s id.
- Returns
- idint
Internal unique identifier.
-
getImplementation
(self)¶ Accessor to the underlying implementation.
- Returns
- implImplementation
The implementation class.
-
getName
(self)¶ Accessor to the object’s name.
- Returns
- namestr
The name of the object.
-
setName
(self, name)¶ Accessor to the object’s name.
- Parameters
- namestr
The name of the object.
-