Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 25, 2024
1 parent a91b5a7 commit 65d9569
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions ipsuite/analysis/model/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def get_figure(
ax.legend()
return fig


def get_calibration_figure(
error,
std,
Expand Down
10 changes: 6 additions & 4 deletions ipsuite/analysis/model/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,17 @@ def get_data(self):
forces_uncertainty = [x.calc.results["forces_uncertainty"] for x in self.y]
forces_uncertainty = np.array(forces_uncertainty) * 1000
n_ens = self.y[0].calc.results["forces_ensemble"].shape[0]
forces_ensemble = [np.reshape(x.calc.results["forces_ensemble"], (n_ens,-1)) for x in self.y]
forces_ensemble = [
np.reshape(x.calc.results["forces_ensemble"], (n_ens, -1)) for x in self.y
]
forces_ensemble = np.array(forces_ensemble) * 1000
forces_ensemble = np.transpose(forces_ensemble, (0,2,1))
forces_ensemble = np.reshape(forces_ensemble, (-1, n_ens))
forces_ensemble = np.transpose(forces_ensemble, (0, 2, 1))
forces_ensemble = np.reshape(forces_ensemble, (-1, n_ens))

self.content["forces_true"] = np.reshape(true_forces, (-1,))
self.content["forces_pred"] = np.reshape(pred_forces, (-1,))
self.content["forces_unc"] = np.reshape(forces_uncertainty, (-1,))
self.content["forces_ensemble"] = forces_ensemble
self.content["forces_ensemble"] = forces_ensemble

def get_metrics(self):
"""Update the metrics."""
Expand Down

0 comments on commit 65d9569

Please sign in to comment.