[mlpack-git] [mlpack/mlpack] add cli executable for data_split (#650)
Marcus Edel
notifications at github.com
Thu May 26 09:56:22 EDT 2016
> + const string outputTestLabel = CLI::GetParam<string>("output_test_label");
> +
> + // Ratio
> + const double testRatio = CLI::GetParam<double>("test_ratio");
> +
> + // container for input data and labels
> + arma::mat data;
> + arma::Mat<size_t> labels;
> +
> + // Load Data and Labels
> + data::Load(inputFile, data, true);
> + data::Load(inputLabel, labels, true);
> + arma::Row<size_t> labels_row = labels.row(0); // extract first row
> +
> + // Split Data
> + const auto value = data::TrainTestSplit(data, labels_row, testRatio);
Does make_tuple call the copy constructor? If that's the case we should avoid this interface in favor of the pass by reference interface.
---
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/650/files/a35c39061245b0ccb757f65dfe6626b8a3c04d9c#r64749271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160526/d70ce975/attachment-0001.html>
More information about the mlpack-git
mailing list