def process_cnn_data_predictions(self, data, aux_data, num_unique_stock_ids, num_unique_image_types, num_unique_time_days, image_size, keras_model_type, input_autoencoder_model_file_path, training_data, data_augmentation_test, montage_image_number, full_montage_image_size):
    trainX = []
    testX = []
    trainY = []
    testY = []
    datagen = self.get_imagedatagenerator()
    datagen.fit(training_data)
    data = datagen.standardize(data)
    output_image_file = aux_data['output_image_file'].tolist()
    data = self.create_montages(data, montage_image_number, image_size, full_montage_image_size)
    autoencoder_model = load_model(input_autoencoder_model_file_path)
    data = autoencoder_model.predict(data)
    if (keras_model_type == 'KerasCNNLSTMDenseNet121ImageNetWeights'):
        data = data.reshape(((data_augmentation_test * num_unique_stock_ids) * num_unique_image_types), num_unique_time_days, image_size, image_size, 3)
    output_image_counter = 0
    for image in data:
        cv2.imwrite(output_image_file[output_image_counter], (image * 255))
        output_image_counter += 1
    stock_id_binarizer = LabelBinarizer().fit(aux_data['stock_id'])
    stock_id_categorical = stock_id_binarizer.transform(aux_data['stock_id'])
    accession_id_binarizer = LabelBinarizer().fit(aux_data['accession_id'])
    accession_id_categorical = accession_id_binarizer.transform(aux_data['accession_id'])
    female_id_binarizer = LabelBinarizer().fit(aux_data['female_id'])
    female_id_categorical = female_id_binarizer.transform(aux_data['female_id'])
    male_id_binarizer = LabelBinarizer().fit(aux_data['male_id'])
    male_id_categorical = male_id_binarizer.transform(aux_data['male_id'])
    continuous = [col for col in aux_data.columns if ('aux_trait_' in col)]
    cs = MinMaxScaler()
    if (len(continuous) > 0):
        fitContinuous = cs.fit_transform(aux_data[continuous])
        fitX = fitContinuous
    else:
        fitX = []
    fitX = np.array(fitX)
    max_label = aux_data['value'].max()
    fitY = (aux_data['value'] / max_label)
    genotype_files = aux_data['genotype_file'].tolist()
    genotype_data = []
    for f in genotype_files:
        if (pd.isna(f) is False):
            geno_data = pd.read_csv(f, sep='\t', header=None, na_values='NA')
            genotype_data.append(np.array(geno_data.iloc[:, 0]))
    genotype_data = np.array(genotype_data)
    return (data, fitX, genotype_data, fitY.to_numpy())
def process_cnn_data_predictions(self, data, aux_data, num_unique_stock_ids, num_unique_image_types, num_unique_time_days, image_size, keras_model_type, input_autoencoder_model_file_path, training_data, data_augmentation_test, montage_image_number, full_montage_image_size):
    trainX = []
    testX = []
    trainY = []
    testY = []
    datagen = self.get_imagedatagenerator()
    datagen.fit(training_data)
    data = datagen.standardize(data)
    output_image_file = aux_data['output_image_file'].tolist()
    data = self.create_montages(data, montage_image_number, image_size, full_montage_image_size)
    autoencoder_model = load_model(input_autoencoder_model_file_path)
    data = autoencoder_model.predict(data)
    if (keras_model_type == 'KerasCNNLSTMDenseNet121ImageNetWeights'):
        data = data.reshape(((data_augmentation_test * num_unique_stock_ids) * num_unique_image_types), num_unique_time_days, image_size, image_size, 3)
    output_image_counter = 0
    for image in data:
        cv2.imwrite(output_image_file[output_image_counter], (image * 255))
        output_image_counter += 1
    stock_id_binarizer = LabelBinarizer().fit(aux_data['stock_id'])
    stock_id_categorical = stock_id_binarizer.transform(aux_data['stock_id'])
    accession_id_binarizer = LabelBinarizer().fit(aux_data['accession_id'])
    accession_id_categorical = accession_id_binarizer.transform(aux_data['accession_id'])
    female_id_binarizer = LabelBinarizer().fit(aux_data['female_id'])
    female_id_categorical = female_id_binarizer.transform(aux_data['female_id'])
    male_id_binarizer = LabelBinarizer().fit(aux_data['male_id'])
    male_id_categorical = male_id_binarizer.transform(aux_data['male_id'])
    continuous = [col for col in aux_data.columns if ('aux_trait_' in col)]
    cs = MinMaxScaler()
    if (len(continuous) > 0):
        fitContinuous = cs.fit_transform(aux_data[continuous])
        fitX = fitContinuous
    else:
        fitX = []
    fitX = np.array(fitX)
    max_label = aux_data['value'].max()
    fitY = (aux_data['value'] / max_label)
    genotype_files = aux_data['genotype_file'].tolist()
    genotype_data = []
    for f in genotype_files:
        if (pd.isna(f) is False):
            geno_data = pd.read_csv(f, sep='\t', header=None, na_values='NA')
            genotype_data.append(np.array(geno_data.iloc[:, 0]))
    genotype_data = np.array(genotype_data)
    return (data, fitX, genotype_data, fitY.to_numpy())