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

Last change on this file since 1437 was 1437, checked in by Peter, 13 years ago

merge patch release 0.4.2 to trunk. Delta 0.4.2-0.4.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
RevLine 
[680]1#ifndef _theplu_yat_utility_wenni_
2#define _theplu_yat_utility_wenni_
[616]3
[145]4// $Id: WeNNI.h 1437 2008-08-25 17:55:00Z peter $
5
[570]6/*
[831]7  Copyright (C) 2004 Jari Häkkinen
8  Copyright (C) 2005 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2006 Jari Häkkinen
[1275]10  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
11  Copyright (C) 2008 Peter Johansson
[570]12
[1437]13  This file is part of the yat library, http://dev.thep.lu.se/yat
[570]14
[675]15  The yat library is free software; you can redistribute it
[570]16  and/or modify it under the terms of the GNU General Public License
17  as published by the Free Software Foundation; either version 2 of
18  the License, or (at your option) any later version.
19
[675]20  The yat library is distributed in the hope that it will be
[570]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 this program; if not, write to the Free Software
27  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
28  02111-1307, USA.
29*/
30
[680]31#include "NNI.h"
[1121]32#include "Matrix.h"
[145]33
34#include <iostream>
35
36namespace theplu {
[680]37namespace yat {
[301]38namespace utility {
[145]39
40  ///
[767]41  /// @brief Weighted Nearest Neighbour Imputation
42  ///
[178]43  /// WeNNI is a continuous weights generalization of the (binary
44  /// weights) kNNI algorithm presented by Troyanskaya et al. A
[177]45  /// reference to this paper is found in the NNI document referred to
46  /// in the NNI class documentation. The NNI document also describes
47  /// WeNNI in depth.
[145]48  ///
[177]49  /// @see NNI and kNNI
50  ///
[145]51  class WeNNI : public NNI
52  {
53  public:
[228]54    ///
55    /// Constructor
56    ///
[1121]57    WeNNI(const utility::Matrix& matrix,const utility::Matrix& weight,
[1271]58          const unsigned int neighbours);
[228]59
60    ///
[178]61    /// Perform WeNNI on data in \a matrix with continuous uncertainty
[177]62    /// weights in \a weight using \a neighbours for the new impute
63    /// value.
[145]64    ///
[1271]65    unsigned int estimate(void);
[146]66
[233]67    ///
[246]68    /// @return A const reference to imputed_data_raw.
[233]69    ///
[1121]70    const utility::Matrix& imputed_data_raw(void) const 
[233]71    { return imputed_data_raw_; }
72
73
[146]74  private:
[145]75
[1121]76    utility::Matrix imputed_data_raw_;
[145]77  };
78
[687]79}}} // of namespace utility, yat, and theplu
[145]80
81#endif
Note: See TracBrowser for help on using the repository browser.