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

Tham notifications at github.com
Fri Jul 22 14:24:39 EDT 2016


>I wanted to reuse the codes of the overloads, but

I think we could ask the users to copy the input before they passed the output into the api, like I mentioned before

```
CustomImputation<double> customStrategy(99); // convert missing vals to 99.
  Imputer<double,
          DatasetMapper<MissingPolicy>,
          CustomImputation<double>> imputer(info, customStrategy);
  output = input;
  imputer.Impute(input, output, "a", 0); // convert a -> 99 for dimension 0
```

But this solution makes the api with output looks quite dumb, why not just use

```
output = input;
imputer.Impute(output , "a", 0); // convert a -> 99 for dimension 0
```

If we want to make the api with output become efficient, we need to ask the user to copy the input into the output, but this make the api become less intuitive.

In this case, why not just remove the api with the output?This make the api of imputer families become less confuse, user would always choose the efficient api, if they need a copy ,the will know they need to create one before they pass into the api.

---
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#issuecomment-234619169
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160722/3a6ec67b/attachment-0001.html>


More information about the mlpack-git mailing list