:py:mod:`ForeTiS.postprocess.model_reuse` ========================================= .. py:module:: ForeTiS.postprocess.model_reuse Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: ForeTiS.postprocess.model_reuse.apply_final_model .. py:function:: apply_final_model(results_directory_model, old_data_dir, old_data, new_data_dir, new_data, save_dir = None, config_file_path = None, retrain_model = True) Apply a final model on a new dataset. It will be applied to the whole dataset. So the main purpose of this function is, if you get new samples you want to predict on. If the final model was saved, this will be used for inference on the new dataset. Otherwise, it will be retrained on the initial dataset and then used for inference on the new dataset. The new dataset will be filtered for the SNP ids that the model was initially trained on. CAUTION: the SNPs of the old and the new dataset have to be the same! :param results_directory_model: directory that contains the model results that you want to use :param new_data_dir: directory that contains the new data :param old_data_dir: directory that contains the old data :param save_dir: directory to store the results :param old_data: the old dataset that you used :param new_data: the new dataset that you want to use :param config_file_path: the path to the config file you want to use :param retrain_model: whether to retrain the model with the whole old dataset