Public Types | Public Member Functions | Protected Attributes
rrel_muset_obj Class Reference

The MUSET (MUSE trimmed) objective function, which should be used instead of LMS. More...

#include <rrel_muset_obj.h>

Inheritance diagram for rrel_muset_obj:
Inheritance graph
[legend]

List of all members.

Public Types

typedef vcl_vector< double >
::const_iterator 
vect_const_iter
 The iterators used to pass in values.
typedef vcl_vector< double >
::iterator 
vect_iter
 The iterators used to pass out values.

Public Member Functions

 rrel_muset_obj (int max_n, bool use_sk_refine=true)
 Constructor.
 rrel_muset_obj (rrel_muse_table *table, bool use_sk_refine=true)
 Constructor with previously computed table.
 ~rrel_muset_obj ()
 Destructor.
virtual double fcn (vect_const_iter res_begin, vect_const_iter res_end, vect_const_iter, vnl_vector< double > *=0) const
 Evaluate the objective function on heteroscedastic residuals.
virtual double fcn (vect_const_iter begin, vect_const_iter end, double=0, vnl_vector< double > *=0) const
 Evaluate the objective function on homoscedastic residuals.
void internal_fcn (vect_const_iter begin, vect_const_iter end, double &sigma_est, int &best_k) const
 Computes the MUSE estimate and best value of k.
virtual bool requires_prior_scale () const
 False.
virtual bool can_estimate_scale () const
 True, since MUSE can estimate scale.
virtual double scale (vect_const_iter res_begin, vect_const_iter res_end) const
 Scale estimate.
void set_min_inlier_fraction (double min_frac=0.25)
 Set the minimum fraction of the data that are inliers.
void set_max_inlier_fraction (double max_frac=0.95)
 Set the maximum fraction of the data that could be inliers.
void set_inlier_fraction_increment (double frac_inc=0.05)
 The increment to use in testing different inlier/outlier fractions.
double min_inlier_fraction () const
 The minimum fraction of the data that must be inliers.
double max_inlier_fraction () const
 The maximum fraction of the data that could be inliers.
double inlier_fraction_increment () const
 The search step for determining the inlier/outlier fraction.
void set_muse_type (rrel_muse_type t=RREL_MUSE_TRIMMED)
 Set the type of MUSE objective function.
rrel_muse_type muse_type () const
 Access the type of MUSE objective function.

Protected Attributes

bool use_sk_refine_
rrel_muse_type muse_type_
bool table_owned_
rrel_muse_tabletable_
double min_frac_
double max_frac_
double frac_inc_

Detailed Description

The MUSET (MUSE trimmed) objective function, which should be used instead of LMS.

MUSE is a robust objective function in the spirit of LMS/LTS (least-median-of-squares / least-trimmed-squares). In fact, it can be considered a generalization of these objective functions. It can be used in place of them and it really SHOULD because it (a) produces much better results, regardless of the inlier fraction, and (b) (unlike RANSAC) can tolerate large fractions of outliers WITHOUT prior knowledge of scale. It should be used in combination with a random sampling search and an appropriate problem representation.

Rather than assuming a fixed minimum fraction of inliers and then building an objective function based on either the order statistics (e.g. the median) or the trimmed statistics, MUSE ADAPTIVELY determines the inlier fraction and computes its objective function from this inlier fraction. It does this by converting the fitting error (residual) order statistics into scale estimates, normalizing these, and then choosing the smallest. The version given here is called MUSET, because it is based on trimmed statistics. This is described in Chapter 4 of Jim Miller's thesis. A new paper describing MUSE will be written in the autumn of 2001.

MUSE requires a look-up table to compute its normalizing parameters. If it does not get one, the constructor builds it. MUSE also requires the minimum and maximum possible inlier fractions in the data. Usually it is safe to leave the maximum fraction at 0.95. The minimum inlier fraction determines the random sampling parameters, so it should be set with some care. Setting it too low can cause a lot of unnecessary search. Setting it too high can cause small structures to be missed.

Finally, MUSE internally contains an additional step called sk refinement, which increases its ability to distinguish small scale structures. In general it is safe to use this, and the constructor defaults to having it set.

Definition at line 52 of file rrel_muset_obj.h.


Member Typedef Documentation

typedef vcl_vector<double>::const_iterator rrel_objective::vect_const_iter [inherited]

The iterators used to pass in values.

Since we don't allow member templates, we have to fix on a particular type of container for residuals. Using this typedef will allow things to easily change when member templates are allowed.

Definition at line 27 of file rrel_objective.h.

typedef vcl_vector<double>::iterator rrel_objective::vect_iter [inherited]

The iterators used to pass out values.

Definition at line 30 of file rrel_objective.h.


