Skip to content

Commit

Permalink
Take into account the weight factor in clp_penalties (#1367)
Browse files Browse the repository at this point in the history
And equal area constraint can be a bit heavy without it
  • Loading branch information
jsnel authored Oct 17, 2023
1 parent a2211d6 commit d4ccfc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions glotaran/optimization/penalty.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def calculate_clp_penalties(
return np.array(
[
np.abs(np.sum(np.abs(source)) - penalty.parameter * np.sum(np.abs(target)))
* penalty.weight
for penalty, source, target in zip(penalties, sources, targets)
]
)

0 comments on commit d4ccfc4

Please sign in to comment.