Skip to content

Commit

Permalink
Added some doc for #376
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Feb 17, 2012
1 parent e4b8a73 commit f7e33a8
Showing 1 changed file with 44 additions and 7 deletions.
51 changes: 44 additions & 7 deletions src/shogun/preprocessor/HomogeneousKernelMap.h
Expand Up @@ -33,13 +33,14 @@ namespace shogun
};

/** @brief Preprocessor HomogeneousKernelMap performs homogeneous kernel maps
* as described in
*
* A. Vedaldi and A. Zisserman.
* Efficient additive kernels via explicit feature maps.
* In PAMI, 2011
*
* The homogeneous kernel map is a finite dimensional linear
* approximation of homgeneous kernels, including the intersection,
* approximation of homogeneous kernels, including the intersection,
* chi-squared, and Jensen-Shannon kernels. These kernels
* are frequently used in computer vision applications because they
* are particular suitable for data in the format of histograms, which
Expand Down Expand Up @@ -68,37 +69,73 @@ namespace shogun
/** destructor */
virtual ~CHomogeneousKernelMap ();

/// initialize preprocessor from features
/** initialize preprocessor from features */
virtual bool init(CFeatures* features);

/// cleanup
/** cleanup */
virtual void cleanup();

/** applies to features
* @param features features
* @return feature matrix
*/
virtual SGMatrix<float64_t> apply_to_feature_matrix (CFeatures* features);

/// apply preproc on single feature vector
/// result in feature matrix
/** applies to feature vector
* @param vector features vector
* @return transformed feature vector
*/
virtual SGVector<float64_t> apply_to_feature_vector (SGVector<float64_t> vector);

/** @return object name */
virtual inline const char* get_name () const { return "HomogeneousKernelMap"; }

/// return a type of preprocessor
/** @return a type of preprocessor */
virtual inline EPreprocessorType get_type () const { return P_HOMOGENEOUSKERNELMAP; }

/** sets kernel type
* @param k type of homogeneous kernel
*/
void setKernelType (HomogeneousKernelType k);
/** returns kernel type
* @return kernel type
*/
HomogeneousKernelType getKernelType () const;

/** sets window type
* @param w type of window
*/
void setWindowType (HomogeneousKernelMapWindowType w);
/** returns window type
* @return window type
*/
HomogeneousKernelMapWindowType getWindowType () const;

/** sets gamma
* @param g gamma value
*/
void setGamma (float64_t g);
/** returns gamma
* @return gamma value
*/
float64_t getGamma (float64_t g) const;

/** sets approximation order
* @param o order
*/
void setOrder (uint64_t o);
/** returns approximation order
* @return approximation order
*/
uint64_t getOrder () const;

/** sets period
* @param p period value
*/
void setPeriod (float64_t p);
/** returns period value
* @return period value
*/
float64_t getPeriod () const;

private:
Expand All @@ -122,4 +159,4 @@ namespace shogun
SGVector<float64_t> m_table;
};
}
#endif /* _CHOMOGENEOUKERNELMAP__H__ */
#endif /* _CHOMOGENEOUKERNELMAP__H__ */

0 comments on commit f7e33a8

Please sign in to comment.