#ifndef _theplu_yat_utility_wenni_
#define _theplu_yat_utility_wenni_
// $Id: WeNNI.h 1437 2008-08-25 17:55:00Z peter $
/*
Copyright (C) 2004 Jari Häkkinen
Copyright (C) 2005 Jari Häkkinen, Peter Johansson
Copyright (C) 2006 Jari Häkkinen
Copyright (C) 2007 Jari Häkkinen, Peter Johansson
Copyright (C) 2008 Peter Johansson
This file is part of the yat library, http://dev.thep.lu.se/yat
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 License, or (at your option) any later version.
The yat library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "NNI.h"
#include "Matrix.h"
#include
namespace theplu {
namespace yat {
namespace utility {
///
/// @brief Weighted Nearest Neighbour Imputation
///
/// WeNNI is a continuous weights generalization of the (binary
/// weights) kNNI algorithm presented by Troyanskaya et al. A
/// reference to this paper is found in the NNI document referred to
/// in the NNI class documentation. The NNI document also describes
/// WeNNI in depth.
///
/// @see NNI and kNNI
///
class WeNNI : public NNI
{
public:
///
/// Constructor
///
WeNNI(const utility::Matrix& matrix,const utility::Matrix& weight,
const unsigned int neighbours);
///
/// Perform WeNNI on data in \a matrix with continuous uncertainty
/// weights in \a weight using \a neighbours for the new impute
/// value.
///
unsigned int estimate(void);
///
/// @return A const reference to imputed_data_raw.
///
const utility::Matrix& imputed_data_raw(void) const
{ return imputed_data_raw_; }
private:
utility::Matrix imputed_data_raw_;
};
}}} // of namespace utility, yat, and theplu
#endif