Cost objectives
Manopt.AbstractManifoldCostObjective — Type
AbstractManifoldCostObjective{T<:AbstractEvaluationType} <: AbstractManifoldObjective{T}Representing objectives on manifolds with a cost function implemented.
Manopt.ManifoldCostObjective — Type
ManifoldCostObjective{T, TC} <: AbstractManifoldCostObjective{T, TC}specify an AbstractManifoldObjective that does only have information about the cost function $f: \mathcal{M} → ℝ$ implemented as a function (M, p) -> c to compute the cost value c at p on the manifold M.
cost: a function $f: \mathcal{M} → ℝ$ to minimize
Constructors
ManifoldCostObjective(f)Generate a problem. While this Problem does not have any allocating functions, the type T can be set for consistency reasons with other problems.
Used with
Access functions
Manopt.get_cost — Function
get_cost(amp::AbstractManoptProblem, p)evaluate the cost function f stored within the AbstractManifoldObjective of an AbstractManoptProblem amp at the point p.
get_cost(M::AbstractManifold, obj::AbstractManifoldObjective, p)evaluate the cost function f defined on M stored within the AbstractManifoldObjective at the point p.
get_cost(M::AbstractManifold, mco::AbstractManifoldCostObjective, p)Evaluate the cost function from within the AbstractManifoldCostObjective on M at p.
By default this implementation assumed that the cost is stored within mco.cost.
get_cost(TpM::TangentSpace, aslso::SymmetricLinearSystemObjective, X)evaluate the cost
\[f(X) = \frac{1}{2} \lVert \mathcal{A}[X] + b \rVert_{p}^2,\qquad X ∈ T_{p}\mathcal{M},\]
at X.
get_cost(TpM, trmo::TrustRegionModelObjective, X)Evaluate the tangent space TrustRegionModelObjective
\[m(X) = f(p) + ⟨\operatorname{grad} f(p), X ⟩_p + \frac{1}{2} ⟨\operatorname{Hess} f(p)[X], X⟩_p.\]
get_cost(TpM, trmo::AdaptiveRegularizationWithCubicsModelObjective, X)Evaluate the tangent space AdaptiveRegularizationWithCubicsModelObjective
\[m(X) = f(p) + ⟨\operatorname{grad} f(p), X ⟩_p + \frac{1}{2} ⟨\operatorname{Hess} f(p)[X], X⟩_p + \frac{σ}{3} \lVert X \rVert^3,\]
at X, cf. Eq. (33) in [ABBC20].
get_cost(M::AbstractManifold, nlso::ManifoldNonLinearLeastSquaresObjective, p)Compute the cost of the least squares objective, i.e.
\[\frac{1}{2} \sum_{i=1}^{m} ρ_i \bigl( \lVert F_i(p) \rVert^2 \bigr),\]
where $F_i: \mathcal{M} → ℝ^{n_i}$ is the $i$th block component of length $n_i > 0$ and each $ρ_i: ℝ → ℝ$ is a [* R robustifier function, cf. AbstractRobustifierFunction, for each such a block component.
get_cost(
M::AbstractManifold, lmsco::LevenbergMarquardtLinearSurrogateObjective, p, X
)Compute the surrogate cost. Let $F$ denote the vector of residuals (of a block), $ρ, ρ'$, $ρ''$ the value, first, and second derivative of the AbstractRobustifierFunction of the inner ManifoldNonlinearLeastSquaresObjective
\[σ_k(X) = \frac{1}{2}\lVert y + \mathcal{L}(X) \rVert_{2}^2, \qquad X ∈ T_{p}\mathcal{M}\]
where
- $\mathcal{L}(X) = CJ[X]$ see
get_linear_operatorwith apenaltyof zero. - $y$ the rescaled vector field, see
get_vector_field
get_cost(TpM::TangentSpace, neo::NormalEquationsObjective{E, <:LevenbergMarquardtLinearSurrogateObjective}, X)Compute the surrogate cost when solving its normal equation, see also get_cost(::AbstractManifold, ::LevenbergMarquardtLinearSurrogateObjective, p, X), get_linear_operator, and get_vector_field for more details.
get_cost(M::AbstractManifold, sgo::ManifoldStochasticGradientObjective, p, i)Evaluate the ith summand of the cost.
If you use a single function for the stochastic cost, then only the index ì=1` is available to evaluate the whole cost.
get_cost(M::AbstractManifold,emo::EmbeddedManifoldObjective, p)Evaluate the cost function of an objective defined in the embedding by first embedding p before calling the cost function stored in the EmbeddedManifoldObjective.
get_cost(M::AbstractManifold, scaled_objective::ScaledManifoldObjective, p)Evaluate the scaled objective. $s*f(p)$
get_cost(p::AbstractManoptProblem, s::AbstractManoptSolverState)Get cost at the current iterate of the solver state s for the problem p. The method may be implemented by particular solvers if they store the cost at the current iterate in the state, but by default it is obtained by calling get_cost(p, get_iterate(s)).
and internally
Manopt.get_cost_function — Function
get_cost_function(amco::AbstractManifoldCostObjective; recursive=false)return the function to evaluate (just) the cost $f(p)=c$ as a function (M,p) -> c. If amco has more than one decorator, recursive determines whether just one (false) or all wrappers (true) should be “unwrapped” at once.