Commit aedfd61
authored
smr_alignment.MetricAlignmentOptimizer: Make entropy penalty convex (#19)
Previously, `MetricAlignmentOptimizer.optimize_weights()` used the
`cvxpy` built-in `cvxpy.entr(x)` entropy penalty. What I didn't
realise until I ran the optimizer on real data, is that this
function is actually concave. Therefore, it is possible, that the
overall optimization problem is not convex anymore, messing up our
convex solver.
This adapts the entropy penalty to be a basic L2 penalty,
which is convex.
Fixes #161 parent 8d99d79 commit aedfd61
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
0 commit comments