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

Definition at line 28 of file vpdfl_pc_gaussian_builder.h.
Public Types | |
| enum | partitionMethods { fixed, proportionate } |
Public Member Functions | |
| vpdfl_pc_gaussian_builder () | |
| Dflt ctor. | |
| virtual | ~vpdfl_pc_gaussian_builder () |
| Destructor. | |
| virtual vpdfl_pdf_base * | new_model () const |
| Create empty model. | |
| virtual void | build (vpdfl_pdf_base &model, const vnl_vector< double > &mean) const |
| Build default model with given mean. | |
| virtual void | build (vpdfl_pdf_base &model, mbl_data_wrapper< vnl_vector< double > > &data) const |
| Build model from data. | |
| virtual void | weighted_build (vpdfl_pdf_base &model, mbl_data_wrapper< vnl_vector< double > > &data, const vcl_vector< double > &wts) const |
| Build model from weighted data. | |
| void | mean_covar (vnl_vector< double > &mean, vnl_matrix< double > &covar, mbl_data_wrapper< vnl_vector< double > > &data) const |
| Computes mean and covariance of given data. | |
| virtual unsigned | decide_partition (const vnl_vector< double > &eVals, unsigned nSamples=0, double noise=0.0) const |
| Decide where to partition an Eigenvector space. | |
| int | fixed_partition () const |
| Return the number of principle components when using fixed partition. | |
| void | set_fixed_partition (int n_principle_components) |
| Set the number of principle components when using fixed partition. | |
| void | set_proportion_partition (double proportion) |
| Use proportion of variance to decide on the number of principle components. | |
| double | proportion_partition () const |
| Find the proportion of variance to decide on the number of principle components. | |
| partitionMethods | partition_method () const |
| How is the partition between principle and complementary spaces. | |
| short | version_no () const |
| Version number for I/O. | |
| virtual vcl_string | is_a () const |
| Name of the class. | |
| virtual bool | is_class (vcl_string const &s) const |
| Does the name of the class match the argument?. | |
| virtual vpdfl_builder_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 | set_min_var (double min_var) |
| Define lower threshold on variance for built models. | |
| virtual double | min_var () const |
| Get lower threshold on variance for built models. | |
| void | meanCovar (vnl_vector< double > &mean, vnl_matrix< double > &covar, mbl_data_wrapper< vnl_vector< double > > &data) const |
| Computes mean and covariance of given data. | |
| void | buildFromCovar (vpdfl_gaussian &model, const vnl_vector< double > &mean, const vnl_matrix< double > &covar) const |
| Build model from mean and covariance. | |
| virtual void | config_from_stream (vcl_istream &is) |
| Read initialisation settings from a stream. | |
Static Public Member Functions | |
| static vcl_auto_ptr< vpdfl_builder_base > | new_builder_from_stream (vcl_istream &is) |
| Create a vpdfl_builder_base object given a config steram. | |
| static vcl_auto_ptr< vpdfl_builder_base > | new_pdf_builder_from_stream (vcl_istream &) |
| Create a vpdfl_builder_base object given a config stream (recursive style). | |
Protected Member Functions | |
| void | updateCovar (vnl_matrix< double > &S, const vnl_vector< double > &v, double w) const |
| Add w*v*v.transpose() to S (resizing if necessary). | |
Private Member Functions | |
| vpdfl_pc_gaussian & | gaussian (vpdfl_pdf_base &model) const |
Private Attributes | |
| partitionMethods | partitionMethod_ |
| The method used to decide how to calculate the number of principle components. | |
| double | proportionOfVariance_ |
| The proportion of variance that should be encoded with the principle components. | |
| unsigned | fixed_partition_ |
| The number of components to represent in the principle space. | |
|
|
Definition at line 31 of file vpdfl_pc_gaussian_builder.h. |
|
|
Dflt ctor.
Definition at line 34 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Destructor.
Definition at line 43 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Load class from binary file stream.
Reimplemented from vpdfl_gaussian_builder. Definition at line 419 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Save class to binary file stream.
Reimplemented from vpdfl_gaussian_builder. Definition at line 405 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||
|
Build model from data.
Reimplemented from vpdfl_gaussian_builder. Definition at line 154 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||
|
Build default model with given mean.
Reimplemented from vpdfl_gaussian_builder. Definition at line 89 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||||||
|
Build model from mean and covariance.
Definition at line 134 of file vpdfl_gaussian_builder.cxx. |
|
|
Create a copy on the heap and return base class pointer.
Reimplemented from vpdfl_gaussian_builder. Definition at line 387 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Read initialisation settings from a stream. Parameters: {
min_var: 1.0e-6
}
Reimplemented from vpdfl_builder_base. Definition at line 369 of file vpdfl_gaussian_builder.cxx. |
|
||||||||||||||||
|
Decide where to partition an Eigenvector space. Returns the number of principle components to be used. Pass in the eigenvalues (eVals), the number of samples that went to make up this Gaussian (nSamples), and the noise floor for the dataset. The method may use simplified algorithms if you indicate that the number of samples or noise floor is unknown (by setting the latter parameters to 0.) Definition at line 326 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Return the number of principle components when using fixed partition.
Definition at line 85 of file vpdfl_pc_gaussian_builder.h. |
|
|
Reimplemented from vpdfl_gaussian_builder. Definition at line 73 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Name of the class.
Reimplemented from vpdfl_gaussian_builder. Definition at line 359 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Does the name of the class match the argument?.
Reimplemented from vpdfl_gaussian_builder. Definition at line 369 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||||||
|
Computes mean and covariance of given data.
Definition at line 203 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||||||
|
Computes mean and covariance of given data.
Definition at line 177 of file vpdfl_gaussian_builder.cxx. |
|
|
Get lower threshold on variance for built models.
Implements vpdfl_builder_base. Definition at line 77 of file vpdfl_gaussian_builder.cxx. |
|
|
Create a vpdfl_builder_base object given a config steram.
Definition at line 55 of file vpdfl_builder_base.cxx. |
|
|
Create empty model.
Reimplemented from vpdfl_gaussian_builder. Definition at line 82 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Create a vpdfl_builder_base object given a config stream (recursive style). Creates object, then uses config_from_stream(is) to set up internals
Definition at line 145 of file vpdfl_builder_base.cxx. |
|
|
How is the partition between principle and complementary spaces.
Definition at line 108 of file vpdfl_pc_gaussian_builder.h. |
|
|
Print class to os.
Reimplemented from vpdfl_gaussian_builder. Definition at line 396 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Find the proportion of variance to decide on the number of principle components. returns a negative value if not using proportion of variance method. Definition at line 101 of file vpdfl_pc_gaussian_builder.h. |
|
|
Set the number of principle components when using fixed partition.
Definition at line 64 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
Define lower threshold on variance for built models.
Implements vpdfl_builder_base. Definition at line 70 of file vpdfl_gaussian_builder.cxx. |
|
|
Use proportion of variance to decide on the number of principle components. Specify the proportion (between 0 and 1). The default setting uses a fixed number of principle components. Definition at line 52 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||||||
|
Add w*v*v.transpose() to S (resizing if necessary). By repeatedly calling this function with a new vector v and weight w You can calculate the Sum of Squares matrix. Definition at line 104 of file vpdfl_gaussian_builder.cxx. |
|
|
Version number for I/O.
Reimplemented from vpdfl_gaussian_builder. Definition at line 378 of file vpdfl_pc_gaussian_builder.cxx. |
|
||||||||||||||||
|
Build model from weighted data.
Reimplemented from vpdfl_gaussian_builder. Definition at line 232 of file vpdfl_pc_gaussian_builder.cxx. |
|
|
The number of components to represent in the principle space.
Definition at line 45 of file vpdfl_pc_gaussian_builder.h. |
|
|
The method used to decide how to calculate the number of principle components. defaults to fixed. Definition at line 38 of file vpdfl_pc_gaussian_builder.h. |
|
|
The proportion of variance that should be encoded with the principle components. Isn't used by default.. Definition at line 42 of file vpdfl_pc_gaussian_builder.h. |
1.4.4