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

Tham notifications at github.com
Sun Jul 17 00:17:09 EDT 2016


> +  BOOST_REQUIRE(std::isnan(output(2, 1)) == true); // remains as NaN
> +  BOOST_REQUIRE_CLOSE(output(2, 2), 10.0, 1e-5);
> +
> +  // Remove the file.
> +  remove("test_file.csv");
> +}
> +
> +/**
> + * Make sure a CSV is loaded correctly.
> + */
> +BOOST_AUTO_TEST_CASE(CustomImputationTest)
> +{
> +  arma::mat input("3.0 0.0 2.0 0.0;"
> +                  "5.0 6.0 0.0 6.0;"
> +                  "9.0 8.0 4.0 8.0;");
> +  arma::mat outputT; // assume input is transposed

This comment is a little bit confuse since the name of the parameter already change to columnMajor, we can use a bool value to tell the readers the output is columnMajor or rowMajor.

ex : 

```
bool columnMajor = true;
CustomImputation<double> imputer(customValue);
imputer.Impute(input, outputT, mappedValue, 0/*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/e5d591e511ae449eae1523a80346357b93b968d1#r71076241
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160716/772865d1/attachment.html>


More information about the mlpack-git mailing list