.. _fwflag_cca_predict_components: ======================== --cca_predict_components ======================== Switch ====== --cca_predict_components Description =========== Predicts component distribution given a model. Argument and Default Value ========================== None Details ======= Given a pickle model (:doc:`fwflag_load_model` and :doc:`fwflag_picklefile`), which was generated by :doc:`fwflag_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 :doc:`fwflag_cca_outcomes_vs_controls`), change: .. code-block:: bash 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 :doc:`fwflag_csv` and/or :doc:`fwflag_to_sql_table` Other Switches ============== Required Switches: * :doc:`fwflag_d`, :doc:`fwflag_c`, :doc:`fwflag_t` * :doc:`fwflag_f` * :doc:`fwflag_load_model` * :doc:`fwflag_picklefile` Optional Switches: * :doc:`fwflag_group_freq_thresh` * :doc:`fwflag_outcome_controls` * :doc:`fwflag_csv` * :doc:`fwflag_output_name` Example Commands ================ .. code-block:: bash # 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