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
- physicalModel
persalys.PhysicalModel Physical model associated to the data model (optional)
- importedDataset
persalys.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)
- inSample
openturns.Sample Input sample (its description must be a list of input variable names)
- outSample
openturns.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
Accessor to the object's name.
Effective indices accessor.
getId()Accessor to the object's id.
Accessor to the underlying implementation.
Input sample accessor.
getMarginalWithoutNaN(index)Returns a marginal sample with NaN values removed.
getName()Accessor to the object's name.
Output sample accessor.
Physical model accessor.
Python script accessor.
Sample accessor.
getType()Type getter.
Whether it contains a physical model.
isValid()Whether the model is valid.
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:
- indices
openturns.Indices Input sample and output sample
- indices
- 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:
- sample
openturns.Sample Input sample
- sample
- getMarginalWithoutNaN(index)¶
Returns a marginal sample with NaN values removed.
- Parameters:
- indexint
Index of the wanted marginal
- Returns:
- sample
openturns.Sample A subsample of the present sample with the requested marginal with NaN values removed.
- sample
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getOutputSample()¶
Output sample accessor.
- Returns:
- sample
openturns.Sample Output sample
- sample
- getPhysicalModel()¶
Physical model accessor.
- Returns:
- model
PhysicalModel Physical model
- model
- getPythonScript()¶
Python script accessor.
- Returns:
- scriptstr
Python script to rebuild the design of experiments
- getSample()¶
Sample accessor.
- Returns:
- sample
openturns.Sample Input sample and output sample
- 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:
- sample
openturns.Sample Input sample
- sample
- setName(name)¶
Name setter.
- Parameters:
- namestr
Name of the design of experiment
- setOutputSample(sample)¶
Output sample accessor.
- Parameters:
- sample
openturns.Sample Output sample
- sample
- setPhysicalModel(physicalModel)¶
Physical model setter.
- Parameters:
- model
PhysicalModel Physical model to set
- model
- 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