-------------------------------------------------- lines 6-119 of file: at_cascade/csv/pre_one_job.py -------------------------------------------------- {xrst_begin csv.pre_one_job} {xrst_spell avg avgint tru } Calculate the predictions for One Fit ##################################### Prototype ********* {xrst_literal # BEGIN_DEF # END_DEF } predict_job_name **************** This string specifies the node and sex corresponding to this prediction. fit_dir ******* This string is the directory name where the input and output csv files are located. sim_dir ******* is the directory name where the csv simulation files are located. pre_database ************ The directory where *pre_database* is located identifies the node and sex for this prediction. The file *pre_database* is a copy of the fit database used for this prediction. The node and sex for the fit is either the same as for the prediction, or an ancestor of the node and ex for the prediction. predict_node_id *************** This int is the node_id in the node we are predicting for. all_node_database ***************** This string is the all node database for this fit. all_covariate_table ******************* The list of dict is the in memory representation of the covariate.csv file float_precision *************** This is the number of decimal digits of precision to include for float values in fit_predict.csv, sam_predict.csv, and tru_predict.csv; see below. fit_same_as_predict ******************* If true, the node and sex for this prediction is the same as the node and sex for the fit. Otherwise it is a fit for the closest ancestor that has a successful cascade fit. To be specific, ``sample: OK`` is in its :ref:`fit_one_job@fit_database@log`. option_predict ************** This is an in memory representation of :ref:`csv.predict@Input Files@option_predict.csv` . Csv Output Files **************** #. The csv output files are located in the prediction directory; i.e., the directory corresponding to the predictions for this location, sex. #. The predictions are on the same age, time grid as the covariate file. #. If *fit_same_as_predict* is true, the following files are created (the tru_posterior.csv file is not created when *sim_dir* is None): .. csv-table:: fit_posterior.csv, uses optimal posterior variable values sam_posterior.csv, uses samples from the posterior tru_posterior.csv, uses simulation variable values for this location,sex #. If *fit_same_as_predict* is false, the following files are created (the tru_prior.csv file is not created when *sim_dir* is None): .. csv-table:: fit_prior.csv, uses optimal prior variable values sam_prior.csv, uses samples from the prior tru_prior.csv, uses simulation variable values for an ancestor #. The following columns are included in these files (the sample_index column is only included in the sample files): .. csv-table:: :header-rows: 1 Column, Meaning avgint_id, This index the value we are predicting sample_index, This index the random samples for each value avg_integrand, This is the model value for the prediction age_lower, Lower age limit for averaging this integrand age_upper, Upper age limit for averaging (must equal lower). time_lower, Lower time limit for averaging this integrand time_upper, Upper time limit for averaging (must equal lower). node_id, Identifies the node for this prediction. x_j, Value of the j-th covariate {xrst_end csv.pre_one_job}