source: trunk/yat/utility/WeNNI.h @ 1679

Last change on this file since 1679 was 1487, checked in by Jari Häkkinen, 13 years ago

Addresses #436. GPL license copy reference should also be updated.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1#ifndef _theplu_yat_utility_wenni_
2#define _theplu_yat_utility_wenni_
3
4// $Id: WeNNI.h 1487 2008-09-10 08:41:36Z jari $
5
6/*
7  Copyright (C) 2004 Jari Häkkinen
8  Copyright (C) 2005 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2006 Jari Häkkinen
10  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
11  Copyright (C) 2008 Peter Johansson
12
13  This file is part of the yat library, http://dev.thep.lu.se/yat
14
15  The yat library is free software; you can redistribute it
16  and/or modify it under the terms of the GNU General Public License
17  as published by the Free Software Foundation; either version 3 of
18  the License, or (at your option) any later version.
19
20  The yat library is distributed in the hope that it will be
21  useful, but WITHOUT ANY WARRANTY; without even the implied warranty
22  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  General Public License for more details.
24
25  You should have received a copy of the GNU General Public License
26  along with yat. If not, see <http://www.gnu.org/licenses/>.
27*/
28
29#include "NNI.h"
30#include "Matrix.h"
31
32#include <iostream>
33
34namespace theplu {
35namespace yat {
36namespace utility {
37
38  ///
39  /// @brief Weighted Nearest Neighbour Imputation
40  ///
41  /// WeNNI is a continuous weights generalization of the (binary
42  /// weights) kNNI algorithm presented by Troyanskaya et al. A
43  /// reference to this paper is found in the NNI document referred to
44  /// in the NNI class documentation. The NNI document also describes
45  /// WeNNI in depth.
46  ///
47  /// @see NNI and kNNI
48  ///
49  class WeNNI : public NNI
50  {
51  public:
52    ///
53    /// Constructor
54    ///
55    WeNNI(const utility::Matrix& matrix,const utility::Matrix& weight,
56          const unsigned int neighbours);
57
58    ///
59    /// Perform WeNNI on data in \a matrix with continuous uncertainty
60    /// weights in \a weight using \a neighbours for the new impute
61    /// value.
62    ///
63    unsigned int estimate(void);
64
65    ///
66    /// @return A const reference to imputed_data_raw.
67    ///
68    const utility::Matrix& imputed_data_raw(void) const 
69    { return imputed_data_raw_; }
70
71
72  private:
73
74    utility::Matrix imputed_data_raw_;
75  };
76
77}}} // of namespace utility, yat, and theplu
78
79#endif
Note: See TracBrowser for help on using the repository browser.