示例#1
0
    def metabolite_combined_dataset():
        """
         Runs the combined dataset of OAT1-OAT3-OATP.

        The GA will receive all the features together.
        Then, the random forest on top will use those features and get the
        accuracy on the dataset using 10-fold-cross validation.
         :return: None.
         """
        num_epochs = prompt_num_epochs()

        dl = DataLoaderMetabolite()
        train_data, train_labels, header = dl.load_oat1_3_p_combined()

        FeatureEngineering.acc_function = feature_eng_err_metab_comb

        algo = BaseGA('./configs/metabolite_FE.config',
                      checkpoint_prefix='FE_metab_cb_')
        FeatureEngineering.run_session(algo, header, num_epochs)
    def metabolite_combined_dataset():
        """
        Runs the small dataset of OAT1-OAT3.

        The GA will receive all the features together and then use leave one
        out to find its accuracy over given number of epochs.
        :return: None.
        """
        num_epochs = prompt_num_epochs()

        dl = DataLoaderMetabolite()
        train_data, train_labels, header = dl.load_oat1_3_p_combined()

        algo = BaseGA('./configs/metabolite_MULTI.config',
                      checkpoint_prefix='GA_metab_cb_')

        FeatureSelectionGA.acc_function = feature_sel_err_metab_comb

        FeatureSelectionGA.run_session(algo, header, num_epochs)
示例#3
0
    def metabolite_small_dataset():
        """
        Runs the small dataset of OAT1-OAT3.

        The GA will receive all the features together.
        Then, the random forest on top will use those features and get the
        accuracy on the dataset using leave one out.
        :return: None.
        """
        num_epochs = prompt_num_epochs()

        dl = DataLoaderMetabolite()
        train_data, train_labels, header = dl.load_oat1_3_small()

        FeatureEngineering.acc_function = feature_eng_err_metab_small

        algo = BaseGA('./configs/metabolite_FE.config',
                      checkpoint_prefix='FE_metab_sm_')

        FeatureEngineering.run_session(algo, header, num_epochs)