Skip to content

Commit 626defd

Browse files
committed
Add Changelog entry.
1 parent b8c8210 commit 626defd

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The file was started with Version `0.4`.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.6.1] unreleased
10+
11+
### Added
12+
13+
* the [gradient sampling algorithm](https://manoptjl.org/stable/solvers/gradient_sampling/) based on the paper by [Hosseini and Uschmajew](https://doi.org/10.1137/16m1069298) (#618)
14+
915
## [0.6.0] June 24, 2026
1016

1117
This is a breaking change since the JuMP extension is dropped.

src/solvers/gradient_sampling.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $(_args(:M))
6464
$(_args(:sub_problem))
6565
$(_args(:sub_state))
6666
67-
## Keyowrd arguments
67+
## Keyword arguments
6868
6969
$(_kwargs(:p; add_properties = [:as_Initial]))
7070
$(_kwargs(:retraction_method))
@@ -250,7 +250,7 @@ $(_note(:GradientObjective))
250250
$(_kwargs(:differential))
251251
$(_kwargs(:evaluation; add_properties = [:GradientExample]))
252252
$(_kwargs(:retraction_method))
253-
* `sample_size = 5` set the number of sampling points. If you initialise `sampled_points`, `sampled_vectors`, and `convex_hull_coeffs` directly
253+
* `sample_size = `$(_link(:manifold_dimension))`+1` set the number of sampling points. If you initialise `sampled_points`, `sampled_vectors`, and `convex_hull_coeffs` directly
254254
this parameter has no effect.
255255
* `sampling_radius = 0.5`
256256
* `sampling_radius_reduction = 0.5`
@@ -307,7 +307,7 @@ end
307307
function gradient_sampling!(
308308
M::AbstractManifold, mgo::O, p;
309309
X = zero_vector(M, p),
310-
sample_size::Int = 5,
310+
sample_size::Int = manifold_dimension(M)+1,
311311
convex_hull_coeffs::AbstractVector = [0.0 for _ in 1:(sample_size + 1)],
312312
retraction_method::AbstractRetractionMethod = default_retraction_method(M, typeof(p)),
313313
sampled_points::AbstractVector = [copy(M, p) for _ in 1:(sample_size + 1)],

test/solvers/test_gradient_sampling.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ grad_f(M, p) = sum(1 / d * grad_distance.(Ref(M), data, Ref(p)))
2020
m1 = gradient_descent(
2121
M, f, grad_f, p0;
2222
return_state = true,
23-
debug = _debug_gradient_sampling ? [:Iteration, :Cost, " ", :Stepsize, " ", :GradientNorm, "\n", :Stop] : [],
2423
record = [:Iteration, :Cost, RecordGradientNorm()]
2524
);
2625

2726
m2 = gradient_sampling(
2827
M, f, grad_f, p0;
2928
return_state = true,
30-
debug = _debug_gradient_sampling ? [:Iteration, :Cost, " ", :Stepsize, " ", :GradientNorm, " ", :Change, "\n", :Stop] : [],
29+
debug = _debug_gradient_sampling ? [:Iteration, :Cost, " ", :subgradient_norm_tolerance, " ", :sampling_radius, " | ", :GradientNorm, " ", :Change, "\n", :Stop, 100] : [],
3130
record = [:Iteration, :Cost, RecordGradientNorm()]
3231
)
3332

0 commit comments

Comments
 (0)