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

Ryan Curtin notifications at github.com
Thu Jul 7 11:01:38 EDT 2016


> +
> +  //! Get the mapper
> +  const MapperType& Mapper() const { return mapper; }
> +
> +  //! Modify the given mapper (be careful!)
> +  MapperType& Mapper() { return mapper; }
> +
> + private:
> +  // StrategyType
> +  StrategyType strategy;
> +
> +  // DatasetMapperType<MapPolicy>
> +  MapperType mapper;
> +
> +  // save transpose as a member variable since it is rarely changed.
> +  bool transpose;

Oh!  Now I understand.  I agree, maybe `columnMajor` is a better name, and we should definitely add some documentation so that the user is clear that when `columnMajor = true`, then the imputation is done with each column as a point, and when false, with each row as a point.

That has an interesting implication---when you are only doing imputation on a single dimension, it will actually be quicker to load the matrix without transposing (so it is row-major), then call `Impute()` on the dimension of interest (which will be entirely contiguous in memory).

---
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#r69923037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160707/b63838bc/attachment.html>


More information about the mlpack-git mailing list