MixtureFactory¶
- class otmixmod.MixtureFactory(*args)¶
Mixture inference.
- Parameters:
- atomsNumberint
The number of atoms
- covarianceModelstr, optional
The covariance model. Default is ‘Gaussian_pk_Lk_C’
Other possible values include:
Gaussian_p_L_I
Gaussian_p_Lk_I
Gaussian_p_L_B
Gaussian_p_Lk_B
Gaussian_p_L_Bk
Gaussian_p_Lk_Bk
Gaussian_p_L_C
Gaussian_p_Lk_C
Gaussian_p_L_D_Ak_D
Gaussian_p_Lk D_Ak_D
Gaussian_p_L_Dk_A_Dk
Gaussian_p_Lk_Dk_A_Dk
Gaussian_p_L_Ck
Gaussian_p_Lk_Ck
Gaussian_pk_L_I
Gaussian_pk_Lk_I
Gaussian_pk_L_B
Gaussian_pk_Lk_B
Gaussian_pk_L_Bk
Gaussian_pk_Lk_Bk
Gaussian_pk_L_C
Gaussian_pk_Lk_C
Gaussian_pk_L_D_Ak_D
Gaussian_pk_Lk D_Ak_D
Gaussian_pk_L_Dk_A_Dk
Gaussian_pk_Lk_Dk_A_Dk
Gaussian_pk_L_Ck
Gaussian_pk_Lk_Ck
Methods
BuildClusters
(Sample data, Indices labels, OT)build
(...)Build the distribution.
buildAsMixture
(MixtureFactory self, ...)Mixture inference.
buildEstimator
(*args)Build the distribution and the parameter distribution.
getAtomsNumber
(MixtureFactory self)Atoms number accessor.
Accessor to the bootstrap size.
getClassName
(MixtureFactory self)Accessor to the object's name.
getCovarianceModel
(MixtureFactory self)getId
()Accessor to the object's id.
getName
()Accessor to the object's name.
Accessor to the object's shadowed id.
Accessor to the object's visibility state.
hasName
()Test if the object is named.
Test if the object has a distinguishable name.
setAtomsNumber
(MixtureFactory self, OT)Atoms number accessor.
setBootstrapSize
(bootstrapSize)Accessor to the bootstrap size.
setCovarianceModel
(MixtureFactory self, OT)setName
(name)Accessor to the object's name.
setSeed
(MixtureFactory self, OT)Mixmod RNG seed accessor.
setShadowedId
(id)Accessor to the object's shadowed id.
setVisibility
(visible)Accessor to the object's visibility state.
- __init__(MixtureFactory self) MixtureFactory ¶
- __init__(MixtureFactory self, OT::UnsignedInteger const atomsNumber, OT::String const covarianceModel="Gaussian_pk_Lk_C") MixtureFactory
- __init__(MixtureFactory self, MixtureFactory other) MixtureFactory
- static BuildClusters(Sample data, Indices labels, OT::UnsignedInteger const nbClusters) SampleCollection ¶
- build(MixtureFactory self, Sample sample) Distribution ¶
- build(MixtureFactory self, Point parameters) Distribution
- build(MixtureFactory self, Sample sample) Distribution
- build(MixtureFactory self) Distribution
Build the distribution.
Available usages:
build()
build(sample)
build(param)
- Parameters:
- sample2-d sequence of float
Data.
- paramsequence of float
The parameters of the distribution.
- Returns:
- dist
Distribution
The estimated distribution.
In the first usage, the default native distribution is built.
- dist
- buildAsMixture(MixtureFactory self, Sample sample) Mixture ¶
Mixture inference.
- Parameters:
- sample
openturns.Sample
Sample
- sample
- Returns:
- mixture
openturns.Mixture
Inferred distribution
- mixture
- buildEstimator(*args)¶
Build the distribution and the parameter distribution.
- Parameters:
- sample2-d sequence of float
Data.
- 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.
- getAtomsNumber(MixtureFactory self) OT::UnsignedInteger ¶
Atoms number accessor.
- Returns:
- atomsNumberint
The number of atoms
- getBootstrapSize()¶
Accessor to the bootstrap size.
- Returns:
- sizeinteger
Size of the bootstrap.
- getClassName(MixtureFactory self) OT::String ¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getCovarianceModel(MixtureFactory self) OT::String ¶
- getId()¶
Accessor to the object’s id.
- Returns:
- idint
Internal unique identifier.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getShadowedId()¶
Accessor to the object’s shadowed id.
- Returns:
- idint
Internal unique identifier.
- getVisibility()¶
Accessor to the object’s visibility state.
- Returns:
- visiblebool
Visibility flag.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- hasVisibleName()¶
Test if the object has a distinguishable name.
- Returns:
- hasVisibleNamebool
True if the name is not empty and not the default one.
- setAtomsNumber(MixtureFactory self, OT::UnsignedInteger const & number)¶
Atoms number accessor.
- Parameters:
- atomsNumberint
The number of atoms
- setBootstrapSize(bootstrapSize)¶
Accessor to the bootstrap size.
- Parameters:
- sizeinteger
The size of the bootstrap.
- setCovarianceModel(MixtureFactory self, OT::String const covarianceModel)¶
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setSeed(MixtureFactory self, OT::SignedInteger const seed)¶
Mixmod RNG seed accessor.
- Parameters:
- seedint
Seed used to initialize the Mixmod RNG seed before the learning step. A negative seed will randomly initialize the RNG. The default value is 0.
- setShadowedId(id)¶
Accessor to the object’s shadowed id.
- Parameters:
- idint
Internal unique identifier.
- setVisibility(visible)¶
Accessor to the object’s visibility state.
- Parameters:
- visiblebool
Visibility flag.