source: trunk/src/kNNI.h @ 178

Last change on this file since 178 was 178, checked in by Jari Häkkinen, 19 years ago

Fixed minor documentation issues and performed spell checking.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1// $Id: kNNI.h 178 2004-10-01 09:24:13Z jari $
2
3#ifndef _theplu_cpptools_knni_
4#define _theplu_cpptools_knni_
5
6#include "NNI.h"
7
8#include <iostream>
9#include <vector>
10
11namespace theplu {
12namespace cpptools {
13
14  ///
15  /// kNNI is the binary weight implementation of NNI. This follows
16  /// the work done by Troyanskaya et al. cited in the NNI document
17  /// referred to in the NNI class documentation.
18  ///
19  /// This is a special case of the WeNNI, but is maintained since it
20  /// is faster than the more general WeNNI.
21  ///
22  /// @see NNI and WeNNI
23  ///
24  class kNNI : public NNI
25  {
26  public:
27    /// Perform kNNI on data in \a matrix with binary uncertainty
28    /// weights in \a weight using \a neighbours for the new impute
29    /// value.
30    ///
31    /// @note The algorithm is initiated within the constructor and
32    /// the result is fetched with the NNI::imputed_data method.
33    kNNI(const gslapi::matrix& matrix,const gslapi::matrix& weight,
34         const u_int neighbours);
35
36  private:
37    void estimate(void);
38
39    vector<u_int> mv_rows_; // index to rows that have values to estimate
40  };
41
42}} // of namespace cpptools and namespace theplu
43
44#endif
Note: See TracBrowser for help on using the repository browser.