Skip to content
Snippets Groups Projects

Restructured code to use classes compatible with joblib and minimize hacks when saving

Merged Danilo Enoque Ferreira de Lima requested to merge save into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -518,7 +518,7 @@ class Model(TransformerMixin, BaseEstimator):
@@ -518,7 +518,7 @@ class Model(TransformerMixin, BaseEstimator):
# calculate the effect of the PCA
# calculate the effect of the PCA
high_res = self.y_model['smoothen'].transform(high_res_data)
high_res = self.y_model['smoothen'].transform(high_res_data)
high_pca = self.y_model.transform(high_res_data)
high_pca = self.y_model['pca'].transform(high_res)
high_pca_rec = self.y_model['pca'].inverse_transform(high_pca)
high_pca_rec = self.y_model['pca'].inverse_transform(high_pca)
high_pca_unc = np.sqrt(np.mean((high_res - high_pca_rec)**2, axis=0, keepdims=True))
high_pca_unc = np.sqrt(np.mean((high_res - high_pca_rec)**2, axis=0, keepdims=True))
self.y_model['unc'].set_uncertainty(high_pca_unc)
self.y_model['unc'].set_uncertainty(high_pca_unc)
Loading