MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
python.SurrogateModel.BackwardMappingModel Class Reference

Class for defining 'backward mapping' models. More...

+ Inheritance diagram for python.SurrogateModel.BackwardMappingModel:

Public Member Functions

def __init__ (self, args, kwargs)
 
def initKwargs (self, kwargs)
 
def exactTasks (self, points)
 Build a workflow to excute an exactTask for each point.
 
def parameterFittingStrategy (self)
 
def outOfBoundsStrategy (self)
 
def extendedRange (self, outsidePoint, expansion_factor=1.2)
 Method expanding the design space. More...
 
- Public Member Functions inherited from python.SurrogateModel.SurrogateModel
def __init__ (self, args, kwargs)
 Constructor. More...
 
def initKwargs (self, kwargs)
 
def parseIndices (self, name)
 Method parsing the name of a function to determine the species, i.e. More...
 
def expandIndices (self, name)
 Method expending the indexes of a function name. More...
 
def expandIndicesWithName (self, name)
 
def outputsToModels (self)
 Method mapping outputs to substitute models. More...
 
def inputsMinMax (self)
 Method determining min and max input taking substitute models into account. More...
 
def inputs_argPos (self, name)
 Method mapping input argument position.
 
def outputs_argPos (self, name)
 Method mapping output argument positions. More...
 
def parameters_argPos (self, name)
 Method mapping parameter argument position. More...
 
def calculate_maps (self, sm)
 Method mapping outputs to inputs wrt. More...
 
def minMax (self)
 Method returning min and max of input variables. More...
 
def updateMinMax (self)
 Method updating min and max values.
 
def error (self, cModel, kwargs)
 Method generating an iterator that yields the error of every. More...
 
def __getattribute__ (self, name)
 Modified magic method. More...
 
def __setattribute__ (self, name, value)
 Modified magic method. More...
 
def exceptionOutOfBounds (self, oPoint)
 Method returning exception when a surrogate function is out of bounds. More...
 
def exceptionLoad (self, surrogateModelId)
 Method returning exception when a surrogate function is not instantiated. More...
 
def exceptionParametersNotValid (self, surrogateModelId)
 Method raising a exception when a surrogate model has no valid parameters after loading it.
 
def callModel (self, inputs)
 Method for calling the surrogate function. More...
 
def updateFitDataFromFwSpec (self, fw_spec)
 Method updating the parameters of the surrogate model. More...
 
def initialisationStrategy (self)
 Method loading the initialisation strategy. More...
 
def load (self, surrogateModelId)
 Method loading a specific surrogate model. More...
 
def loadFailing (self)
 Method returning all objects that have a 'outside point' key.
 
def loadFromModule (self)
 Method importing a surrogate model module. More...
 
def loadParametersNotValid (self)
 Method importing a surrogate model module. More...
 
def get_instances (self)
 Method returning an iterator over all SurrogateModel instances. More...
 
def __repr__ (self)
 

Static Public Attributes

 inputs = IOP(EmbeddedDocumentField(MinMaxArgPosOpt))
 
 outputs = MapField(EmbeddedDocumentField(MinMaxArgPosOpt))
 
 fitData = MapField(ListField(FloatField(required=True)))
 
 substituteModels = ListField(ReferenceField(SurrogateModel))
 
 outsidePoint = EmbeddedDocumentField(EmbDoc)
 
dictionary meta = {'allow_inheritance': True}
 
- Static Public Attributes inherited from python.SurrogateModel.SurrogateModel
 surrogateFunction = ReferenceField(SurrogateFunction, required=True)
 
 parameters = ListField(FloatField())
 
dictionary meta = {'allow_inheritance': True}
 

Additional Inherited Members

- Data Fields inherited from python.SurrogateModel.SurrogateModel
 outsidePoint
 
 nSamples
 

Detailed Description

Class for defining 'backward mapping' models.

Definition at line 1374 of file SurrogateModel.py.

Member Function Documentation

◆ extendedRange()

def python.SurrogateModel.BackwardMappingModel.extendedRange (   self,
  outsidePoint,
  expansion_factor = 1.2 
)

Method expanding the design space.

The method ONLY operates on 'self.dict', this means that the database is NOT updated. This is performed afterwards by 'run_task'.

The method will update the 'inputRanges' key in the 'self.dict'. Moreover, it will ensure that the min/max values in'sampleRange' are consistent, meaning that the sampling is performed in the correct region.

        +------------+....+
        |  *    *    |    .
        |         *  |    .
        |     *      |    .
        |  *     *   |  X .
        +------------+....+ <- new global max
        ^            ^
  global min      new min (temporary, only for sampling)
Parameters
outsidePointThe point that where found to be outside (X)
Return values
expansion_factorThe ratio that is used to expand the space beyond X
Author
Sigve Karolius
Mandar Thombre
Todo:
Document...

Definition at line 1479 of file SurrogateModel.py.


The documentation for this class was generated from the following file: