Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
mfpf_ssd_vec_cost_builder Class Reference

Builder for mfpf_ssd_vec_cost objects. More...

#include <mfpf_ssd_vec_cost_builder.h>

Inheritance diagram for mfpf_ssd_vec_cost_builder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mfpf_ssd_vec_cost_builder ()
virtual ~mfpf_ssd_vec_cost_builder ()
virtual mfpf_vec_costnew_cost () const
 Create new mfpf_ssd_vec_cost on heap.
virtual void clear (unsigned n_egs)
 Initialise building.
virtual void add_example (const vnl_vector< double > &v)
 Add one example to the model.
virtual void build (mfpf_vec_cost &)
 Build object from the data supplied in add_example().
virtual bool set_from_stream (vcl_istream &is)
 Initialise from a string stream.
virtual vcl_string is_a () const
 Name of the class.
virtual mfpf_vec_cost_builderclone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
short version_no () const
 Version number for I/O.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.

Static Public Member Functions

static vcl_auto_ptr
< mfpf_vec_cost_builder
create_from_stream (vcl_istream &is)
 Create a concrete object, from a text specification.

Private Member Functions

void set_defaults ()
 Define default values.

Private Attributes

double min_var_
 Minimum variance allowed.
vcl_vector< vnl_vector< double > > data_
 Space to record examples.

Detailed Description

Builder for mfpf_ssd_vec_cost objects.

Computes mean and weights given the training data. Currently uses the mean absolute difference to estimate the weights (rather than variance, which is not so robust).

Definition at line 17 of file mfpf_ssd_vec_cost_builder.h.


Constructor & Destructor Documentation

mfpf_ssd_vec_cost_builder::mfpf_ssd_vec_cost_builder ( )

Definition at line 25 of file mfpf_ssd_vec_cost_builder.cxx.

mfpf_ssd_vec_cost_builder::~mfpf_ssd_vec_cost_builder ( ) [virtual]

Definition at line 40 of file mfpf_ssd_vec_cost_builder.cxx.


Member Function Documentation

void mfpf_ssd_vec_cost_builder::add_example ( const vnl_vector< double > &  v) [virtual]

Add one example to the model.

Implements mfpf_vec_cost_builder.

Definition at line 59 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::b_read ( vsl_b_istream bfs) [virtual]

Load class from binary file stream.

Implements mfpf_vec_cost_builder.

Definition at line 197 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::b_write ( vsl_b_ostream bfs) const [virtual]

Save class to binary file stream.

Implements mfpf_vec_cost_builder.

Definition at line 186 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::build ( mfpf_vec_cost pf) [virtual]

Build object from the data supplied in add_example().

Build this object from the data supplied in add_example().

Implements mfpf_vec_cost_builder.

Definition at line 75 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::clear ( unsigned  n_egs) [virtual]

Initialise building.

Must be called before any calls to add_example(...)

Implements mfpf_vec_cost_builder.

Definition at line 53 of file mfpf_ssd_vec_cost_builder.cxx.

mfpf_vec_cost_builder * mfpf_ssd_vec_cost_builder::clone ( ) const [virtual]

Create a copy on the heap and return base class pointer.

Implements mfpf_vec_cost_builder.

Definition at line 165 of file mfpf_ssd_vec_cost_builder.cxx.

vcl_auto_ptr< mfpf_vec_cost_builder > mfpf_vec_cost_builder::create_from_stream ( vcl_istream &  is) [static, inherited]

Create a concrete object, from a text specification.

Definition at line 51 of file mfpf_vec_cost_builder.cxx.

vcl_string mfpf_ssd_vec_cost_builder::is_a ( ) const [virtual]

Name of the class.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 159 of file mfpf_ssd_vec_cost_builder.cxx.

mfpf_vec_cost * mfpf_ssd_vec_cost_builder::new_cost ( ) const [virtual]

Create new mfpf_ssd_vec_cost on heap.

Implements mfpf_vec_cost_builder.

Definition at line 45 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::print_summary ( vcl_ostream &  os) const [virtual]

Print class to os.

Implements mfpf_vec_cost_builder.

Definition at line 174 of file mfpf_ssd_vec_cost_builder.cxx.

void mfpf_ssd_vec_cost_builder::set_defaults ( ) [private]

Define default values.

Definition at line 31 of file mfpf_ssd_vec_cost_builder.cxx.

bool mfpf_ssd_vec_cost_builder::set_from_stream ( vcl_istream &  is) [virtual]

Initialise from a string stream.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 133 of file mfpf_ssd_vec_cost_builder.cxx.

short mfpf_ssd_vec_cost_builder::version_no ( ) const

Version number for I/O.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 180 of file mfpf_ssd_vec_cost_builder.cxx.


Member Data Documentation

vcl_vector<vnl_vector<double> > mfpf_ssd_vec_cost_builder::data_ [private]

Space to record examples.

Definition at line 24 of file mfpf_ssd_vec_cost_builder.h.

Minimum variance allowed.

Definition at line 21 of file mfpf_ssd_vec_cost_builder.h.


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