DesignOfExperiment

class persalys.DesignOfExperiment(*args)

Create a Design of Experiments

The interface allows the user to load data samples and analyse them. They are considered as data models.

DesignOfExperiment(name, physicalModel)

DesignOfExperiment(name, importedDataset, inputNames, outputNames)

DesignOfExperiment(name, inSample, outSample)

DesignOfExperiment(evaluation)

Parameters:
namestr

Name

physicalModelpersalys.PhysicalModel

Physical model associated to the data model (optional)

importedDatasetpersalys.ImportedDataset

Imported dataset associated to the data model (optional)

inputNamessequence of str

Names of the input variables (optional)

outputNamessequence of str

Names of the output variables (optional)

inSampleopenturns.Sample

Input sample (its description must be a list of input variable names)

outSampleopenturns.Sample

Output sample (its description must be a list of output variable names)

evaluationclass:~persalys.DesignOfExperimentEvaluation

Extract the design of experiment from a design of experiment evaluation. The design of experiment contains an independant copy of the data (deep copy).

Methods

getClassName()

Accessor to the object's name.

getEffectiveInputIndices()

Effective indices accessor.

getId()

Accessor to the object's id.

getImplementation()

Accessor to the underlying implementation.

getInputSample()

Input sample accessor.

getMarginalWithoutNaN(index)

Returns a marginal sample with NaN values removed.

getName()

Accessor to the object's name.

getOutputSample()

Output sample accessor.

getPhysicalModel()

Physical model accessor.

getPythonScript()

Python script accessor.

getSample()

Sample accessor.

getType()

Type getter.

hasPhysicalModel()

Whether it contains a physical model.

isValid()

Whether the model is valid.

removePhysicalModel()

Remove the physical model from the design of experiment.

setInputSample(sample)

Input sample accessor.

setName(name)

Name setter.

setOutputSample(sample)

Output sample accessor.

setPhysicalModel(physicalModel)

Physical model setter.

setType(type)

Type setter.

Examples

>>> import openturns as ot
>>> import persalys
>>> ot.RandomGenerator.SetSeed(0)
>>> fileName = 'sample.csv'
>>> sample = ot.Normal(3).getSample(30)
>>> sample.exportToCSVFile(fileName)
>>> importedDataset = persalys.ImportedDataset(fileName, [0, 2], [1])
>>> model = persalys.DesignOfExperiment('dataModel', importedDataset, ['var1', 'var2'], ['var3'])
>>> model.setType(persalys.DataModel.MC)
__init__(*args)
getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getEffectiveInputIndices()

Effective indices accessor.

Indices of non-const variables in the design.

Returns:
indicesopenturns.Indices

Input sample and output sample

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getImplementation()

Accessor to the underlying implementation.

Returns:
implImplementation

A copy of the underlying implementation object.

getInputSample()

Input sample accessor.

Returns:
sampleopenturns.Sample

Input sample

getMarginalWithoutNaN(index)

Returns a marginal sample with NaN values removed.

Parameters:
indexint

Index of the wanted marginal

Returns:
sampleopenturns.Sample

A subsample of the present sample with the requested marginal with NaN values removed.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getOutputSample()

Output sample accessor.

Returns:
sampleopenturns.Sample

Output sample

getPhysicalModel()

Physical model accessor.

Returns:
modelPhysicalModel

Physical model

getPythonScript()

Python script accessor.

Returns:
scriptstr

Python script to rebuild the design of experiments

getSample()

Sample accessor.

Returns:
sampleopenturns.Sample

Input sample and output sample

getType()

Type getter.

Returns:
typeint
possible values are

persalys.DataModel.UK, persalys.DataModel.MC, persalys.DataModel.QMC, persalys.DataModel.RLHS, persalys.DataModel.OLHS, persalys.DataModel.GRID, persalys.DataModel.MORRIS

hasPhysicalModel()

Whether it contains a physical model.

Returns:
hasPhysicalModelbool

Whether it contains a physical model

isValid()

Whether the model is valid.

Returns:
isValidbool

Whether the model is valid

removePhysicalModel()

Remove the physical model from the design of experiment.

setInputSample(sample)

Input sample accessor.

Parameters:
sampleopenturns.Sample

Input sample

setName(name)

Name setter.

Parameters:
namestr

Name of the design of experiment

setOutputSample(sample)

Output sample accessor.

Parameters:
sampleopenturns.Sample

Output sample

setPhysicalModel(physicalModel)

Physical model setter.

Parameters:
modelPhysicalModel

Physical model to set

setType(type)

Type setter.

Parameters:
typeint
possible values are

persalys.DataModel.UK, persalys.DataModel.MC, persalys.DataModel.QMC, persalys.DataModel.RLHS, persalys.DataModel.OLHS, persalys.DataModel.GRID, persalys.DataModel.MORRIS