#include <AdditiveNormalizationKernel.h>
Inheritance diagram for PLearn::AdditiveNormalizationKernel:


Public Member Functions | |
| AdditiveNormalizationKernel () | |
| Default constructor.   | |
| AdditiveNormalizationKernel (Ker the_source, bool remove_bias=false, bool remove_bias_in_evaluate=false, bool double_centering=false) | |
| Created from an existing kernel.   | |
| virtual void | build () | 
| Simply calls inherited::build() then build_().   | |
| virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) | 
| Transforms a shallow copy into a deep copy.   | |
| PLEARN_DECLARE_OBJECT (AdditiveNormalizationKernel) | |
| virtual real | evaluate (const Vec &x1, const Vec &x2) const | 
| Overridden.   | |
| virtual real | evaluate_i_j (int i, int j) const | 
| returns evaluate(data(i),data(j))   | |
| virtual real | evaluate_i_x (int i, const Vec &x, real squared_norm_of_x=-1) const | 
| virtual real | evaluate_x_i (const Vec &x, int i, real squared_norm_of_x=-1) const | 
| returns evaluate(x,data(i)) [default version calls evaluate_i_x if kernel is_symmetric]   | |
| virtual real | evaluate_i_x_again (int i, const Vec &x, real squared_norm_of_x=-1, bool first_time=false) const | 
| Return evaluate(data(i),x), where x is the same as in the precedent call to this same function (except if 'first_time' is true).   | |
| virtual real | evaluate_x_i_again (const Vec &x, int i, real squared_norm_of_x=-1, bool first_time=false) const | 
| virtual void | computeGramMatrix (Mat K) const | 
| Call evaluate_i_j to fill each of the entries (i,j) of symmetric matrix K.   | |
| virtual void | setDataForKernelMatrix (VMat the_data) | 
| ** Subclasses may overload these methods to provide efficient kernel matrix access **   | |
Public Attributes | |
| bool | data_will_change | 
| bool | double_centering | 
| bool | remove_bias | 
| bool | remove_bias_in_evaluate | 
Protected Member Functions | |
| real | computeAverage (const Vec &x, bool on_row, real squared_norm_of_x=-1) const | 
| Return the average of K(x,x_i) or K(x_i,x), depending on the value of 'on_row' (true or false, respectively).   | |
Static Protected Member Functions | |
| void | declareOptions (OptionList &ol) | 
| Declares this class' options.   | |
Protected Attributes | |
| Vec | average_col | 
| Vec | average_row | 
| real | total_average | 
| real | total_average_unbiased | 
| real | avg_evaluate_i_x_again | 
| The last average computed in evaluate_i_x_again().   | |
| real | avg_evaluate_x_i_again | 
| The last average computed in evaluate_x_i_again().   | |
| real | factor | 
| A multiplicative factor to scale the result (1 or -1/2).   | |
Private Types | |
| typedef SourceKernel | inherited | 
Private Member Functions | |
| void | build_ () | 
| This does the actual building.   | |
Private Attributes | |
| Vec | all_k_x | 
| Used to store the values of the source kernel.   | |
      
  | 
  
| 
 
 Reimplemented from PLearn::SourceKernel. Definition at line 57 of file AdditiveNormalizationKernel.h.  | 
  
      
  | 
  
| 
 Default constructor. 
 Definition at line 52 of file AdditiveNormalizationKernel.cc.  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Created from an existing kernel. 
 Definition at line 60 of file AdditiveNormalizationKernel.cc.  | 
  
      
  | 
  
| 
 Simply calls inherited::build() then build_(). 
 Reimplemented from PLearn::SourceKernel. Definition at line 127 of file AdditiveNormalizationKernel.cc. References build_().  | 
  
      
  | 
  
| 
 This does the actual building. 
 Reimplemented from PLearn::SourceKernel. Definition at line 137 of file AdditiveNormalizationKernel.cc. References double_centering, and factor. Referenced by build().  | 
  
      
  | 
  ||||||||||||||||
| 
 Return the average of K(x,x_i) or K(x_i,x), depending on the value of 'on_row' (true or false, respectively). 
 Definition at line 155 of file AdditiveNormalizationKernel.cc. References all_k_x, PLearn::TVec< T >::resize(), PLearn::sum(), PLearn::Vec, and x. Referenced by evaluate(), evaluate_i_x(), evaluate_i_x_again(), evaluate_x_i(), and evaluate_x_i_again().  | 
  
      
  | 
  
| 
 Call evaluate_i_j to fill each of the entries (i,j) of symmetric matrix K. 
 Reimplemented from PLearn::SourceKernel. Definition at line 168 of file AdditiveNormalizationKernel.cc. References PLearn::Mat.  | 
  
      
  | 
  
| 
 Declares this class' options. 
 Reimplemented from PLearn::SourceKernel. Definition at line 86 of file AdditiveNormalizationKernel.cc. References PLearn::declareOption(), and PLearn::OptionList.  | 
  
      
  | 
  ||||||||||||
