<p>In <a href="https://github.com/mlpack/mlpack/pull/523#discussion_r60355067">src/mlpack/core/util/split_data.hpp</a>:</p>
<pre style='color:#555'>> + 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;
> + trainData.set_size(input.n_rows, trainSize);
> + testData.set_size(input.n_rows, testSize);
> + trainLabel.set_size(trainSize);
> + testLabel.set_size(testSize);
> +
> + using Col = arma::Col<size_t>;
> + Col const sequence = arma::linspace<Col>(0, input.n_cols - 1,
> + input.n_cols);
> + arma::Col<size_t> const order = arma::shuffle(sequence);
> +
</pre>
<p>You are correct</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/523/files/c92dd2fc6561b1cf40efb744dcc9233bc3675c91#r60355067">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFFqOwGnTsmkfbj7I2e0mrQiJ3C-Pks5p5cYYgaJpZM4HhWF3.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/523/files/c92dd2fc6561b1cf40efb744dcc9233bc3675c91#r60355067"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>