Changeset 1115 for trunk/yat


Ignore:
Timestamp:
Feb 21, 2008, 8:20:59 PM (14 years ago)
Author:
Markus Ringnér
Message:

Fixes #254 and #295

Location:
trunk/yat
Files:
5 edited

Legend:

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

    r1112 r1115  
    4646  /// @brief Class for Nearest Neigbor Classification.
    4747  ///
    48   /// The template argument Distance should be a class implementing
     48  /// The template argument Distance should be a class modelling
    4949  /// the concept \ref concept_distance.
    50   /// The template argument NeigborWeighting should be a class implementing
     50  /// The template argument NeigborWeighting should be a class modelling
    5151  /// the concept \ref concept_neighbor_weighting.
    5252
  • trunk/yat/classifier/NCC.h

    r1112 r1115  
    5656  /// @brief Class for Nearest Centroid Classification.
    5757  ///
    58   /// The template argument Distance should be a class implementing
     58  /// The template argument Distance should be a class modelling
    5959  /// the concept \ref concept_distance.
    6060  ///
  • trunk/yat/statistics/EuclideanDistance.h

    r1093 r1115  
    3838  ///
    3939  /// @brief Calculates the Euclidean distance between two points
    40   /// stored in 1-dimensional containers. Implements the concept \ref
    41   /// concept_distance.
     40  /// given by elements of ranges.
     41  ///
     42  /// This class is modelling the concept \ref concept_distance.
    4243  ///
    4344  ///
     
    4546  {   
    4647    /**
    47        \brief Calculates the Euclidean distance between two ranges.
     48       \brief Calculates the Euclidean distance between elements of
     49       two ranges.
    4850   
    49        If both ranges are unweighted the distance is calculated as \f$
    50        \sqrt{\sum (x_i-y_i)^2 } \f$
     51       If elements of both ranges are unweighted the distance is
     52       calculated as \f$ \sqrt{\sum (x_i-y_i)^2 } \f$, where \f$ x_i
     53       \f$ and \f$ y_i \f$ are elements of the first and second range,
     54       respectively.
    5155
    52        Else distance is calculated as \f$ N \frac{\sum
    53        w_xw_y(x-y)^2}{\sum w_xw_y} \f$
     56       If elements of one or both of ranges have weights the distance
     57       is calculated as \f$ \sqrt{N \sum
     58       w_{x,i}w_{y,i}(x_i-y_i)^2/\sum w_{x,i}w_{y,i}} \f$, where \f$ N
     59       \f$ is the number of elements in the two ranges and \f$ w_x \f$
     60       and \f$ w_y \f$ are weights for the elements of the first and
     61       the second range, respectively. If the elements of one of the
     62       two ranges are unweighted, the weights for these elements are
     63       set to unity.
    5464    */
    5565    template <typename Iter1, typename Iter2>
  • trunk/yat/statistics/PearsonDistance.h

    r1092 r1115  
    3535
    3636  ///
    37   /// @brief Calculates the %Pearson correlation distance between two points stored in 1-dimensional containers. Implements the concept \ref concept_distance.
     37  /// @brief Calculates the %Pearson correlation distance between two points given by elements of ranges.
    3838  ///
     39  /// This class is modelling the concept \ref concept_distance.
    3940  ///
    4041  struct PearsonDistance
    4142  {
    42     ///
    43     /// @brief Calculates the %Pearson correlation distance between two ranges.
    44     ///
     43    /**
     44       \brief Calculates the %Pearson correlation distance between
     45       elements of two ranges.
     46   
     47       If elements of both ranges are unweighted the distance is
     48       calculated as \f$ 1-\mbox{C}(x,y) \f$, where \f$ x \f$ and \f$
     49       y \f$ are the two points and C is the %Pearson correlation.
     50
     51       If elements of one or both of ranges have weights the distance
     52       is calculated as \f$ 1-[\sum w_{x,i}w_{y,i}(x_i-y_i)^2/(\sum
     53       w_{x,i}w_{y,i}(x_i-m_x)^2\sum w_{x,i}w_{y,i}(y_i-m_y)^2)] \f$,
     54       where and \f$ w_x \f$ and \f$ w_y \f$ are weights for the
     55       elements of the first and the second range, respectively, and
     56       \f$ m_x=\sum w_{x,i}w_{y,i}x_i/\sum w_{x,i}w_{y,i} \f$ and
     57       correspondingly for \f$ m_y \f$.  If the elements of one of the
     58       two ranges are unweighted, the weights for these elements are
     59       set to unity.
     60    */   
    4561    template <typename Iter1, typename Iter2>
    4662    double operator()
  • trunk/yat/utility/iterator_traits.h

    r1092 r1115  
    3737  /**
    3838    Struct to be used to make compile-time decision that Iterator is
    39     weighted. Some algorithms come in also in a weighted version in
     39    weighted. Some algorithms come also in a weighted version and
    4040    this tag could be used to decide on using them (rather than
    41     unweighted cousin).
     41    the corresponding unweighted algorithm).
    4242   */
    4343  struct weighted_iterator_tag {};
     
    109109
    110110  /**
    111      \brief traits to make unweighted iterator work in as a weighted
     111     \brief traits to make unweighted iterator work as in a weighted
    112112
    113113     This class must be implemented for every iterator that can be weighted.
Note: See TracChangeset for help on using the changeset viewer.