GitHub Latest code available on GitHub at all times, and accepting pull requests.

Go to the tutorial page for the simple installation instructions and a first example.

It helps us to know our users: please follow this link to hear about updates. Thanks!

- Manopt 3.0, packaged November 12, 2016.
- Code moved to GitHub! Now accepting pull requests, and accelerating distribution of patches.
- Bugs caught
- Logic bug in linesearch: lsmem handling corrected thanks to Wen Huang. The default line-search algorithm for steepest descent should now be much faster.
- Logic bug in getGradient when using problem.grad with a different number of inputs compared to problem.cost.
- Corrected logic in plotting step of example low_rank_dist_completion
- obliquefactory, in transposed mode, had an incorrect M.log
- Modifications to core engine
- Added capability to obtain a partial gradient (Euclidean or Riemannian) of a cost function by specifying problem.partialgrad or problem.partialegrad coupled with problem.ncostterms. This is an important step to simplify the future addition of stochastic gradient methods. Use cases are: if problem.cost is expressed as a sum of problem.ncostterms terms, then problem.partialgrad accepts a point x and an index set I so that only the gradient with respect to terms indexed in I is computed and returned.
- Added possibility to define problem.approxgrad, to provide an approximation of the gradient. This can be populated with a generic gradient approximation based on finite differences via approxgradientFD. Solvers do this by default if they need a gradient and none is given. This feature is slow, but may be useful for prototyping. It is slow because Manopt generates an orthonormal basis of the tangent space, and compute a finite difference approximation of the directional derivative along each basis vector to get an approximate gradient (see also next item and new example thomson_problem.)
- getGradient now knows how to compute the gradient if the directional derivatives are accessible. This involves generating an orthonormal basis of the tangent space at the current point, then evaluating the directional derivative along each basis vector and taking the appropriate linear combination. This is very slow, especially for high dimensional manifolds.
- New tools
- lincomb for a generic way of computing a long linear combination of tangent vectors.
- grammatrix to compute the Gram matrix of a collection of tangent vectors.
- orthogonalize to orthogonalize a basis of tangent vectors.
- tangentorthobasis to obtain a random orthonormal basis of a tangent space, generically.
- smallestinconvexhull to compute the smallest tangent vector in the convex hull of a given collection of tangent vectors.
- hessianmatrix to get a matrix representing the Hessian at a point in an orthonormal tangent basis.
- checkretraction allows, for manifolds which have a correct exponential implemented, to verify the order of agreement between the retraction and the exponential, in order to determine numerically if the retraction is first- or second-order.
- New examples
- elliptope_SDP solves SDP's over positive semidefinite matrices with diagonal of 1's. This should run faster than the Max-Cut example for quite a few things.
- elliptope_SDP_complex, same as above for complex matrices. This solves the SDP which appears in PhaseCut and phase synchronization, for example.
- thomson_problem to illustrate the new features that allow to not specify the gradient of the cost (slow, but good for prototyping.)
- New geometries
- skewsymmetricfactory for skew-symmetric matrices (Euclidean geometry
- obliquecomplexfactory, to work with complex matrices whose columns (or rows) all have unit norm
- Modifications to previous behavior
- symfixedrankYYcomplexfactory now has a Riemannian metric matching that of euclideanfactory (it was scaled down by 2 as compared to previous Manopt versions.) This makes it easier to switch between those two geometries. Relevant changes propagated to radio_interferometric_calibration.
- hessianextreme now returns the info structure returned by the internal solver call. The helper tool tangentspherefactory now incorporates extra projections to ensure the vector returned by hessianextreme is indeed a tangent vector (former version could suffer from numerical drift.)
- At the end of generalized_eigenvalue_computation, added a rotation of Xsol to match the definition of generalized eigenvectors (the eigenvalues were fine.)
- Numerous minor improvements; highlights:
- rotationsfactory now has a function M.retr2 which is a second-order retraction.
- spherefactory and related sphere geometries now have a distance function M.dist which is orders of magnitude more accurate for close-by points.
- neldermead now respects options.verbosity < 2.
- plotprofile / surfprofile have now mostly optional inputs, making them easier to call for a quick glimpse at the cost function.
- Manopt 2.0, packaged July 6, 2015.
- Revamped the internal hashing system used for caching:
*Manopt no longer uses hashing*, which leads to speed-ups and cleaner internal code. Solvers need to be adapted consequently, to use the StoreDB class. - The caching system now offers a shared memory, which can be accessed and modified at all points. This can notably be used to count function evaluations, or to produce Hessian approximations which require previous iterations memory (such as BFGS for example).
- Because of the new class StoreDB,
*Octave compatibility is unfortunately compromised*until Octave supports Matlab's classdef object oriented programming. - New geometries:
- specialeuclideanfactory (for rigid body motions).
- multinomialfactory (for probability distributions, i.e., simplex elements).
- euclideancomplexfactory (for complex matrices).
- spheresymmetricfactory (for unit norm symmetric matrices)
- stiefelcomplexfactory (for complex orthonormal matrices)
- stiefelgeneralizedfactory (for matrices which are orthonormal in another basis)
- stiefelstackedfactory (for multiple orthonormal matrices of same size, represented in stacked form)
- grassmanncomplexfactory (complex Grassmannian, for complex subspaces of $\mathbb{C}^n$)
- grassmanngeneralizedfactory (for optimization over subspaces, represented via orthonormal bases in a non-standard basis)
- symfixedrankYYcomplexfactory (for complex fixed-rank positive semidefinite matrices)
- fixedrankfactory_tucker_preconditioned (for optimization over fixed-rank tensors, in Tucker format)
- centeredmatrixfactory (matrices whose rows or columns sum to zero)
- spherecomplexfactory: added ehess2rhess.
- complexcirclefactory: distance function corrected.
- Contributions more explicitly acknowledged in some files, notably via BibTex entries.
- hessianspectrum: output eigenvalues now sorted, and the square root of the preconditioner, if available, must now be given through problem.sqrtprecon, not as an additional input. An option now allows to ask for the Hessian spectrum or the preconditioned Hessian spectrum, explicitly.
- New management of Hessian approximations and preconditioners. The file hessianapproxFD encapsulates Manopt's standard approximation, with access to options. A first generic preconditioner allows solving linear systems involving the Hessian (for Newton-type methods): preconhessiansolve.
- Line-search algorithms now work with StoreDB, and as a result have a simplified calling pattern. There is also a new one: linesearch_decrease.
- New tools:
`manoptsolve`

, to automatically call an appropriate solver (or a dynamically chosen solver) on a problem structure.`statsfunhelper`

, to ease the use of`options.statsfun`

, which allows recording custom statistics at each iteration during optimization. See the tutorial.`hessianextreme`

, to compute minimal and maximal eigenvectors and eigenvalues of the Hessian of a cost function.`surfprofile`

, to complement`plotprofile`

: used to plot a cost function restricted to a 1D or 2D subspace of a tangent space.`tangentspherefactory`

and`tangentspacefactory`

, to obtain a manifold representation of the unit sphere on the tangent space to a manifold at a given point, or a representation of the whole tangent space. Useful to solve optimization problems over those spaces.`dfunm`

,`dexpm`

,`dlogm`

,`dsqrtm`

: compute the Fréchet derivatives of matrix functions.- Trust-region solver:
- As of Manopt 1.0.6, the inner solver tCG monitors the model cost; an (innocuous) logic bug was corrected there. Theory behind this feature is now better understood (a paper reference + BibTex was added).
- Warns if many TR+ / TR- steps are detected, to suggest changing parameter values.
- Uses safe version of tic/toc timers (originally because Octave now supports them).
- In case rho evaluates to NaN (which really should not happen), the code now ensures that the step is rejected and the radius decreased, thus preventing stagnation. In an adversely crafted example, this helped the solver escape the region where NaN's appear (again, this is not supposed to happen, but it's good to handle it nonetheless).
- Many more comments inside the code.
- New examples:
- robust_pca, illustrating how to smooth a nonsmooth cost function (here, on the Grassmann manifold).
- low_rank_dist_completion, illustrating usage of Manopt as a building block in a rank-incremental optimization algorithm for SDP.
- dominant_invariant_subspace_complex, adapting dominant_invariant_subspace to the complex case.
- radio_interferometric_calibration, illustrating the usage of the complex fixed-rank manifold.
- nonlinear_eigenspace, showing how to address certain nonlinear eigenvalue problems.
- essential_svd, demonstrating the new geometry essentialfactory.
- generalized_eigenvalue_computation, shows how to use grassmanngeneralizedfactory to solve generalized eigenvalue problems.
- shapefit_smoothed, does sensor network localization from pairwise direction measurements, following the ShapeFit paper.
- New cost description function: sqrtprecon, for the square root of the preconditioner (used in hessianspectrum).
- The privatetools directory is now named core, and is
documented.

