Predicts component distribution given a model.

Argument and Default Value



Given a pickle model (--load_model and --picklefile), which was generated by --cca, predict the component distribution over the groups, using the Z matrix view (which is usually the outcomes).

If you want to use the X matrix view (features usually or controls if --cca_outcomes_vs_controls), change:

def predictCompsToSQL(self,tablename=None,  groupFreqThresh = 0, csv = False, outputname = None, NAthresh = 4, useXmatrix = False):

NOTE: this doesn't save anything by default, use either --csv and/or fwflag_to_sql_table

Other Switches

Required Switches:

Optional Switches:

Example Commands

# Uses model and disease values to predict component distribution per county, and outputting the county values into
# both the DELETEME MySQL table and the deleteMe.csv file.
dlatkInterface.py -d county_disease -t messages_en -c cnty -f 'feat$cat_met_a30_2000_cp_w$messages_en$cnty$16to16' --group_freq_thresh 0 --outcome_table topDeaths_comp_0910 --outcomes 01hea_aar 02mal_aar 03chr_aar 04cer_aar 05acc_aar 06alz_aar 07dia_aar 08nep_aar 09flu_aar 10sel_aar 11sep_aar 12liv_aar 13hyp_aar 14par_aar 15pne_aar  --cca_predict_components --load_model --picklefile diseasesOnd6s4.K10.X0_4.Z0_4.gft0.pickle --to_sql_table DELETEME --csv --output_name deleteMe.csv