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

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

Addresses #65 and #170.

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