[mlpack-git] [mlpack/mlpack] DatasetMapper & Imputer (#694)
Tham
notifications at github.com
Wed Jul 13 00:21:16 EDT 2016
> + * Impute function searches through the input looking for mappedValue and
> + * replaces it with the user-defined custom value of the given dimension.
> + * The result is overwritten to the input, not creating any copy. Custom value
> + * must be set when initializing the CustomImputation object.
> + *
> + * @param input Matrix that contains mappedValue.
> + * @param mappedValue Value that the user wants to get rid of.
> + * @param dimension Index of the dimension of the mappedValue.
> + * @param columnMajor State of whether the input matrix is columnMajor or not.
> + */
> + void Impute(arma::Mat<T>& input,
> + const T& mappedValue,
> + const size_t dimension,
> + const bool columnMajor = true)
> + {
> + // replace the target value to custom value
I think we should be able to implement Impute(input, output) by this function.
```
inline
void Impute(const arma::Mat<T>& input,
arma::Mat<T>& output,
const T& mappedValue,
const size_t dimension,
const bool columnMajor = true)
{
// initiate output
output = input;
Impute(output, mappedValue, dimension, columnMajor);
}
```
---
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/2eb675467528574b65fa23d78e4e8d3e6e6ea6c5..6d43aa3b3dcd93fdc1bd3e9918267b59f762f3a1#r70562653
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160712/cdea55c7/attachment.html>
More information about the mlpack-git
mailing list