Changeset 1112 for trunk/doc


Ignore:
Timestamp:
Feb 21, 2008, 3:59:30 PM (13 years ago)
Author:
Markus Ringnér
Message:

Mostly related to #295 and #182

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/concepts.doxygen

    r1094 r1112  
    55// This file is part of the yat library, http://trac.thep.lu.se/yat
    66//
    7 // The yat library is free software; you can redistribute it and/or
     7// The yat library is free software; you can redistribute it and./or
    88// modify it under the terms of the GNU General Public License as
    99// published by the Free Software Foundation; either version 2 of the
     
    2222
    2323/**
    24  \page Concepts Concepts
     24\page Concepts Concepts
    2525
    26  This page lists all the C++ concepts in the yat project.
     26This page lists all the C++ concepts in the yat project.
    2727
    28  - \subpage concept_distance
     28- \subpage concept_distance
     29- \subpage concept_neighbor_weighting
    2930*/
    3031
    3132
    3233/**
    33  \page concept_distance Distance
    34  \section Description
    35  Distance is a concept ...
    36  \section Requirements
    37  Classes implementing the concept Distance should fulfill ...
    38  Examples include theplu::yat::statistics::PearsonDistance and theplu::yat::statistics::EuclideanDistance.
     34\page concept_distance Distance
     35
     36\section Description
     37
     38\ref concept_distance is a concept ..
     39
     40\section Requirements
     41
     42Classes modelling the concept \ref concept_distance should implement ... 
     43
     44Examples of classes modelling the concept \ref concept_distance
     45include theplu::yat::statistics::PearsonDistance and
     46theplu::yat::statistics::EuclideanDistance.
     47
    3948*/
     49
     50/**
     51\page concept_neighbor_weighting Neighbor Weighting Method
     52
     53\section Description
     54
     55\ref concept_neighbor_weighting is a concept used in connection with
     56theplu::yat::classifier::KNN - classes used as the template argument
     57NeighborWeighting should implement this concept.
     58
     59\section Requirements
     60
     61Classes modelling the concept \ref concept_neighbor_weighting should
     62implement the following function:
     63 
     64\verbatim   
     65void operator()(const utility::VectorBase& distance, const std::vector<size_t> k_sorted,
     66                const Target& target, utility::VectorMutable& prediction) const
     67\endverbatim
     68
     69For a test sample, this function should calculate a total vote
     70(i.e. based on all k nearest neighbors) for each class. The vector \a
     71distance contains the distances from a test sample to all training
     72samples. The vector \a k_sorted contains the indices (for both \a
     73distance and \a target) to the k training samples with the smallest
     74distances to the test sample. The class for each training sample is
     75given by \a target, which is sorted in the same sample order as \a
     76distance. For each class the function calculates a total vote based on
     77the the nearest neighbors of the test sample that belong to the
     78class. The total vote for each class is stored in the vector \a prediction.
     79
     80Examples of classes modelling the concept \ref
     81concept_neighbor_weighting include
     82theplu::yat::classifier::KNN_Uniform,
     83theplu::yat::classifier::KNN_ReciprocalDistance and
     84theplu::yat::classifier::KNN_ReciprocalRank.
     85
     86*/
Note: See TracChangeset for help on using the changeset viewer.