- Manopt 1.0.7, packaged August 12, 2014.
- Added the
`ehess2rhess`

function to complexcirclefactory. - Major revision of fixedrankembeddedfactory
for support of optimization over fixed-rank matrices. It is
now better documented, comes with an example called low_rank_matrix_completion,
and now has support for
`ehess2rhess`

and`tangent2ambient`

, a proper vector transport, works with the hessianspectrum tool, ... This revision was executed with the precious and frequent help of Bart Vandereycken, who first described this geometry in a paper. - All solvers now also return the
`options`

structure, to make it easier to investigate what options a solver uses and what their default values are. - It is now possible to specify a line-search hint function in
the
`problem`

structure; the result of that function will be used as a first guess in an Armijo backtracking line-search procedure, linesearch_hint. This is very useful if, for a given problem, you are able to make a good guess at how far along the search line one should look. It is much easier this way than with the previous way, which required implementing a whole new line-search algorithm. - Generally improved textual outputs (warnings, iteration information, stopping reasons...).
- The documentation (tutorial, reference) was updated to reflect all of these changes.
- The sympositivedefinitefactory
now has the correct dim() function and implements a new vector
transport as explained in the example.

- Manopt 1.0.6, packaged June 25, 2014.
- For uses of the trustregions solver with a nonlinear approximation of the Hessian (such as, for example, the default one if you do not specify a Hessian at all), the truncated-CG algorithm now explicitly checks that the model cost decreases with (inner) iterations. If an increase is witnessed (which is bad), tCG now returns the best step so far, which is always at least the Cauchy step.
- The sympositivedefinitefactory geometry for positive definite matrices was revised. It had a number of mistakes in it due to an incorrect assumption. You can access the file before 1.0.6 is released on the forum.
- Small bug fix in packing_on_the_sphere example, along an improvement of how the smoothing term is computed numerically.
- Added a Riemannian Hessian conversion tool for the Stiefel manifold, ehess2rhess.
- Added a new (Euclidean) manifold, symmetricfactory, to deal with symmetric matrices.
- Multiple enhancements and bug fixes for the embedded geometry of fixed rank matrices fixedrankembeddedfactory: now works with checkgradient, changed hash and typical dist, and the vector transport is now correct (it was wrong before, leading to failure of CG and RTR-FD). Thanks to Bart Vandereycken for the correct code.
- Random vector generation in Stiefel and Grassmann now make more sense.
- PSO (Particle Swarm Optimization) solver debugged to work with product and power manifolds too.
- Bug fix in grassmannfactory's retraction for k > 1, and added final re-orthonormalization at the end of exponential map following forum discussions.
- The functions in elliptopefactory
are now a tad faster, using bsxfun.

