Support more input types for categorical data. (#7220)
* Support more input types for categorical data. * Shorten the type name from "categorical" to "c". * Tests for np/cp array and scipy csr/csc/coo. * Specify the type for feature info.
This commit is contained in:
@@ -128,7 +128,7 @@ class TestPandas:
|
||||
X = pd.DataFrame({'f0': X})
|
||||
y = rng.randn(rows)
|
||||
m = xgb.DMatrix(X, y, enable_categorical=True)
|
||||
assert m.feature_types[0] == 'categorical'
|
||||
assert m.feature_types[0] == 'c'
|
||||
|
||||
def test_pandas_sparse(self):
|
||||
import pandas as pd
|
||||
|
||||
Reference in New Issue
Block a user