----------------------------------------------------- lines 6-102 of file: at_cascade/avgint_parent_grid.py ----------------------------------------------------- {xrst_begin avgint_parent_grid} Predicts Rates and Covariate Multipliers on Parent Grid ####################################################### Prototype ********* {xrst_literal # BEGIN_DEF # END_DEF } Purpose ******* Create an avgint table that can be used to predict the rates and covariate multipliers on the parent grid. For child nodes, the predictions are for the :ref:`split_reference_table@split_reference_value` for the parent node. For the parent node, the predictions are for all the possible split reference values. all_node_database ***************** is a python string containing the name of the :ref:`all_node_db-name`. This argument can't be ``None``. fit_database ************ is a python string containing the name of the :ref:`glossary@fit_database`. A new avgint table will be placed in this database, the previous avgint table in this database is lost, and there are no other changes to the database. This argument can't be ``None``. job_table ********* This is a :ref:`create_job_table@job_table` containing the jobs necessary to fit the :ref:`glossary@fit_goal_set`. If this is ``None`` , we are doing predictions for the same node and split reference id a in *fit_database* (This is only used by :ref:`no_ode_fit-name` .) fit_job_id ********** This is the :ref:`create_job_table@job_table@job_id` for the job fits the fit_database. This is not used when *job_table* is ``None`` . parent_node =========== We use *parent_node* to refer to the parent node in the dismod_at option table in the fit_database. avgint Table ************ The new avgint table has all the standard dismod_at columns plus the extra columns ( beginning with c\_ ) listed below. This avgint table enables predictions for all the covariate multipliers and all the rates. Note that the rates (covariate multipliers) depend (do not depend) on the covariate reference value. 1. If *job_table* is ``None`` , the avgint table enables predictions at the same covariate reference values as for the parent_node in *fit_database* . Otherwise, see the cases below. 2. This avgint table enables predictions at the covariate reference values corresponding to each (node_id, split_reference_id) pair that are children of the fit job. c_age_id ======== This column identifies a row in the age table of the fit_database that this prediction is for. c_time_id ========= This column identifies a row in the time table of the fit_database that this prediction is for. c_split_reference_id ==================== This column identifies a row in the split_reference table of the all_node_database that this prediction is for. If the split_reference table is empty (non-empty) the value will be (will not) be ``None``. It is also ``None`` for the covariate multiplier predictions. Rectangular Grid ================ For each covariate multiplier that has non-null group smoothing, all of the age time pairs in the smoothing are represented in the new avgint table. For each :ref:`child job` , each rate that has non-null parent smoothing, and each age time pair in the smoothing, there is a row in the new avgint table. {xrst_end avgint_parent_grid}