-------------------------------------------------- lines 6-72 of file: at_cascade/csv/ancestor_fit.py -------------------------------------------------- {xrst_begin csv.ancestor_fit} Determine Closet Ancestor With Fit and Samples ############################################## Prototype ********* {xrst_literal , # BEGIN_DEF, # END_DEF # BEGIN_RETURN, # END_RETURN } fit_dir ******* is the directory where the csv files are located. job_table ********* is the :ref:`create_job_table@job_table` for this cascade. predict_job_id ************** is the :ref:`create_job_table@job_table@job_id` for this prediction. node_table ********** is the list of dict corresponding to the node table for this cascade. root_node_id ************ is the node_id in the node table for the root node for this cascade. Note that csv version of the cascade does its sex split at this node. root_split_reference_id *********************** is the split_reference_id (sex id) for the root node of the cascade. The cascade can begin at female, both, or male. at_cascade_log_dict ******************* is a dictionary, with keys equal to job names, containing the log messages that have type ``at_cascade`` . The messages for each key are in the log table for the corresponding job. allow_same_job ************** If this is true (false) the a job corresponding to the ancestor fit can be the same as the job for the prediction; i.e., the predict job is the closest ancestor job. Otherwise, the parent of the predict job is the closest ancestor job. predict_job_dir *************** This is the directory, relative to the *fit_dir*, that corresponds to the *predict_job_id* . See :ref:`get_database_dir-name` . ancestor_job_dir **************** This is the directory, relative to the *fit_dir*, that corresponds to the closest ancestor of *predict_job_id* that had a successful fit and posterior sampling. To be specific, ``sample: OK`` is in its :ref:`fit_one_job@fit_database@log` . {xrst_end csv.ancestor_fit}