[mlpack-git] [mlpack/mlpack] DatasetMapper & Imputer (#694)

Ryan Curtin notifications at github.com
Thu Jul 7 10:32:53 EDT 2016


> +template <typename T>
> +class MedianImputation
> +{
> + public:
> +  void Impute(const arma::Mat<T>& input,
> +              arma::Mat<T>& output,
> +              const T& mappedValue,
> +              const size_t dimension,
> +              const bool transpose = true)
> +  {
> +    //initiate output
> +    output = input;
> +
> +    if (transpose)
> +    {
> +      arma::Mat<T> medianMat = arma::median(input, 1);

Doesn't this calculate the median with the missing values (mapped values) in it?  I think we need to manually calculate the median here, ignoring the missing values.  It seems like this is not a problem for the mean imputation.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r69917503
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160707/66fda41b/attachment.html>


More information about the mlpack-git mailing list