workspace.src.LikelihoodModels.LikelihoodBase ============================================= .. py:module:: workspace.src.LikelihoodModels.LikelihoodBase .. autoapi-nested-parse:: Created on July 30 2020 @author: Congjian Wang Attributes ---------- .. autoapisummary:: workspace.src.LikelihoodModels.LikelihoodBase.logger workspace.src.LikelihoodModels.LikelihoodBase.fh workspace.src.LikelihoodModels.LikelihoodBase.formatter Classes ------- .. autoapisummary:: workspace.src.LikelihoodModels.LikelihoodBase.LikelihoodBase Module Contents --------------- .. py:data:: logger .. py:data:: fh .. py:data:: formatter .. py:class:: LikelihoodBase Base class for Likelihood models .. py:method:: getInputSpecification() :classmethod: Collects input specifications for this class. :returns: InputData: RAVEN InputData specs .. py:attribute:: type .. py:attribute:: name .. py:attribute:: _variableDict .. py:attribute:: _model :value: None .. py:attribute:: _modelClass :value: None .. py:attribute:: _outputs .. py:method:: handleInput(xmlNode) Function to read the portion of the xml input that belongs to this specialized class and initialize some stuff based on the inputs got :param xmlNode: xml.etree.ElementTree.Element, Xml element node :returns: None .. py:method:: _localHandleInput(paramInput) :abstractmethod: Function to process the parsed xml input :param paramInput: InputData.ParameterInput, the parsed xml input :returns: None .. py:method:: initialize(inputDict) Method to initialize :param inputDict: dict, dictionary of inputs :returns: None .. py:method:: _checkInputParams(needDict) Method to check input parameters :param needDict: dict, dictionary of required parameters :returns: None .. py:method:: setVariable(value) Set value if a float/int/list is provided in the node text, othersise treat the provided value as RAVEN variable :param value: str or float or list, the value of given variable :returns: the recasted value :rtype: str or numpy.array .. py:method:: loadVariables(need, inputDict) Load the values of variables that is generated by RAVEN :param need: dict, the dict of parameters :param inputDict: dict, the dict of parameters that is provided from other sources :returns: the dict of parameters updated with variables :rtype: dict .. py:method:: getParams() Get the parameters :returns: dictionary of variables :rtype: dict .. py:method:: setParams(paramDict) Set the parameters from a given dictionary. :param paramDict: dict, settings :returns: None .. py:method:: getOutputs() get calculated cdf value :returns: dictionary of model outputs :rtype: dict .. py:method:: _logLikelihoodFunction() :abstractmethod: Function to calculate log probability :returns: return log likelihood outputs :rtype: dict .. py:method:: run() Method to calculate Likelihood related quantities :returns: None