def evaluate_model(self, model):
    preds = model.predict(self.X_test)
    print(self.X_test.shape)
    self.X_test = np.squeeze(self.X_test, axis=2)
    preds = np.squeeze(preds, axis=2)
    print(self.X_test.shape)
    self.X_test = self.scaler.inverse_transform(self.X_test)
    preds = self.scaler.inverse_transform(preds)
    for i in range(100):
        qso_ra = self.df_source_info.iloc[self.i_test[i]]['ra']
        qso_dec = self.df_source_info.iloc[self.i_test[i]]['dec']
        qso_plate = self.df_source_info.iloc[self.i_test[i]]['plate']
        qso_z = self.df_source_info.iloc[self.i_test[i]]['z']
        qso_class = self.df_source_info.iloc[self.i_test[i]]['class']
        plotify = Plotify(theme='ugly')
        (_, axs) = plotify.get_figax(nrows=2, figsize=(5.8, 8))
        axs[0].plot(self.wavelengths, self.X_test[i], color=plotify.c_orange)
        axs[1].plot(self.wavelengths, preds[i], color=plotify.c_orange)
        axs[0].set_title(f'''ra = {qso_ra}, dec = {qso_dec}, 
 z = {qso_z}, plate = {qso_plate}, class = {qso_class} 
''', fontsize=14)
        axs[1].set_title(f'''Autoencoder recreation 
''')
        axs[0].set_ylabel('$F_{\\lambda[10^{-17} erg \\: cm^{-2}s^{-1} Å^{-1}]}$', fontsize=14)
        axs[1].set_ylabel('$F_{\\lambda[10^{-17} erg \\: cm^{-2}s^{-1} Å^{-1}]}$', fontsize=14)
        axs[1].set_xlabel('Wavelength (Å)')
        plt.subplots_adjust(hspace=0.4)
        plt.savefig(f'plots/autoencoder/__all_sources/_autoencoder_{i}', dpi=160)
    return preds
def evaluate_model(self, model):
    preds = model.predict(self.X_test)
    print(self.X_test.shape)
    self.X_test = np.squeeze(self.X_test, axis=2)
    preds = np.squeeze(preds, axis=2)
    print(self.X_test.shape)
    self.X_test = self.scaler.inverse_transform(self.X_test)
    preds = self.scaler.inverse_transform(preds)
    for i in range(100):
        qso_ra = self.df_source_info.iloc[self.i_test[i]]['ra']
        qso_dec = self.df_source_info.iloc[self.i_test[i]]['dec']
        qso_plate = self.df_source_info.iloc[self.i_test[i]]['plate']
        qso_z = self.df_source_info.iloc[self.i_test[i]]['z']
        qso_class = self.df_source_info.iloc[self.i_test[i]]['class']
        plotify = Plotify(theme='ugly')
        (_, axs) = plotify.get_figax(nrows=2, figsize=(5.8, 8))
        axs[0].plot(self.wavelengths, self.X_test[i], color=plotify.c_orange)
        axs[1].plot(self.wavelengths, preds[i], color=plotify.c_orange)
        axs[0].set_title(f'ra = {qso_ra}, dec = {qso_dec}, 
 z = {qso_z}, plate = {qso_plate}, class = {qso_class} 
', fontsize=14)
        axs[1].set_title(f'Autoencoder recreation 
')
        axs[0].set_ylabel('$F_{\\lambda[10^{-17} erg \\: cm^{-2}s^{-1} Å^{-1}]}$', fontsize=14)
        axs[1].set_ylabel('$F_{\\lambda[10^{-17} erg \\: cm^{-2}s^{-1} Å^{-1}]}$', fontsize=14)
        axs[1].set_xlabel('Wavelength (Å)')
        plt.subplots_adjust(hspace=0.4)
        plt.savefig(f'plots/autoencoder/__all_sources/_autoencoder_{i}', dpi=160)
    return preds