#ifndef _theplu_yat_utility_knni_
#define _theplu_yat_utility_knni_
// $Id: kNNI.h 1487 2008-09-10 08:41:36Z jari $
/*
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 3 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 yat. If not, see .
*/
#include "NNI.h"
#include
#include
namespace theplu {
namespace yat {
namespace utility {
///
/// @brief kNNimpute
///
/// kNNI is the binary weight implementation of NNI. This follows
/// the work done by Troyanskaya et al. cited in the NNI document
/// referred to in the NNI class documentation.
///
/// This is a special case of the WeNNI, but is maintained since it
/// is faster than the more general WeNNI.
///
/// @see NNI and WeNNI
///
class kNNI : public NNI
{
public:
///
/// Constructor
///
kNNI(const utility::Matrix& matrix,const utility::Matrix& weight,
const unsigned int neighbours);
///
/// Perform kNNI on data in \a matrix with binary uncertainty
/// weights in \a weight using \a neighbours for the new impute
/// value.
///
unsigned int estimate(void);
private:
std::vector mv_rows_; // index to rows that have values to estimate
};
}}} // of namespace utility, yat, and theplu
#endif