<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r69917503">src/mlpack/core/data/imputation_methods/median_imputation.hpp</a>:</p>
<pre style='color:#555'>> +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);
</pre>
<p>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.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r69917503">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFNBOs6tvVmKjL8HYmG8HUnLG1MoTks5qTQ4VgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLzsLVxdHTZx_96JBhjJBS5NT3_Hks5qTQ4VgaJpZM4I07W-.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r69917503"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>