# picos.expressions.uncertain.pert_wasserstein¶

Implements WassersteinAmbiguitySet.

Classes

class picos.expressions.uncertain.pert_wasserstein.WassersteinAmbiguitySet(parameter_name, p, eps, samples, weights=1)[source]

A wasserstein ambiguity set centered at a discrete distribution.

Model of uncertainty

As a distributional ambiguity set, an instance of this class

1. represents a safety region for a partially known (ambiguous) probability distribution and

2. 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

1. is the set of all Borel probability measures on for some ,

2. denotes the set of all couplings of and ,

3. for all are the samples comprising the support of ,

4. are weights denoting the nominal probabilitiy mass at for all ,

5. denotes the Dirac delta function with unit mass at for all and where

6. controls the radius of the ambiguity set.

Supported functions

For :

1. 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.

2. 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 :

1. 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 distribution given 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 samples

The registered samples as a Samples object.

property weights

The sample weights a constant PICOS vector.