Constructor & Destructor Documentation

rrel_muset_obj::rrel_muset_obj ( int  max_n,
bool  use_sk_refine = true 
)

Constructor.

max_n is the size of the look-up table.

Definition at line 12 of file rrel_muset_obj.cxx.

rrel_muset_obj::rrel_muset_obj ( rrel_muse_table table,
bool  use_sk_refine = true 
)

Constructor with previously computed table.

table will be used as the look-up table.

Definition at line 26 of file rrel_muset_obj.cxx.

rrel_muset_obj::~rrel_muset_obj ( )

Destructor.

Definition at line 38 of file rrel_muset_obj.cxx.


Member Function Documentation

virtual bool rrel_muset_obj::can_estimate_scale ( ) const [inline, virtual]

True, since MUSE can estimate scale.

See also:
rrel_objective::can_estimate_scale.

Reimplemented from rrel_objective.

Definition at line 94 of file rrel_muset_obj.h.

double rrel_muset_obj::fcn ( vect_const_iter  res_begin,
vect_const_iter  res_end,
vect_const_iter  ,
vnl_vector< double > *  = 0 
) const [virtual]

Evaluate the objective function on heteroscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 45 of file rrel_muset_obj.cxx.

double rrel_muset_obj::fcn ( vect_const_iter  begin,
vect_const_iter  end,
double  = 0,
vnl_vector< double > *  = 0 
) const [virtual]

Evaluate the objective function on homoscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 57 of file rrel_muset_obj.cxx.

double rrel_muset_obj::inlier_fraction_increment ( ) const [inline]

The search step for determining the inlier/outlier fraction.

Definition at line 118 of file rrel_muset_obj.h.

void rrel_muset_obj::internal_fcn ( vect_const_iter  begin,
vect_const_iter  end,
double &  sigma_est,
int &  best_k 
) const

Computes the MUSE estimate and best value of k.

begin and end give the residuals. objective is the value of the objective function, sigma_est is an estimate of the scale (and is the objective function), and best_k is the value of k that produced the scale estimate.

Definition at line 79 of file rrel_muset_obj.cxx.

double rrel_muset_obj::max_inlier_fraction ( ) const [inline]

The maximum fraction of the data that could be inliers.

Definition at line 115 of file rrel_muset_obj.h.

double rrel_muset_obj::min_inlier_fraction ( ) const [inline]

The minimum fraction of the data that must be inliers.

Definition at line 112 of file rrel_muset_obj.h.

rrel_muse_type rrel_muset_obj::muse_type ( ) const [inline]

Access the type of MUSE objective function.

Definition at line 125 of file rrel_muset_obj.h.

virtual bool rrel_muset_obj::requires_prior_scale ( ) const [inline, virtual]

False.

This MUSE estimator is based on trimmed statistics, and does not use a scale estimate.

Implements rrel_objective.

Definition at line 89 of file rrel_muset_obj.h.

double rrel_muset_obj::scale ( vect_const_iter  res_begin,
vect_const_iter  res_end 
) const [virtual]

Scale estimate.

Reimplemented from rrel_objective.

Definition at line 69 of file rrel_muset_obj.cxx.

void rrel_muset_obj::set_inlier_fraction_increment ( double  frac_inc = 0.05) [inline]

The increment to use in testing different inlier/outlier fractions.

Definition at line 108 of file rrel_muset_obj.h.

void rrel_muset_obj::set_max_inlier_fraction ( double  max_frac = 0.95) [inline]

Set the maximum fraction of the data that could be inliers.

Definition at line 104 of file rrel_muset_obj.h.

void rrel_muset_obj::set_min_inlier_fraction ( double  min_frac = 0.25) [inline]

Set the minimum fraction of the data that are inliers.

Definition at line 100 of file rrel_muset_obj.h.

void rrel_muset_obj::set_muse_type ( rrel_muse_type  t = RREL_MUSE_TRIMMED) [inline]

Set the type of MUSE objective function.

Definition at line 121 of file rrel_muset_obj.h.


Member Data Documentation

double rrel_muset_obj::frac_inc_ [protected]

Definition at line 135 of file rrel_muset_obj.h.

double rrel_muset_obj::max_frac_ [protected]

Definition at line 134 of file rrel_muset_obj.h.

double rrel_muset_obj::min_frac_ [protected]

Definition at line 133 of file rrel_muset_obj.h.

Definition at line 129 of file rrel_muset_obj.h.

Definition at line 132 of file rrel_muset_obj.h.

bool rrel_muset_obj::table_owned_ [protected]

Definition at line 131 of file rrel_muset_obj.h.

Definition at line 128 of file rrel_muset_obj.h.


The documentation for this class was generated from the following files: