bayesvalidrox.surrogate_models.input_space.InputSpace

class bayesvalidrox.surrogate_models.input_space.InputSpace(input_object, meta_Model_type='pce')

Bases: object

This class generates the input space for the metamodel from the distributions provided using the Input object.

Attributes

Inputobj

Input object containing the parameter marginals, i.e. name, distribution type and distribution parameters or available raw data.

meta_Model_typestr

Type of the meta_Model_type.

__init__(input_object, meta_Model_type='pce')

Methods

__init__(input_object[, meta_Model_type])

build_polytypes(rosenblatt)

Creates the polynomial types to be passed to univ_basis_vals method of the MetaModel object.

check_valid_inputs()

Check if the given InputObj is valid to use for further calculations: 1) Has some Marginals 2) The Marginals have valid priors 3) All Marginals given as the same type (samples vs dist)

init_param_space([max_deg])

Initializes parameter space.

transform(X[, params, method])

Transforms the samples via either a Rosenblatt or an isoprobabilistic transformation.

build_polytypes(rosenblatt)

Creates the polynomial types to be passed to univ_basis_vals method of the MetaModel object.

Parameters

rosenblattbool

Rosenblatt transformation flag.

Returns

orig_space_distobject

A chaospy JDist object or a gaussian_kde object.

poly_typeslist

A list of polynomial types for the parameters.

check_valid_inputs() None

Check if the given InputObj is valid to use for further calculations: 1) Has some Marginals 2) The Marginals have valid priors 3) All Marginals given as the same type (samples vs dist)

Returns

None

init_param_space(max_deg=1)

Initializes parameter space.

Parameters

max_degint, optional

Maximum degree. The default is 1.

Returns

raw_dataarray of shape (n_params, n_samples)

Raw data.

bound_tupleslist of tuples

A list containing lower and upper bounds of parameters.

transform(X, params=None, method=None)

Transforms the samples via either a Rosenblatt or an isoprobabilistic transformation.

Parameters

Xarray of shape (n_samples,n_params)

Samples to be transformed.

paramslist

Parameters for laguerre/gamma-type distribution.

methodstring

If transformation method is ‘user’ transform X, else just pass X.

Returns

tr_X: array of shape (n_samples,n_params)

Transformed samples.