Skip to content

Commit

Permalink
Implement Python data handler. (#5689)
Browse files Browse the repository at this point in the history
* Define data handlers for DMatrix.
* Throw ValueError in scikit learn interface.
  • Loading branch information
trivialfis authored May 22, 2020
1 parent 646def5 commit 5af8161
Show file tree
Hide file tree
Showing 7 changed files with 746 additions and 405 deletions.
2 changes: 1 addition & 1 deletion demo/guide-python/sklearn_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
rng = np.random.RandomState(31337)

print("Zeros and Ones from the Digits dataset: binary classification")
digits = load_digits(2)
digits = load_digits(n_class=2)
y = digits['target']
X = digits['data']
kf = KFold(n_splits=2, shuffle=True, random_state=rng)
Expand Down
1 change: 0 additions & 1 deletion python-package/xgboost/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def lazy_isinstance(instance, module, name):
try:
from cudf import DataFrame as CUDF_DataFrame
from cudf import Series as CUDF_Series
from cudf import MultiIndex as CUDF_MultiIndex
from cudf import concat as CUDF_concat
CUDF_INSTALLED = True
except ImportError:
Expand Down
Loading

0 comments on commit 5af8161

Please sign in to comment.