[mlpack-git] [mlpack/mlpack] Binarize Function + Test (#666)

Marcus Edel notifications at github.com
Fri Jun 3 09:42:51 EDT 2016


> + * the changes to all dimensions.
> + *
> + * @code
> + * arma::mat input = loadData();
> + * double threshold = 0;
> + *
> + * // Binarize the whole Matrix. All positive values in will be set to 1 and
> + * // the values less than or equal to 0 will become 0.
> + * Binarize(input, threshold);
> + * @endcode
> + *
> + * @param input Input matrix to Binarize.
> + * @param threshold Threshold can by any number.
> + */
> +template<typename T>
> +void Binarize(arma::Mat<T>& input,

Do you think it's reasonable to provide an interface that enables the user to set output matrix? e.g.

```void Binarize(arma::Mat<T>& input, arma::Mat<T>& output, const double threshold)```

---
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/666/files/095842f1517c0200eaffa51ccdf05cbf28cff2dc#r65708578
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160603/f13d4b48/attachment-0001.html>


More information about the mlpack-git mailing list