# Changeset 1112 for trunk/doc/concepts.doxygen

Ignore:
Timestamp:
Feb 21, 2008, 3:59:30 PM (14 years ago)
Message:

Mostly related to #295 and #182

File:
1 edited

Unmodified
Added
Removed
• ## trunk/doc/concepts.doxygen

 r1094 // This file is part of the yat library, http://trac.thep.lu.se/yat // // The yat library is free software; you can redistribute it and/or // The yat library is free software; you can redistribute it and./or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of the /** \page Concepts Concepts \page Concepts Concepts This page lists all the C++ concepts in the yat project. This page lists all the C++ concepts in the yat project. - \subpage concept_distance - \subpage concept_distance - \subpage concept_neighbor_weighting */ /** \page concept_distance Distance \section Description Distance is a concept ... \section Requirements Classes implementing the concept Distance should fulfill ... Examples include theplu::yat::statistics::PearsonDistance and theplu::yat::statistics::EuclideanDistance. \page concept_distance Distance \section Description \ref concept_distance is a concept .. \section Requirements Classes modelling the concept \ref concept_distance should implement ... Examples of classes modelling the concept \ref concept_distance include theplu::yat::statistics::PearsonDistance and theplu::yat::statistics::EuclideanDistance. */ /** \page concept_neighbor_weighting Neighbor Weighting Method \section Description \ref concept_neighbor_weighting is a concept used in connection with theplu::yat::classifier::KNN - classes used as the template argument NeighborWeighting should implement this concept. \section Requirements Classes modelling the concept \ref concept_neighbor_weighting should implement the following function: \verbatim void operator()(const utility::VectorBase& distance, const std::vector k_sorted, const Target& target, utility::VectorMutable& prediction) const \endverbatim For a test sample, this function should calculate a total vote (i.e. based on all k nearest neighbors) for each class. The vector \a distance contains the distances from a test sample to all training samples. The vector \a k_sorted contains the indices (for both \a distance and \a target) to the k training samples with the smallest distances to the test sample. The class for each training sample is given by \a target, which is sorted in the same sample order as \a distance. For each class the function calculates a total vote based on the the nearest neighbors of the test sample that belong to the class. The total vote for each class is stored in the vector \a prediction. Examples of classes modelling the concept \ref concept_neighbor_weighting include theplu::yat::classifier::KNN_Uniform, theplu::yat::classifier::KNN_ReciprocalDistance and theplu::yat::classifier::KNN_ReciprocalRank. */
Note: See TracChangeset for help on using the changeset viewer.