Skip to content

Commit

Permalink
fixes analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Jul 15, 2023
1 parent f90c2e3 commit 8dd20fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sbmlsim/fit/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def plot_fit(self, output_dir: Path, x: np.ndarray) -> None:
markersize=10,
)
# plot simulation
ax.plot(x_obs, y_obs, "-", color="blue", label="observable")
ax.plot(x_obs.values, y_obs.values, "-", color="blue", label="observable")

xdelta = np.max(x_ref) - np.min(x_ref)
ax.set_xlim(
Expand Down Expand Up @@ -446,7 +446,7 @@ def plot_fit_residual(self, output_dir: Path, x: np.ndarray) -> None:
)

# prediction
ax.plot(x_obs, y_obs, "-", color="blue", label="observable")
ax.plot(x_obs.values, y_obs.values, "-", color="blue", label="observable")
ax.plot(x_ref, y_obsip, "o", color="blue", label="interpolation")

# reference data
Expand Down Expand Up @@ -571,8 +571,8 @@ def plot_datapoint_scatter(self, x: np.ndarray, path: Path):

for experiment in sorted(dp.experiment.unique()):
ax.plot(
dp.y_ref[dp.experiment == experiment],
dp.y_obs[dp.experiment == experiment],
dp.y_ref[dp.experiment == experiment].values,
dp.y_obs[dp.experiment == experiment].values,
# yerr=dp.y_ref_err,
linestyle="",
marker="o",
Expand Down Expand Up @@ -637,8 +637,8 @@ def plot_residual_scatter(self, x: np.ndarray, path: Path):

for experiment in sorted(dp.experiment.unique()):
ax.plot(
xdata[dp.experiment == experiment],
ydata[dp.experiment == experiment],
xdata[dp.experiment == experiment].values,
ydata[dp.experiment == experiment].values,
linestyle="",
marker="o",
# color="black",
Expand Down Expand Up @@ -908,12 +908,12 @@ def plot_traces(self, path: Path) -> None:
ax.set_title("Optimization traces")
for run in range(self.optres.size):
df_run = self.optres.df_traces[self.optres.df_traces.run == run]
ax.plot(range(len(df_run)), df_run.cost, "-", alpha=0.8)
ax.plot(range(len(df_run)), df_run.cost.values, "-", alpha=0.8)

for run in range(self.optres.size):
df_run = self.optres.df_traces[self.optres.df_traces.run == run]
ax.plot(
len(df_run) - 1, df_run.cost.iloc[-1], "o", color="black", alpha=0.8
len(df_run) - 1, df_run.cost.values[-1], "o", color="black", alpha=0.8
)

ax.set_xlabel("Optimization step")
Expand Down

0 comments on commit 8dd20fd

Please sign in to comment.