Knorm BLMO#271
Conversation
… situations, so further improvements are needed.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
==========================================
- Coverage 86.23% 84.54% -1.70%
==========================================
Files 17 22 +5
Lines 1482 2711 +1229
==========================================
+ Hits 1278 2292 +1014
- Misses 204 419 +215 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Please remove the Hungarian package as dependency.
| struct KNormBallLMO <: FrankWolfe.LinearMinimizationOracle | ||
| K::Int | ||
| right_hand_side::Float64 | ||
| end |
There was a problem hiding this comment.
We don't really need an extra type.
| right_hand_side::Float64 | ||
| end | ||
|
|
||
| function bounded_compute_extreme_point(lmo::KNormBallLMO, direction, lb, ub, int_vars; kwargs...) |
There was a problem hiding this comment.
function bounded_compute_extreme_point(lmo::FrankWolfe.KNormBallLMO{T}, direction, lb, ub, int_vars; kwargs...)
..
end
Same for the other functions below.
| if li ≤ 0.0 ≤ ui | ||
| else | ||
| l1_min += min(abs(li), abs(ui)) | ||
| end |
There was a problem hiding this comment.
You don't really need the if statement here?
|
|
||
| n = 20 | ||
| sparsity = 0.3 | ||
| x_sol = [rand() < sparsity ? 0 : rand(1:floor(Int, n / 4)) for _ in 1:n] | ||
| n_int = 17 |
| """ | ||
| KNormBallLMO{T}(K::Int, right_hand_side::T) | ||
|
|
||
| LMO with feasible set being the K-norm ball in the sense of | ||
| [2010.07243](https://arxiv.org/abs/2010.07243), | ||
| i.e., the convex hull over the union of an | ||
| L_1-ball with radius τ and an L_∞-ball with radius τ/K: | ||
| ``` | ||
| C_{K,τ} = conv { B_1(τ) ∪ B_∞(τ / K) } | ||
| ``` | ||
| with `τ` the `right_hand_side` parameter. The K-norm is defined as | ||
| the sum of the largest `K` absolute entries in a vector. | ||
| """ |
| model_l1 = MOI.instantiate(HiGHS.Optimizer) | ||
| model_inf = MOI.instantiate(HiGHS.Optimizer) |
There was a problem hiding this comment.
Same comment here as with the KSparseLMO regarding using JuMP instead of MOI. Also, I believe you can use one model for this. This would also be more accurate as a test.
No description provided.