Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
c5cfe3e3
"vscode:/vscode.git/clone" did not exist on "7577a363a6c93b698fcc8b03d12ee2a06e5f10de"
Unverified
Commit
c5cfe3e3
authored
Feb 21, 2019
by
Nikita Titov
Committed by
GitHub
Feb 21, 2019
Browse files
[python] update DataTable handling (#2020)
parent
414bb609
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
docs/Python-Intro.rst
docs/Python-Intro.rst
+1
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+6
-6
python-package/lightgbm/compat.py
python-package/lightgbm/compat.py
+5
-1
No files found.
docs/Python-Intro.rst
View file @
c5cfe3e3
...
...
@@ -36,7 +36,7 @@ The LightGBM Python module can load data from:
- libsvm/tsv/csv/txt format file
- NumPy 2D array(s), pandas DataFrame, H2O DataTable, SciPy sparse matrix
- NumPy 2D array(s), pandas DataFrame, H2O DataTable
's Frame
, SciPy sparse matrix
- LightGBM binary file
...
...
python-package/lightgbm/basic.py
View file @
c5cfe3e3
...
...
@@ -409,7 +409,7 @@ class _InnerPredictor(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
or scipy.sparse
Data source for prediction.
When data type is string, it represents the path of txt file.
num_iteration : int, optional (default=-1)
...
...
@@ -652,7 +652,7 @@ class Dataset(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse or list of numpy arrays
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
, scipy.sparse or list of numpy arrays
Data source of Dataset.
If string, it represents the path to txt file.
label : list, numpy 1-D array, pandas Series / one-column DataFrame or None, optional (default=None)
...
...
@@ -1009,7 +1009,7 @@ class Dataset(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse or list of numpy arrays
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
, scipy.sparse or list of numpy arrays
Data source of Dataset.
If string, it represents the path to txt file.
label : list, numpy 1-D array, pandas Series / one-column DataFrame or None, optional (default=None)
...
...
@@ -1399,7 +1399,7 @@ class Dataset(object):
Returns
-------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse, list of numpy arrays or None
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
, scipy.sparse, list of numpy arrays or None
Raw data used in the Dataset construction.
"""
if
self
.
handle
is
None
:
...
...
@@ -2162,7 +2162,7 @@ class Booster(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
or scipy.sparse
Data source for prediction.
If string, it represents the path to txt file.
num_iteration : int or None, optional (default=None)
...
...
@@ -2207,7 +2207,7 @@ class Booster(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable
's Frame
or scipy.sparse
Data source for refit.
If string, it represents the path to txt file.
label : list, numpy 1-D array or pandas Series / one-column DataFrame
...
...
python-package/lightgbm/compat.py
View file @
c5cfe3e3
...
...
@@ -92,7 +92,11 @@ except ImportError:
"""datatable"""
try
:
from
datatable
import
DataTable
import
datatable
if
hasattr
(
datatable
,
"Frame"
):
DataTable
=
datatable
.
Frame
else
:
DataTable
=
datatable
.
DataTable
DATATABLE_INSTALLED
=
True
except
ImportError
:
DATATABLE_INSTALLED
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment