workspace.src.LikelihoodModels.LikelihoodBase

Created on July 30 2020 @author: Congjian Wang

Attributes

logger

fh

formatter

Classes

LikelihoodBase

Base class for Likelihood models

Module Contents

workspace.src.LikelihoodModels.LikelihoodBase.logger[source]
workspace.src.LikelihoodModels.LikelihoodBase.fh[source]
workspace.src.LikelihoodModels.LikelihoodBase.formatter[source]
class workspace.src.LikelihoodModels.LikelihoodBase.LikelihoodBase[source]

Base class for Likelihood models

classmethod getInputSpecification()[source]

Collects input specifications for this class.

Returns:

InputData: RAVEN InputData specs

type[source]
name[source]
_variableDict[source]
_model = None[source]
_modelClass = None[source]
_outputs[source]
handleInput(xmlNode)[source]

Function to read the portion of the xml input that belongs to this specialized class and initialize some stuff based on the inputs got

Parameters:

xmlNode – xml.etree.ElementTree.Element, Xml element node

Returns:

None

abstract _localHandleInput(paramInput)[source]

Function to process the parsed xml input

Parameters:

paramInput – InputData.ParameterInput, the parsed xml input

Returns:

None

initialize(inputDict)[source]

Method to initialize

Parameters:

inputDict – dict, dictionary of inputs

Returns:

None

_checkInputParams(needDict)[source]

Method to check input parameters

Parameters:

needDict – dict, dictionary of required parameters

Returns:

None

setVariable(value)[source]

Set value if a float/int/list is provided in the node text, othersise treat the provided value as RAVEN variable

Parameters:

value – str or float or list, the value of given variable

Returns:

the recasted value

Return type:

str or numpy.array

loadVariables(need, inputDict)[source]

Load the values of variables that is generated by RAVEN

Parameters:
  • need – dict, the dict of parameters

  • inputDict – dict, the dict of parameters that is provided from other sources

Returns:

the dict of parameters updated with variables

Return type:

dict

getParams()[source]

Get the parameters

Returns:

dictionary of variables

Return type:

dict

setParams(paramDict)[source]

Set the parameters from a given dictionary.

Parameters:

paramDict – dict, settings

Returns:

None

getOutputs()[source]

get calculated cdf value

Returns:

dictionary of model outputs

Return type:

dict

abstract _logLikelihoodFunction()[source]

Function to calculate log probability

Returns:

return log likelihood outputs

Return type:

dict

run()[source]

Method to calculate Likelihood related quantities

Returns:

None