euromod.calibrate ================= .. py:module:: euromod.calibrate Below are listed the main public classes of the euromod.calibrate module. .. list-table:: **Classes** :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`Calibration ` - \- .. list-table:: **Function** :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`calibrate_function `\ (system, data, dataset_id, target_variable, base, functional_form, group_filters, constantsToOverwrite) - " .. list-table:: **Attributes** :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`model_path ` - \- .. toctree:: :titlesonly: :maxdepth: 3 .. py:class:: Calibration(model_version, system: str, dataset_id: str, functional_form: sympy.Expr, data_vars: List[str], parameter_vars: List[str], estimates: Dict[str, Dict[str, float]], target_variable, constantsToOverwrite: dict = {}) .. rubric:: Overview .. list-table:: Attributes :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`base_lambda ` - \- * - :py:obj:`constantsToOverwrite ` - \- * - :py:obj:`data_vars ` - \- * - :py:obj:`dataset_id ` - \- * - :py:obj:`estimates ` - \- * - :py:obj:`functional_form ` - \- * - :py:obj:`group_lambdas ` - \- * - :py:obj:`model_version ` - \- * - :py:obj:`parameter_vars ` - \- * - :py:obj:`pretty_function ` - \- * - :py:obj:`system ` - \- * - :py:obj:`target_variable ` - \- .. list-table:: Methods :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`evaluate `\ (system, output_data, target_variable, group_filters, dataset_id) - Compare fitted vs actual target values per group. * - :py:obj:`from_json `\ (system, path) - :summarylabel:`static` \- * - :py:obj:`get_estimates `\ () - \- * - :py:obj:`get_value_function `\ (group_key, data) - \- * - :py:obj:`to_json `\ (path) - \- .. rubric:: Attributes .. py:attribute:: base_lambda .. py:attribute:: constantsToOverwrite .. py:attribute:: data_vars .. py:attribute:: dataset_id .. py:attribute:: estimates .. py:attribute:: functional_form .. py:attribute:: group_lambdas .. py:attribute:: model_version .. py:attribute:: parameter_vars .. py:attribute:: pretty_function .. py:attribute:: system .. py:attribute:: target_variable .. rubric:: Methods .. py:method:: evaluate(system: core.System, output_data: polars.DataFrame, target_variable: str, group_filters: dict[str, polars.Expr] | None = None, dataset_id: str | None = None) -> tuple[polars.DataFrame, polars.DataFrame] Compare fitted vs actual target values per group. Returns (metrics_df, comparison_df). .. py:method:: from_json(system: core.System, path: str) :staticmethod: .. py:method:: get_estimates() .. py:method:: get_value_function(group_key: str, data: Dict[str, numpy.ndarray]) .. py:method:: to_json(path: str) Functions --------- .. py:function:: calibrate_function(system, data, dataset_id, target_variable, base, functional_form: sympy.Expr, group_filters: dict[str, polars.Expr] = {}, constantsToOverwrite: dict = {}) " Calibrate the functional form for the specified dataset and target variable. Attributes ---------- .. py:data:: model_path :value: 'R:\\B2\\04 - EUROMOD JRC\\06 - Working area\\01 - Common\\15 - Release...