elif task == '6': test_dataset_folder_path = os.path.abspath( os.path.join(Path(os.getcwd()).parent, test_dataset_path)) images_list = list( misc.get_images_in_directory(test_dataset_folder_path).keys()) metadata = Metadata(images_list) subject_id = int(input("Please input the subject Id : ")) sub_sub_list = metadata.sub_sub_list(subject_id) if sub_sub_list[0] == tuple([-1, -1]): print('Subject not present in the given dataset') else: print(sub_sub_list[0]) print(sub_sub_list[1]) print(sub_sub_list[2]) metadata.plot_subjects(subject_id, sub_sub_list, test_dataset_folder_path) elif task == '7': k = int(input("Enter the number of latent features to consider: ")) test_dataset_folder_path = os.path.abspath( os.path.join(Path(os.getcwd()).parent, test_dataset_path)) decomposition = Decomposition(feature_extraction_model_name='SIFT', test_folder_path=test_dataset_folder_path) images_list = list( misc.get_images_in_directory(test_dataset_folder_path).keys()) metadata = Metadata(images_list) sub_sub_matrix = metadata.subject_matrix() nmf = NMFModel(sub_sub_matrix, k, images_list) nmf.decompose() print('Decomposition Complete') nmf.print_term_weight_pairs(k)