|
GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
Public Types | |
| typedef GncParameters::OptimizerType | BaseOptimizer |
| For each parameter, specify the corresponding optimizer: e.g., GaussNewtonParams -> GaussNewtonOptimizer. | |
Public Member Functions | |
| GncOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const GncParameters ¶ms=GncParameters()) | |
| Constructor. | |
| void | setInlierCostThresholds (const double inth) |
| void | setInlierCostThresholds (const Vector &inthVec) |
| void | setInlierCostThresholdsAtProbability (const double alpha) |
| void | setWeights (const Vector w) |
| const NonlinearFactorGraph & | getFactors () const |
| Access a copy of the internal factor graph. | |
| const Values & | getState () const |
| Access a copy of the internal values. | |
| const GncParameters & | getParams () const |
| Access a copy of the parameters. | |
| const Vector & | getWeights () const |
| Access a copy of the GNC weights. | |
| const Vector & | getInlierCostThresholds () const |
| Get the inlier threshold. | |
| bool | equals (const GncOptimizer &other, double tol=1e-9) const |
| Equals. | |
| Vector | initializeWeightsFromKnownInliersAndOutliers () const |
| Values | optimize () |
| Compute optimal solution using graduated non-convexity. | |
| double | initializeMu () const |
| Initialize the gnc parameter mu such that loss is approximately convex (remark 5 in GNC paper). | |
| double | updateMu (const double mu) const |
| Update the gnc parameter mu to gradually increase nonconvexity. | |
| bool | checkMuConvergence (const double mu) const |
| Check if we have reached the value of mu for which the surrogate loss matches the original loss. | |
| bool | checkCostConvergence (const double cost, const double prev_cost) const |
| Check convergence of relative cost differences. | |
| bool | checkWeightsConvergence (const Vector &weights) const |
| Check convergence of weights to binary values. | |
| bool | checkConvergence (const double mu, const Vector &weights, const double cost, const double prev_cost) const |
| Check for convergence between consecutive GNC iterations. | |
| NonlinearFactorGraph | makeWeightedGraph (const Vector &weights) const |
| Create a graph where each factor is weighted by the gnc weights. | |
| Vector | calculateWeights (const Values ¤tEstimate, const double mu) |
| Calculate gnc weights. | |
|
inline |
Set the maximum weighted residual error for an inlier (same for all factors). For a factor in the form f(x) = 0.5 * || r(x) ||^2_Omega, the inlier threshold is the largest value of f(x) for the corresponding measurement to be considered an inlier. In other words, an inlier at x is such that 0.5 * || r(x) ||^2_Omega <= barcSq. Assuming an isotropic measurement covariance sigma^2 * Identity, the cost becomes: 0.5 * 1/sigma^2 || r(x) ||^2 <= barcSq. Hence || r(x) ||^2 <= 2 * barcSq * sigma^2.
|
inline |
Set the maximum weighted residual error for an inlier (one for each factor). For a factor in the form f(x) = 0.5 * || r(x) ||^2_Omega, the inlier threshold is the largest value of f(x) for the corresponding measurement to be considered an inlier. In other words, an inlier at x is such that 0.5 * || r(x) ||^2_Omega <= barcSq.
|
inline |
Set the maximum weighted residual error threshold by specifying the probability alpha that the inlier residuals are smaller than that threshold
|
inline |
Set weights for each factor. This is typically not needed, but provides an extra interface for the user to initialize the weightst
1.8.13