picos.expressions.uncertain.pert_wasserstein¶
Implements WassersteinAmbiguitySet
.
Classes
- class picos.expressions.uncertain.pert_wasserstein.WassersteinAmbiguitySet(parameter_name, p, eps, samples, weights=1)[source]¶
Bases:
picos.expressions.uncertain.perturbation.PerturbationUniverse
A wasserstein ambiguity set centered at a discrete distribution.
- Model of uncertainty
As a distributional ambiguity set, an instance
of this class
represents a safety region for a partially known (ambiguous) probability distribution
and
provides a random, ambiguously distributed perturbation parameter
that can be used to define worst-case-expectation expressions of the form
for a selection of functions
and a decision variable
.
- Definition
Formally, this class can describe discrepancy-based ambiguity sets of the form
where discrepancy from the discrete nominal distribution
is measured with respect to the Wasserstein distance of order
,
where
is the set of all Borel probability measures on
for some
,
denotes the set of all couplings of
and
,
for all
are the
samples comprising the support of
,
are weights denoting the nominal probabilitiy mass at
for all
,
denotes the Dirac delta function with unit mass at
for all
and where
controls the radius of the ambiguity set.
- Supported functions
For
:
A convex piecewise linear function
where
is biaffine in
and
for all
. This can be written as
picos.max([a_1, ..., a_k])
in Python.A concave piecewise linear function
where
is biaffine in
and
for all
. This can be written as
picos.min([a_1, ..., a_k])
in Python.
For
:
A squared norm
where
is biaffine in
and
. This can be written as
abs(A)**2
in Python.
- __init__(parameter_name, p, eps, samples, weights=1)[source]¶
Create a
WassersteinAmbiguitySet
.- Parameters
parameter_name (str) – Name of the random parameter
.
p (float) – The Wasserstein type/order parameter
.
eps (float) – The Wasserstein ball radius
.
samples (aynthing recognized by
Samples
) – The support of the discrete distributiongiven as the samples
. The original shape of the samples determines the shape of
.
weights – A vector denoting the nonnegative weight (e.g. frequency or probability) of each sample. Its length must match the number of samples provided. The argument will be normalized such that its entries sum to one. Entries of zero will be dropped alongside their associated sample. The default value of
1
denotes the empirical distribution on the samples.
Warning
Duplicate samples are not detected and can impact performance. If duplicate samples are likely, make sure to detect them and encode their frequency in the weight vector.
- property distributional¶
Implement for
PerturbationUniverse
.
- property eps¶
The Wasserstein ball radius
.
- property p¶
The Wasserstein order
.
- property parameter¶
The random perturbation parameter
.
- property weights¶
The sample weights a constant PICOS vector.