- Manopt
1.0.5, packaged January 2
^{nd}, 2014. - Many files are now better commented and documented. In particular, the solvers now have quite complete documentation in code, available using Matlab's help command.
- The trust region solver was modified substantially. The algorithm is now slightly different from the previous versions, but is cleaner in its handling of errors, and behaves almost the same as before for normal operations. In particular, the fine-convergence heuristic has been changed to match a standard heuristic from the literature (see in code for references and the relevant option). The online documentation was extended as well. The original trust region radius (Delta0 and Delta_bar) are now interpreted correctly. Their values are different from earlier Manopt versions as a result. if you get a lot of TR+ or TR- for the first few iterations, you may want to tweak those options.
- New geometry: sympositivedefinitefactory, for symmetric, positive definite matrices. Related example script: positive_definite_karcher_mean.m.
- Line search algorithms have been heavily modified. The basic line search for example is now invariant under shifting and rescaling of the cost function, and the built-in line search algorithms now accept options too. Line searches now do not expect to be given a normalized search direction anymore, and they can decide whether to use the norm as supplemental information or to be unaffected by it. For example, the default line search for the conjugate gradient solver (the adaptive line search) is not invariant to the norm of the search direction.
- New example for sparse PCA via optimization on the Stiefel manifold.
- Potential bug (that never triggered) with purgeStoredb
corrected.

- Manopt
1.0.4, packaged August 22
^{nd}, 2013. - This release is a first step toward compatibility with Octave. We're not there yet, but in the examples folder, you will find maxcut_octave.m (removed in 1.0.8), which should run in Octave 3.6.4. In there, more info about compatibility issues and limitations are provided.
- Manopt is not organized in a Matlab package anymore (so
folders are called folder
and not +folder):
**no**. Simply call`import`

's anymore`importmanopt`

to add all Manopt functions to the path, once. - Sign error in right hand side of Lyapunov equation in
`elliptopefactory.projection`

corrected.

- Manopt 1.0.3, packaged July 26, 2013.
- The new /manopt/examples directory now contains documented examples.
- Added manifolds spectrahedron and elliptope, for symmetric positive semidefinite fixed-rank matrices with constraints on the diagonal or the trace. Notably useful for max-cut like SDP relaxations (see examples) and correlation matrix approximation / completion etc.
- The Riemannian gradient and Hessian may be given via their
Euclidean counterparts, using
`problem.egrad`

and`problem.ehess`

. - Improved
`checkgradient`

and`checkhessian`

tools. - Added Riemannian log map for the Grassmann manifold.
- Made
`egrad2rgrad`

and`ehess2rhess`

available in more geometries. - Added the tool
`hessianspectrum`

to compute the eigenvalues of the Hessian (w/ or w/o preconditioner). - Added notions of
`tangent`

and`tangent2ambient`

to manifolds. - Added notions of
`vec`

and`mat`

for manifolds, to represent tangent vectors as column vectors.

- Manopt 1.0.2, packaged June 11, 2013.
- Improved trustregions solver (e.g., avoids a redundant Hessian computation).
- Improved conjugategradient solver: now admits preconditioning.
- Reorganized fixedrank geometries (not backward compatible).
- Many small improvements and bug fixes.

- Manopt
1.0.1, packaged February 7, 2013.

- Manopt 1.0,
packaged January 3
^{rd}, 2013.