Skip to content

Commit 2091083

Browse files
authored
Merge pull request #4 from sylvchev/example_with_init
New example with initialization
2 parents 2c606ab + cf2070b commit 2091083

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

example.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import numpy as np
33
from pymanopt.optimizers.line_search import AdaptiveLineSearcher
44
from pyriemann.datasets import make_matrices
5+
from pyriemann.utils.mean import mean_covariance
56

67
from riemannianpca import compute_supervised_rpca
78

@@ -14,6 +15,7 @@
1415
"max_iterations": 30,
1516
"max_time": float("inf"),
1617
}
18+
starting_point = mean_covariance(C, metric="riemann")
1719

1820

1921
U, logs = compute_supervised_rpca(
@@ -24,7 +26,7 @@
2426
solver="steepest",
2527
solv_args=solv_args,
2628
return_log=True,
27-
init=None,
29+
init=starting_point,
2830
k=3,
2931
)
3032

0 commit comments

Comments
 (0)