SG++-Doxygen-Documentation
|
Public Member Functions | |
def | __init__ (self) |
def | __str__ (self) |
def | clearAlphas (self) |
def | createMemento (self) |
def | fromJson (cls, jsonObject) |
def | getAlpha (self, qoi='_', t=0, dtype=KnowledgeTypes.SIMPLE, iteration=None) |
def | getAlphas (self) |
def | getAlphasByQoI (self, qoi='_', dtype=KnowledgeTypes.SIMPLE, iteration=None) |
def | getAvailableIterations (self) |
def | getAvailableKnowledgeTypes (self) |
def | getAvailableQoI (self) |
def | getAvailableTimeSteps (self) |
def | getGrid (self, qoi='_', iteration=None) |
def | getGrids (self) |
def | getIteration (self) |
def | getSparseGridFunction (self, qoi='_', t=0, dtype=KnowledgeTypes.SIMPLE, iteration=None) |
def | hasAlpha (self, iteration, qoi, t, dtype) |
def | hasGrid (self, iteration, qoi) |
def | initWithStandardValues (cls, grid, alpha) |
def | setAlphas (self, alphas) |
def | setGrids (self, grids) |
def | setIteration (self, iteration) |
def | setMemento (self, memento) |
def | toJson (self) |
def | update (self, grid, alpha, qoi, t, dtype, iteration) |
def | writeToFile (self, filename) |
The ASGC knowledge class
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__init__ | ( | self | ) |
Constructor
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__str__ | ( | self | ) |
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.clearAlphas | ( | self | ) |
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.createMemento | ( | self | ) |
Creates a new memento to hold the current state
References python.utils.json.read(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.toJson().
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.writeToFile(), and python.uq.uq_setting.UQSetting.UQSetting.writeToFile().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.fromJson | ( | cls, | |
jsonObject | |||
) |
Restores the ASGC object from the json object with its attributes. @param jsonObject: json object @return: the restored ASGC object
Referenced by python.uq.sampler.asgc.ASGCSampler.ASGCSampler.setMemento(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setMemento(), python.uq.learner.Learner.Learner.setMemento(), and python.uq.uq_setting.UQSetting.UQSetting.setMemento().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlpha | ( | self, | |
qoi = '_' , |
|||
t = 0 , |
|||
dtype = KnowledgeTypes.SIMPLE , |
|||
iteration = None |
|||
) |
Get the coefficient vector for the given configuration @param qoi: string quantity of interest @param t: float time step @param dtype: KnowledgeType @param iteration: int, iteration number
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlphasByQoI(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasAlpha().
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getGrid(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlphas | ( | self | ) |
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlphasByQoI | ( | self, | |
qoi = '_' , |
|||
dtype = KnowledgeTypes.SIMPLE , |
|||
iteration = None |
|||
) |
Get all coefficient vectors for the given quantity of interest @param qoi: string quantity of interest @param iteration: int, iteration number
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction().
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlpha().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAvailableIterations | ( | self | ) |
get available iterations @return: sorted list of integes
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAvailableKnowledgeTypes | ( | self | ) |
@return list of available KnowledgeTypes
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAvailableQoI | ( | self | ) |
get available quantities of interest @return: list of strings identifying the quantities of interest
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
Referenced by python.uq.uq_setting.UQSetting.UQSetting.getResult(), and python.uq.uq_setting.UQSetting.UQSetting.getTimeDependentResults().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAvailableTimeSteps | ( | self | ) |
get available time steps @return: sorted list of floats
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getGrid | ( | self, | |
qoi = '_' , |
|||
iteration = None |
|||
) |
Get the grid for the given configuration @param qoi: string quantity of interest @param iteration: int, iteration number
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlpha(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasGrid().
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction(), python.uq.learner.SimulationLearner.SimulationLearner.learnData(), python.uq.learner.SimulationLearner.SimulationLearner.learnDataWithFolding(), python.uq.learner.SimulationLearner.SimulationLearner.learnDataWithTest(), and python.uq.learner.SimulationLearner.SimulationLearner.refineGrid().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getGrids | ( | self | ) |
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getIteration | ( | self | ) |
get current iteration number
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction | ( | self, | |
qoi = '_' , |
|||
t = 0 , |
|||
dtype = KnowledgeTypes.SIMPLE , |
|||
iteration = None |
|||
) |
Get the sparse grid function (grid, alpha) for the given setting @param qoi: string quantity of interest @param t: float time step @param dtype: KnowledgeType @param iteration: int, iteration number
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlpha(), python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis.getGrid(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getGrid(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasAlpha(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasGrid().
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlphasByQoI().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasAlpha | ( | self, | |
iteration, | |||
qoi, | |||
t, | |||
dtype | |||
) |
Check if there is a coefficient vector for the given configuration. @param iteration: int iteration number @param qoi: string quantity of interest @param t: float time step @param dtype: KnowledgeType
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getAlpha(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.hasGrid | ( | self, | |
iteration, | |||
qoi | |||
) |
Check if there is a grid available for the given configuration @param iteration: int iteration number @param qoi: string quantity of interest
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids.
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getGrid(), and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.getSparseGridFunction().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.initWithStandardValues | ( | cls, | |
grid, | |||
alpha | |||
) |
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setAlphas | ( | self, | |
alphas | |||
) |
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setGrids | ( | self, | |
grids | |||
) |
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setIteration | ( | self, | |
iteration | |||
) |
set current iteration number
References python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.setMemento | ( | self, | |
memento | |||
) |
Restores the state which is saved in the given memento @param memento: the memento object
References python.learner.solver.CGSolver.CGSolver.fromJson(), python.learner.TrainingStopPolicy.TrainingStopPolicy.fromJson(), python.learner.TrainingSpecification.TrainingSpecification.fromJson(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.fromJson(), python.data.DataContainer.DataContainer.fromJson(), and python.learner.Learner.Learner.fromJson().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.toJson | ( | self | ) |
@return: a string that represents the object
Referenced by python.uq.sampler.asgc.ASGCSampler.ASGCSampler.__str__(), python.uq.uq_setting.UQSetting.UQSetting.__str__(), python.uq.sampler.asgc.ASGCSampler.ASGCSampler.createMemento(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.createMemento(), and python.uq.uq_setting.UQSetting.UQSetting.createMemento().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.update | ( | self, | |
grid, | |||
alpha, | |||
qoi, | |||
t, | |||
dtype, | |||
iteration | |||
) |
Update the knowledge @param grid: Grid @param alpha: numpy array surplus vector @param qoi: string quantity of interest @param t: float time step @param dtype: KnowledgeType @param iteration: int iteration number
References python.learner.LearnedKnowledge.LearnedKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__alphas, python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__grids, and python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.__iteration.
Referenced by python.uq.refinement.RefinementStrategy.Ranking.rank().
def python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.writeToFile | ( | self, | |
filename | |||
) |
Write knowledge object to file
References python.learner.LearnedKnowledge.LearnedKnowledge.createMemento(), python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge.createMemento(), and python.learner.Learner.Learner.createMemento().
Referenced by python.uq.uq_setting.UQSetting.UQSetting.run(), and python.uq.uq_setting.UQSetting.UQSetting.waitForResults().