Complete cudf support. (#4850)

* Handles missing value.
* Accept all floating point and integer types.
* Move to cudf 9.0 API.
* Remove requirement on `null_count`.
* Arbitrary column types support.
This commit is contained in:
Jiaming Yuan
2019-09-16 23:52:00 -04:00
committed by GitHub
parent 125bcec62e
commit 5374f52531
17 changed files with 702 additions and 339 deletions

View File

@@ -190,11 +190,11 @@ int XGDMatrixCreateFromDataIter(
}
XGB_DLL int XGDMatrixCreateFromArrayInterfaces(
char const* c_json_strs, DMatrixHandle* out) {
char const* c_json_strs, bst_int has_missing, bst_float missing, DMatrixHandle* out) {
API_BEGIN();
std::string json_str {c_json_strs};
std::unique_ptr<data::SimpleCSRSource> source (new data::SimpleCSRSource());
source->CopyFrom(json_str);
source->CopyFrom(json_str, has_missing, missing);
*out = new std::shared_ptr<DMatrix>(DMatrix::Create(std::move(source)));
API_END();
}