提交 15793b13 编写于 作者: A ahb 提交者: Maksim Shabunin

add TestData::getTestSamples()

上级 80102b76
......@@ -224,6 +224,12 @@ public:
CV_WRAP virtual void setTrainTestSplitRatio(double ratio, bool shuffle=true) = 0;
CV_WRAP virtual void shuffleTrainTest() = 0;
CV_WRAP Mat getTestSamples() const {
Mat idx = getTestSampleIdx();
Mat samples = getSamples();
return idx.empty() ? Mat() : getSubVector(samples, idx);
}
CV_WRAP static Mat getSubVector(const Mat& vec, const Mat& idx);
/** @brief Reads the dataset from a .csv file and returns the ready-to-use training data.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册