#include <clsfy_rbf_parzen.h>
Inheritance diagram for clsfy_rbf_parzen:

A given vector, x0, is classified, by placing a window defined by w = exp(-1/(2*sigma^p) * |x-x0|^p), and finding the majority prediction of the nearby training vectors, each weighted by the window function.
Definition at line 21 of file clsfy_rbf_parzen.h.
Public Member Functions | |
| clsfy_rbf_parzen () | |
| Construct a Parzen classifier. | |
| virtual unsigned | classify (const vnl_vector< double > &input) const |
| Return the classification of the given probe vector. | |
| virtual void | class_probabilities (vcl_vector< double > &outputs, const vnl_vector< double > &input) const |
| Provides a probability-like value that the input being in each class. | |
| double | weightings (const vnl_vector< double > &input) const |
| Return the number of proximate training vectors, weighted by the windowing function. | |
| virtual double | log_l (const vnl_vector< double > &input) const |
| This value has properties of a Log likelihood of being in class (binary classifiers only). | |
| void | set (const vcl_vector< vnl_vector< double > > &inputs, const vcl_vector< unsigned > &outputs) |
| Set the training data. | |
| double | rbf_width () const |
| The 1st standard deviation width of the RBF window. | |
| void | set_rbf_width (double sigma) |
| Set the 1st standard deviation width of the RBF window. | |
| double | power () const |
| The value p in the window function $exp(-1/(2*sigma^p) * |x-y|^p)$. | |
| void | set_power (double p) |
| The value p in the window function $exp(-1/(2*sigma^p) * |x-y|^p)$. | |
| const vcl_vector< vnl_vector< double > > & | training_vectors () const |
| Return a reference to the training vectors. | |
| const vcl_vector< unsigned > & | training_classes () const |
| Return a reference to the training classes. | |
| virtual unsigned | n_classes () const |
| The number of possible output classes. | |
| virtual unsigned | n_dims () const |
| The dimensionality of input vectors. | |
| virtual short | version_no () const |
| Storage version number. | |
| virtual vcl_string | is_a () const |
| Name of the class. | |
| virtual bool | is_class (vcl_string const &s) const |
| Name of the class. | |
| virtual clsfy_classifier_base * | clone () const |
| Create a copy on the heap and return base class pointer. | |
| virtual void | print_summary (vcl_ostream &os) const |
| Print class to os. | |
| 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. | |
| virtual void | classify_many (vcl_vector< unsigned > &outputs, mbl_data_wrapper< vnl_vector< double > > &inputs) const |
| Classify many input vectors. | |
Private Attributes | |
| double | gamma_ |
| Workspace value which is cached for speed. | |
| double | width_ |
| Width of the rbf window function. | |
| double | power_ |
| The power, p, in the window function. Default value is 2.0. | |
| vcl_vector< vnl_vector< double > > | trainInputs_ |
| The set of training input values. Size should equal number of outputs. | |
| vcl_vector< unsigned > | trainOutputs_ |
| The set of training output values. Size should equal number of inputs. | |
|
|
Construct a Parzen classifier.
Definition at line 45 of file clsfy_rbf_parzen.h. |
|
|
Load class from binary file stream.
Implements clsfy_classifier_base. Definition at line 205 of file clsfy_rbf_parzen.cxx. |
|
|
Save class to binary file stream.
Implements clsfy_classifier_base. Definition at line 194 of file clsfy_rbf_parzen.cxx. |
|
||||||||||||
|
Provides a probability-like value that the input being in each class. output(i) i<nClasses, contains the probability that the input is in class i Implements clsfy_classifier_base. Definition at line 60 of file clsfy_rbf_parzen.cxx. |
|
|
Return the classification of the given probe vector.
Reimplemented from clsfy_classifier_base. Definition at line 18 of file clsfy_rbf_parzen.cxx. |
|
||||||||||||
|
Classify many input vectors.
Definition at line 55 of file clsfy_classifier_base.cxx. |
|
|
Create a copy on the heap and return base class pointer.
Implements clsfy_classifier_base. Definition at line 179 of file clsfy_rbf_parzen.cxx. |
|
|
Name of the class.
Reimplemented from clsfy_classifier_base. Definition at line 158 of file clsfy_rbf_parzen.cxx. |
|
|
Name of the class.
Reimplemented from clsfy_classifier_base. Definition at line 165 of file clsfy_rbf_parzen.cxx. |
|
|
This value has properties of a Log likelihood of being in class (binary classifiers only). class probability = exp(logL) / (1+exp(logL)) Implements clsfy_classifier_base. Definition at line 124 of file clsfy_rbf_parzen.cxx. |
|
|
The number of possible output classes.
Implements clsfy_classifier_base. Definition at line 96 of file clsfy_rbf_parzen.h. |
|
|
The dimensionality of input vectors.
Implements clsfy_classifier_base. Definition at line 113 of file clsfy_rbf_parzen.cxx. |
|
|
The value p in the window function $exp(-1/(2*sigma^p) * |x-y|^p)$. The value p affects the kurtosis, or peakyness of the window. Towards 0 gives a more peaked central spike, and longer tail. Toward +inf gives a broader peak, and shorter tail. The default value is 2, giving a Gaussian distribution. Definition at line 76 of file clsfy_rbf_parzen.h. |
|
|
Print class to os.
Implements clsfy_classifier_base. Definition at line 186 of file clsfy_rbf_parzen.cxx. |
|
|
The 1st standard deviation width of the RBF window. The default value is 1. Definition at line 66 of file clsfy_rbf_parzen.h. |
|
||||||||||||
|
Set the training data.
Definition at line 48 of file clsfy_rbf_parzen.cxx. |
|
|
The value p in the window function $exp(-1/(2*sigma^p) * |x-y|^p)$. The value p affects the kurtosis, or peakyness of the window. Towards 0 gives a more peaked central spike, and longer tail. Toward +inf gives a broader peak, and shorter tail. The default value is 2, giving a Gaussian distribution. Definition at line 149 of file clsfy_rbf_parzen.cxx. |
|
|
Set the 1st standard deviation width of the RBF window. The default value in the constructor is 1. Definition at line 135 of file clsfy_rbf_parzen.cxx. |
|
|
Return a reference to the training classes. Vectors are ordered similarly to training_vectors() Definition at line 92 of file clsfy_rbf_parzen.h. |
|
|
Return a reference to the training vectors. Vectors are ordered similarly to training_classes() Definition at line 87 of file clsfy_rbf_parzen.h. |
|
|
Storage version number.
Definition at line 172 of file clsfy_rbf_parzen.cxx. |
|
|
Return the number of proximate training vectors, weighted by the windowing function.
Definition at line 92 of file clsfy_rbf_parzen.cxx. |
|
|
Workspace value which is cached for speed. Inversely proportional to width of the RBF window function. Default value is -0.5. width_ = 1/sqrt(-2*gamma_) Definition at line 27 of file clsfy_rbf_parzen.h. |
|
|
The power, p, in the window function. Default value is 2.0.
Definition at line 35 of file clsfy_rbf_parzen.h. |
|
|
The set of training input values. Size should equal number of outputs.
Definition at line 38 of file clsfy_rbf_parzen.h. |
|
|
The set of training output values. Size should equal number of inputs.
Definition at line 41 of file clsfy_rbf_parzen.h. |
|
|
Width of the rbf window function. Default value is 1.0. width_ = 1/sqrt(-2*gamma_) Definition at line 32 of file clsfy_rbf_parzen.h. |
1.4.4