| 
 Overridden. 
 Reimplemented from PLearn::SourceKernel. Definition at line 176 of file AdditiveNormalizationKernel.cc. References computeAverage(), factor, remove_bias, remove_bias_in_evaluate, total_average, and total_average_unbiased.  | 
  
      
  | 
  ||||||||||||
| 
 returns evaluate(data(i),data(j)) 
 Reimplemented from PLearn::SourceKernel. Definition at line 191 of file AdditiveNormalizationKernel.cc. References average_col, average_row, factor, and total_average.  | 
  
      
  | 
  ||||||||||||||||
| 
 returns evaluate(data(i),x) [squared_norm_of_x is just a hint that may allow to speed up computation if it is already known, but it's optional] Reimplemented from PLearn::SourceKernel. Definition at line 198 of file AdditiveNormalizationKernel.cc. References average_row, computeAverage(), factor, total_average, and x.  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Return evaluate(data(i),x), where x is the same as in the precedent call to this same function (except if 'first_time' is true). This can be used to speed up successive computations of K(x_i, x) (default version just calls evaluate_i_x). Reimplemented from PLearn::Kernel. Definition at line 206 of file AdditiveNormalizationKernel.cc. References average_row, avg_evaluate_i_x_again, computeAverage(), factor, total_average, and x.  | 
  
      
  | 
  ||||||||||||||||
| 
 returns evaluate(x,data(i)) [default version calls evaluate_i_x if kernel is_symmetric] 
 Reimplemented from PLearn::SourceKernel. Definition at line 217 of file AdditiveNormalizationKernel.cc. References average_col, computeAverage(), factor, total_average, and x.  | 
  
      
  | 
  ||||||||||||||||||||
| 
 
 Reimplemented from PLearn::Kernel. Definition at line 225 of file AdditiveNormalizationKernel.cc. References average_col, avg_evaluate_x_i_again, computeAverage(), factor, total_average, and x.  | 
  
      
  | 
  
| 
 Transforms a shallow copy into a deep copy. 
 Reimplemented from PLearn::SourceKernel. Definition at line 236 of file AdditiveNormalizationKernel.cc. References PLERROR.  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 ** Subclasses may overload these methods to provide efficient kernel matrix access ** This method sets the data VMat that will be used to define the kernel matrix. It may precompute values from this that may later accelerate the evaluation of a kernel matrix element Reimplemented from PLearn::SourceKernel. Definition at line 253 of file AdditiveNormalizationKernel.cc. References average_col, average_row, data_will_change, PLearn::TVec< T >::fill(), PLearn::TVec< T >::length(), PLearn::VMat::length(), remove_bias, PLearn::TVec< T >::resize(), PLearn::sum(), total_average, and total_average_unbiased.  | 
  
      
  | 
  
| 
 Used to store the values of the source kernel. 
 Definition at line 60 of file AdditiveNormalizationKernel.h. Referenced by computeAverage().  | 
  
      
  | 
  
| 
 
 Definition at line 68 of file AdditiveNormalizationKernel.h. Referenced by evaluate_i_j(), evaluate_x_i(), evaluate_x_i_again(), and setDataForKernelMatrix().  | 
  
      
  | 
  
| 
 
 Definition at line 69 of file AdditiveNormalizationKernel.h. Referenced by evaluate_i_j(), evaluate_i_x(), evaluate_i_x_again(), and setDataForKernelMatrix().  | 
  
      
  | 
  
| 
 The last average computed in evaluate_i_x_again(). 
 Definition at line 76 of file AdditiveNormalizationKernel.h. Referenced by evaluate_i_x_again().  | 
  
      
  | 
  
| 
 The last average computed in evaluate_x_i_again(). 
 Definition at line 79 of file AdditiveNormalizationKernel.h. Referenced by evaluate_x_i_again().  | 
  
      
  | 
  
| 
 
 Definition at line 90 of file AdditiveNormalizationKernel.h. Referenced by setDataForKernelMatrix().  | 
  
      
  | 
  
| 
 
 Definition at line 91 of file AdditiveNormalizationKernel.h. Referenced by build_().  | 
  
      
  | 
  
| 
 A multiplicative factor to scale the result (1 or -1/2). 
 Definition at line 82 of file AdditiveNormalizationKernel.h. Referenced by build_(), evaluate(), evaluate_i_j(), evaluate_i_x(), evaluate_i_x_again(), evaluate_x_i(), and evaluate_x_i_again().  | 
  
      
  | 
  
| 
 
 Definition at line 92 of file AdditiveNormalizationKernel.h. Referenced by evaluate(), and setDataForKernelMatrix().  | 
  
      
  | 
  
| 
 
 Definition at line 93 of file AdditiveNormalizationKernel.h. Referenced by evaluate().  | 
  
      
  | 
  
| 
 
 Definition at line 70 of file AdditiveNormalizationKernel.h. Referenced by evaluate(), evaluate_i_j(), evaluate_i_x(), evaluate_i_x_again(), evaluate_x_i(), evaluate_x_i_again(), and setDataForKernelMatrix().  | 
  
      
  | 
  
| 
 
 Definition at line 71 of file AdditiveNormalizationKernel.h. Referenced by evaluate(), and setDataForKernelMatrix().  | 
  
 1.3.7