Classes | Functions
contrib/mul/clsfy/clsfy_classifier_base.h File Reference

Describe an abstract classifier. More...

#include <vcl_string.h>
#include <vcl_vector.h>
#include <vnl/vnl_vector.h>
#include <mbl/mbl_data_wrapper.h>
#include <vsl/vsl_binary_io.h>
#include <vcl_iostream.h>

Go to the source code of this file.

Classes

class  clsfy_classifier_base
 A common interface for 1-out-of-N classifiers. More...

Functions

void vsl_add_to_binary_loader (const clsfy_classifier_base &b)
 Allows derived class to be loaded by base-class pointer.
void vsl_b_write (vsl_b_ostream &bfs, const clsfy_classifier_base &b)
 Binary file stream output operator for class reference.
void vsl_b_read (vsl_b_istream &bfs, clsfy_classifier_base &b)
 Binary file stream input operator for class reference.
vcl_ostream & operator<< (vcl_ostream &os, const clsfy_classifier_base &b)
 Stream output operator for class reference.
vcl_ostream & operator<< (vcl_ostream &os, const clsfy_classifier_base *b)
 Stream output operator for class pointer.
void vsl_print_summary (vcl_ostream &os, const clsfy_classifier_base &b)
 Stream output operator for class reference.
void vsl_print_summary (vcl_ostream &os, const clsfy_classifier_base *b)
 Stream output operator for class pointer.
double clsfy_test_error (const clsfy_classifier_base &classifier, mbl_data_wrapper< vnl_vector< double > > &test_inputs, const vcl_vector< unsigned > &test_outputs)
 Calculate the fraction of test samples which are classified incorrectly.
double clsfy_test_error (const clsfy_classifier_base &classifier, mbl_data_wrapper< vnl_vector< double > > &test_inputs, const vcl_vector< unsigned > &test_outputs, unsigned test_class)
 Calculate the fraction of test samples of a particular class which are classified incorrectly.

Detailed Description

Describe an abstract classifier.

Author:
Ian Scott
Date:
2000-05-10
    Modifications
     2 May 2001 IMS Converted to VXL
   

Definition in file clsfy_classifier_base.h.


Function Documentation

double clsfy_test_error ( const clsfy_classifier_base classifier,
mbl_data_wrapper< vnl_vector< double > > &  test_inputs,
const vcl_vector< unsigned > &  test_outputs 
)

Calculate the fraction of test samples which are classified incorrectly.

Definition at line 126 of file clsfy_classifier_base.cxx.

double clsfy_test_error ( const clsfy_classifier_base classifier,
mbl_data_wrapper< vnl_vector< double > > &  test_inputs,
const vcl_vector< unsigned > &  test_outputs,
unsigned  test_class 
)

Calculate the fraction of test samples of a particular class which are classified incorrectly.

Returns:
-1 if there are no samples of test_class.

Definition at line 145 of file clsfy_classifier_base.cxx.

vcl_ostream& operator<< ( vcl_ostream &  os,
const clsfy_classifier_base b 
)

Stream output operator for class reference.

Definition at line 84 of file clsfy_classifier_base.cxx.

vcl_ostream& operator<< ( vcl_ostream &  os,
const clsfy_classifier_base b 
)

Stream output operator for class pointer.

Definition at line 95 of file clsfy_classifier_base.cxx.

void vsl_add_to_binary_loader ( const clsfy_classifier_base b)

Allows derived class to be loaded by base-class pointer.

Definition at line 105 of file clsfy_classifier_base.cxx.

void vsl_b_read ( vsl_b_istream bfs,
clsfy_classifier_base b 
)

Binary file stream input operator for class reference.

Definition at line 119 of file clsfy_classifier_base.cxx.

void vsl_b_write ( vsl_b_ostream bfs,
const clsfy_classifier_base b 
)

Binary file stream output operator for class reference.

Definition at line 112 of file clsfy_classifier_base.cxx.

void vsl_print_summary ( vcl_ostream &  os,
const clsfy_classifier_base b 
) [inline]

Stream output operator for class reference.

Definition at line 96 of file clsfy_classifier_base.h.

void vsl_print_summary ( vcl_ostream &  os,
const clsfy_classifier_base b 
) [inline]

Stream output operator for class pointer.

Definition at line 100 of file clsfy_classifier_base.h.