[mlpack-git] [mlpack/mlpack] add train test split (#523)
stereomatchingkiss
notifications at github.com
Wed Apr 20 02:21:45 EDT 2016
> + *TrainTestSplit(input, label, trainData,
> + * testData, trainLabel, testLabel);
> + *@endcode
> + */
> +template<typename T, typename U>
> +void TrainTestSplit(arma::Mat<T> const &input,
> + arma::Row<U> const &inputLabel,
> + arma::Mat<T> &trainData,
> + arma::Mat<T> &testData,
> + arma::Row<U> &trainLabel,
> + arma::Row<U> &testLabel,
> + double const testRatio)
> +{
> + size_t const testSize =
> + static_cast<size_t>(input.n_cols * testRatio);
> + size_t const trainSize = input.n_cols - testSize;
Ok, than I would make it as prefix.
---
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/523/files/c92dd2fc6561b1cf40efb744dcc9233bc3675c91#r60355036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160419/74212ede/attachment.html>
More information about the mlpack-git
mailing list