\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
avgint_parent_grid¶
View page sourcePredicts Rates and Covariate Multipliers on Parent Grid¶
Prototype¶
# at_cascade.avgint_parent_grid
def avgint_parent_grid(
all_node_database = None ,
fit_database = None ,
job_table = None ,
fit_job_id = None ,
) :
assert type(all_node_database) == str
assert type(fit_database) == str
assert type(job_table) == list or job_table == None
assert type(fit_job_id) == int or fit_job_id == None
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 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 all_node_db.
This argument can’t be None.
fit_database¶
is a python string containing the name of the 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 job_table containing the jobs
necessary to fit the 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 no_ode_fit .)
fit_job_id¶
This is the 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.
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.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 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.