Ignore:
Timestamp:
Feb 11, 2007, 11:08:23 PM (15 years ago)
Author:
Peter
Message:

fixes #72

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/Kernel.h

    r747 r749  
    3838  class MatrixLookupWeighted;
    3939
    40   ///
     40  ///
    4141  ///  @brief Abstract Base Class for Kernels.
    4242  ///
    4343  ///  Class taking care of the \f$ NxN \f$ kernel matrix, where \f$ N \f$
    44   ///  is number of samples. Each element in the Kernel corresponds is
     44  ///  is number of samples. Each element in the Kernel corresponds to
    4545  ///  the scalar product of the corresponding pair of samples. At the
    4646  ///  time being there are two kinds of kernels. Kernel_SEV that is
    4747  ///  optimized to be fast and Kernel_MEV that is preferable when
    4848  ///  dealing with many samples and memory might be a
    49   ///  bottleneck. Also there are the corresponding weighted versions
    50   ///  to deal with weights (including missing values). A
     49  ///  bottleneck. A
    5150  ///  KernelFunction defines what kind of scalar product the Kernel
    5251  ///  represents, e.g. a Polynomial Kernel of degree 1 means we are
    5352  ///  dealing with the ordinary linear scalar product.
    5453  ///
    55   /// @note If the KernelFunction is destroyed, the Kernel is no
    56   /// longer defined.
    57   ///
    58   class Kernel
    59   {
    60    
    61   public:
     54  /// @note If the KernelFunction is destroyed, the Kernel is no
     55  /// longer defined.
     56  ///
     57  class Kernel
     58  {
     59
     60  public:
    6261
    6362    ///
    64     /// Constructor taking the @a data matrix and KernelFunction as
    65     /// input. Each column in the data matrix corresponds to one
    66     /// sample and the Kernel matrix is built applying the
    67     /// KernelFunction on each pair of columns in the data matrix.
     63    /// Constructor taking the @a data matrix and KernelFunction as
     64    /// input. Each column in the data matrix corresponds to one
     65    /// sample and the Kernel matrix is built applying the
     66    /// KernelFunction on each pair of columns in the data matrix.
     67    /// If @a own is set to true, Kernel is owner of underlying data.
    6868    ///
    69     /// @note Can not handle NaNs.
     69    /// @note Can not handle NaNs. To deal with missing values use
     70    /// constructor taking MatrixLookupWeighted.
    7071    ///
    7172    Kernel(const MatrixLookup& data, const KernelFunction& kf,
     
    7374
    7475    ///
    75     /// Constructor taking the @a data matrix (with weights) and
    76     /// KernelFunction as
    77     /// input. Each column in the data matrix corresponds to one
    78     /// sample and the Kernel matrix is built applying the
    79     /// KernelFunction on each pair of columns in the data matrix.
    80     ///
    81     /// @note Can not handle NaNs.
     76    /// Constructor taking the @a data matrix (with weights) and
     77    /// KernelFunction as
     78    /// input. Each column in the data matrix corresponds to one
     79    /// sample and the Kernel matrix is built applying the
     80    /// KernelFunction on each pair of columns in the data matrix.
     81    /// If @a own is set to true, Kernel is owner of underlying data.
    8282    ///
    8383    Kernel(const MatrixLookupWeighted& data, const KernelFunction& kf,
     
    8686    ///
    8787    /// The new kernel is created using selected features @a
    88     /// index. Kernel will own its underlying data and delete it in
    89     /// destructor.
     88    /// index. Kernel will own its underlying data
    9089    ///
    9190    Kernel(const Kernel& kernel, const std::vector<size_t>& index);
    9291
    93     ///
    94     ///   Destructor
    95     ///
     92    ///
     93    /// @brief Destructor
     94    ///
     95    /// If Kernel is owner of underlying data and Kernel is the last
     96    /// owner, underlying data is deleted.
     97    ///
    9698    virtual ~Kernel(void);
    9799
     
    99101    /// @return element at position (\a row, \a column) of the Kernel
    100102    /// matrix
    101     ///
     103    ///
    102104    virtual double operator()(const size_t row, const size_t column) const=0;
    103105
     
    156158    bool weighted(void) const;
    157159
    158   protected:
     160  protected:
    159161    /// underlying data
    160162    const DataLookup2D* data_;
     
    165167
    166168    ///
    167     /// poiter telling how many owners to underlying data
     169    /// pointer telling how many owners to underlying data
    168170    /// (data_). NULL if this is not an owner.
    169171    ///
     
    171173
    172174    ///
    173     /// poiter telling how many owners to underlying weights
     175    /// pointer telling how many owners to underlying weights
    174176    /// (data_w_). NULL if this is not an owner.
    175177    ///
     
    184186    const Kernel& operator=(const Kernel&);
    185187
    186   }; // class Kernel
     188  }; // class Kernel
    187189
    188190}}} // of namespace classifier, yat, and theplu
Note: See TracChangeset for help on using the changeset viewer.