clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum Class Reference

Inheritance diagram for clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum:

vnl_cost_function vnl_unary_function< double, vnl_vector< double > > List of all members.

Detailed Description

The cost function, sum Geman-McClure error functions over all training examples.

Definition at line 26 of file clsfy_binary_hyperplane_gmrho_builder.cxx.


Public Member Functions

 gmrho_sum (const vnl_matrix< double > &x, const vnl_vector< double > &y, double sigma=1)
 construct passing in reference to data matrix.
void set_sigma (double sigma)
 reset the scaling factor.
virtual double f (vnl_vector< double > const &w)
 The main function. Given the vector of weights parameters vector , compute the value of f(x).
virtual void gradf (vnl_vector< double > const &x, vnl_vector< double > &gradient)
 Calculate the gradient of f at parameter vector x.
vnl_vector< double > gradf (vnl_vector< double > const &x)
virtual void compute (vnl_vector< double > const &x, double *f, vnl_vector< double > *g)
int get_number_of_unknowns () const
void fdgradf (vnl_vector< double > const &x, vnl_vector< double > &gradient, double stepsize=1e-5)
vnl_vector< double > fdgradf (vnl_vector< double > const &x)
virtual double reported_error (double f_value)
virtual double get_range_min () const
virtual double get_range_max () const
virtual vnl_unary_function<
double, vnl_vector< double > > * 
Copy () const

Public Attributes

int dim

Protected Member Functions

void set_number_of_unknowns (int number_of_unknowns)

Private Attributes

const vnl_matrix< double > & x_
 Reference to data matrix, one row per training example.
const vnl_vector< double > & y_
 Reference to required outputs.
double sigma_
 Scale factor used in Geman-McClure error function.
double var_
 sigma squared.
unsigned num_examples_
 Number of training examples (x_.rows()).
unsigned num_vars_
 Number of dimensions (x_.cols()).
double alpha_
 var_/(1+var_)^2 - ensures continuity of derivative at hyperplane boundary.
double beta_
 1/(1+var_)^2 - with alpha, ensures continuity of function at hyperplane boundary.

Constructor & Destructor Documentation

clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::gmrho_sum ( const vnl_matrix< double > &  x,
const vnl_vector< double > &  y,
double  sigma = 1 
)

construct passing in reference to data matrix.

This returns a geman-mcclure robust function if the point is correctly classified Otherwise the squared error is returned, with coefficient and offset to ensure continuity and smoothness at the join

Definition at line 329 of file clsfy_binary_hyperplane_gmrho_builder.cxx.


Member Function Documentation

void clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::set_sigma ( double  sigma  ) 

reset the scaling factor.

Definition at line 338 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

double clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::f ( vnl_vector< double > const &  w  )  [virtual]

The main function. Given the vector of weights parameters vector , compute the value of f(x).

Reimplemented from vnl_cost_function.

Definition at line 350 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

void clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::gradf ( vnl_vector< double > const &  x,
vnl_vector< double > &  gradient 
) [virtual]

Calculate the gradient of f at parameter vector x.

Reimplemented from vnl_cost_function.

Definition at line 379 of file clsfy_binary_hyperplane_gmrho_builder.cxx.


Member Data Documentation

const vnl_matrix<double>& clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::x_ [private]

Reference to data matrix, one row per training example.

Definition at line 29 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

const vnl_vector<double>& clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::y_ [private]

Reference to required outputs.

Definition at line 31 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

double clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::sigma_ [private]

Scale factor used in Geman-McClure error function.

Definition at line 33 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

double clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::var_ [private]

sigma squared.

Definition at line 35 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

unsigned clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::num_examples_ [private]

Number of training examples (x_.rows()).

Definition at line 37 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

unsigned clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::num_vars_ [private]

Number of dimensions (x_.cols()).

Definition at line 39 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

double clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::alpha_ [private]

var_/(1+var_)^2 - ensures continuity of derivative at hyperplane boundary.

Definition at line 41 of file clsfy_binary_hyperplane_gmrho_builder.cxx.

double clsfy_binary_hyperplane_gmrho_builder_helpers::gmrho_sum::beta_ [private]

1/(1+var_)^2 - with alpha, ensures continuity of function at hyperplane boundary.

Definition at line 43 of file clsfy_binary_hyperplane_gmrho_builder.cxx.


The documentation for this class was generated from the following file:
Generated on Thu Jan 8 05:11:35 2009 for contrib/mul/clsfy by  doxygen 1.5.1