4
我想在C++項目中使用xgboost進行圖像分類。我有矩陣的特徵(hist)cv :: Mat_和標籤向量,std :: vector,我如何在C++中創建xgboost :: DMatrix?我想我應該使用DMatrix :: Create(),但我不明白我應該傳遞哪些參數。在C++中創建xgboost Dmatrix
std::vector<int> labels; //read this labels from csv
auto features = extract_features(img_ident, dir);
cv::Mat_<float> training_set(features);
xgboost::DMatrix xgb_data = xgboost::DMatrix::Create(????);