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

stereomatchingkiss notifications at github.com
Tue Jun 14 05:21:26 EDT 2016


> +   * @param dimension
> +   * @param index
> +   * @param transpose
> +   */
> +  template <typename MatType>
> +  void Impute(const MatType &input,
> +              MatType &output,
> +              const size_t dimension,
> +              const size_t index,
> +              const bool transpose = true)
> +  {
> +    if (transpose)
> +    {
> +      // TODO: The mean must be calculated
> +      // without NaN or target missing variable.
> +      MatType meanMat = arma::mean(input, 1);

I think we can store the mean in the class, this way we do not need to recalculate the mean over and over.
We can store the mapper to help us filter out what are the NaN or target missing variable too.

---
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/5a517c25ef55de1f4814dc3605190d17f868ff82#r66935874
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160614/24a1ae61/attachment.html>


More information about the mlpack-git mailing list