csv.set_truth

View page source

Set the Truth Table for a Fitted Database

Prototype

# at_cascade.csv.set_truth
def set_truth(sim_dir, fit_database, root_database) :
   assert type(sim_dir) == str
   assert type(fit_database) == str
   assert type(root_database) == str

sim_dir

Is the sim_dir for the simulation of this cascade data set.

fit_database

Is the name of a database, relative to the current directory, that corresponds to a fit.

  1. A new truth_var table is written to this database containing the dismod_at variable values corresponding to truth during the simulation.

  2. Note that the rate random effects are in log space and relative to the fixed effect rate at the same age and time.

  3. The contents of the database, and not its location relative to the fit_dir is used to determine the node and sex for the truth. In fact, this routine does not know what the fit_dir is.

root_database

is the root_database .