Skip to content

Commit

Permalink
Adapt to PR changes
Browse files Browse the repository at this point in the history
Adapt to changes in `0884198f2394b1718b962cec25a4cf03461b092b` on branch staging_1474
  • Loading branch information
jsnel committed Sep 14, 2024
1 parent b6e5ce8 commit fc5ad20
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pyglotaran_extras/compat/compat_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def root_mean_square_error(self) -> float:
return self.optimization.root_mean_square_error

@property
def additional_penalty(self) -> list | None:
return None # TODO: implement
def additional_penalty(self) -> float | None:
return self.optimization.additional_penalty

@property
def optimized_parameters(self) -> Parameters:
Expand Down Expand Up @@ -120,9 +120,7 @@ def markdown(
["Reduced Chi Square", f"{self.reduced_chi_square or np.nan:.2e}"],
["Root Mean Square Error (RMSE)", f"{self.root_mean_square_error or np.nan:.2e}"],
]
if self.additional_penalty is not None and any(
len(penalty) != 0 for penalty in self.additional_penalty
):
if self.additional_penalty is not None:
general_table_rows.append(["RMSE additional penalty", self.additional_penalty])

result_table = tabulate(
Expand All @@ -135,8 +133,8 @@ def markdown(
RMSE_rows = [
[
f"{index}.{label}:",
dataset.weighted_root_mean_square_error,
dataset.root_mean_square_error,
dataset.attrs["weighted_root_mean_square_error"],
dataset.attrs["root_mean_square_error"],
]
for index, (label, dataset) in enumerate(self.data.items(), start=1)
]
Expand Down

0 comments on commit fc5ad20

Please sign in to comment.