Public Member Functions | Static Public Member Functions
clsfy_binary_hyperplane_ls_builder Class Reference

Build a binary linear classifier using least squares. More...

#include <clsfy_binary_hyperplane_ls_builder.h>

Inheritance diagram for clsfy_binary_hyperplane_ls_builder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 clsfy_binary_hyperplane_ls_builder ()
virtual clsfy_classifier_basenew_classifier () const
 Create a new untrained linear classifier with binary output.
double build (clsfy_classifier_base &classifier, mbl_data_wrapper< vnl_vector< double > > &inputs, const vcl_vector< unsigned > &outputs) const
 Build a linear classifier, with the given data.
double build (clsfy_classifier_base &classifier, mbl_data_wrapper< vnl_vector< double > > &inputs, unsigned n_classes, const vcl_vector< unsigned > &outputs) const
 Build a linear classifier, with the given data.
vcl_string is_a () const
 Name of the class.
virtual bool is_class (vcl_string const &s) const
 Name of the class.
void print_summary (vcl_ostream &os) const
 Print class to os.
virtual clsfy_builder_baseclone () const
 Create a deep copy.
virtual void b_write (vsl_b_ostream &) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &)
 Load class from binary file stream.
virtual void config (vcl_istream &as)
 Initialise the parameters from a text stream.

Static Public Member Functions

static vcl_auto_ptr
< clsfy_builder_base
new_builder (vcl_istream &as)
 Load description from a text stream.

Detailed Description

Build a binary linear classifier using least squares.

Definition at line 16 of file clsfy_binary_hyperplane_ls_builder.h.


Constructor & Destructor Documentation

clsfy_binary_hyperplane_ls_builder::clsfy_binary_hyperplane_ls_builder ( ) [inline]

Definition at line 20 of file clsfy_binary_hyperplane_ls_builder.h.


Member Function Documentation

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

Load class from binary file stream.

Implements clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 141 of file clsfy_binary_hyperplane_ls_builder.cxx.

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

Save class to binary file stream.

Implements clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 133 of file clsfy_binary_hyperplane_ls_builder.cxx.

double clsfy_binary_hyperplane_ls_builder::build ( clsfy_classifier_base classifier,
mbl_data_wrapper< vnl_vector< double > > &  inputs,
const vcl_vector< unsigned > &  outputs 
) const

Build a linear classifier, with the given data.

Build a multi layer perceptron classifier, with the given data.

Return the mean error over the training set.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 44 of file clsfy_binary_hyperplane_ls_builder.cxx.

double clsfy_binary_hyperplane_ls_builder::build ( clsfy_classifier_base classifier,
mbl_data_wrapper< vnl_vector< double > > &  inputs,
unsigned  n_classes,
const vcl_vector< unsigned > &  outputs 
) const [virtual]

Build a linear classifier, with the given data.

Return the mean error over the training set. n_classes must be 1

Return the mean error over the training set. n_classes must be 1.

Implements clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 123 of file clsfy_binary_hyperplane_ls_builder.cxx.

virtual clsfy_builder_base* clsfy_binary_hyperplane_ls_builder::clone ( ) const [inline, virtual]

Create a deep copy.

client is responsible for deleting returned object.

Implements clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 50 of file clsfy_binary_hyperplane_ls_builder.h.

void clsfy_builder_base::config ( vcl_istream &  as) [virtual, inherited]

Initialise the parameters from a text stream.

Default case accepts no parameters.

Reimplemented in clsfy_rbf_svm_smo_1_builder, clsfy_parzen_builder, clsfy_knn_builder, clsfy_null_builder, and clsfy_binary_1d_wrapper_builder.

Definition at line 26 of file clsfy_builder_base.cxx.

vcl_string clsfy_binary_hyperplane_ls_builder::is_a ( ) const [virtual]

Name of the class.

Reimplemented from clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 22 of file clsfy_binary_hyperplane_ls_builder.cxx.

bool clsfy_binary_hyperplane_ls_builder::is_class ( vcl_string const &  s) const [virtual]

Name of the class.

Reimplemented from clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 29 of file clsfy_binary_hyperplane_ls_builder.cxx.

vcl_auto_ptr< clsfy_builder_base > clsfy_builder_base::new_builder ( vcl_istream &  as) [static, inherited]

Load description from a text stream.

The stream should contain the name of the feature extractor class that will be used, followed by a brace-enclosed list of parameters for the builder. This function will construct the appropriate clsfy_builder_base derivative and return that.

Exceptions:
ifthe parse fails.

Definition at line 42 of file clsfy_builder_base.cxx.

virtual clsfy_classifier_base* clsfy_binary_hyperplane_ls_builder::new_classifier ( ) const [inline, virtual]

Create a new untrained linear classifier with binary output.

Implements clsfy_builder_base.

Definition at line 23 of file clsfy_binary_hyperplane_ls_builder.h.

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

Print class to os.

Implements clsfy_builder_base.

Reimplemented in clsfy_binary_hyperplane_gmrho_builder, and clsfy_binary_hyperplane_logit_builder.

Definition at line 36 of file clsfy_binary_hyperplane_ls_builder.cxx.


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