Joint from independent marginals
Define a joint distribution from its independent marginals. JointIndependent
is a child class of
DistributionND
.
Such a multivariate distribution possesses the following methods, on condition that all its univariate marginals also possess them:
The parameters of the distribution are only stored as attributes of the marginal objects. However, the
get_parameters()
and update_parameters()
method can still be used for the joint. Note that, for this purpose, each
parameter of the joint is assigned a unique string identifier as key_index
- where key
is the parameter name and
index
the index of the marginal (e.g., location parameter of the 2nd marginal is identified as loc_1
).
The JointIndependent
class is imported using the following command:
>>> from UQpy.distributions.collection.JointIndependent import JointIndependent
- class JointIndependent(marginals)[source]
- Parameters:
marginals (
Union
[list
[DistributionContinuous1D
],list
[DistributionDiscrete1D
]]) – list of distribution objects that define the marginals.
-
ordered_parameters:
list
Parameters of the distribution.
This attribute is not defined for certain
Distribution
objects such as those of typeJointIndependent
orJointCopula
. The user is advised to use theget_parameters()
method to access the parameters.
- get_parameters()[source]
Return the parameters of a
Distributions
object.To update the parameters of a
JointIndependent
or aJointCopula
distribution, each parameter is assigned a unique string identifier askey_index
- wherekey
is the parameter name andindex
the index of the marginal (e.g., location parameter of the 2nd marginal is identified asloc_1
).- Return type:
- Returns:
Parameters of the distribution
- update_parameters(**kwargs)[source]
Update the parameters of a
Distributions
object.To update the parameters of a
JointIndependent
or aJointCopula
distribution, each parameter is assigned a unique string identifier askey_index
- wherekey
is the parameter name andindex
the index of the marginal (e.g., location parameter of the 2nd marginal is identified asloc_1
).- Parameters:
kwargs (
dict
) – Parameters to be updated- Raises:
ValueError – if kwargs contains key that does not already exist.