You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# lazy evaluation to allow import without dynamic library, e.g., for docs generation
591
579
aliases=None
@@ -1112,7 +1100,7 @@ def predict(
1112
1100
1113
1101
Parameters
1114
1102
----------
1115
-
data : str, pathlib.Path, numpy array, pandas DataFrame, pyarrow Table, H2O DataTable's Frame (deprecated) or scipy.sparse
1103
+
data : str, pathlib.Path, numpy array, pandas DataFrame, pyarrow Table or scipy.sparse
1116
1104
Data source for prediction.
1117
1105
If str or pathlib.Path, it represents the path to a text file (CSV, TSV, or LibSVM).
1118
1106
start_iteration : int, optional (default=0)
@@ -1225,14 +1213,6 @@ def predict(
1225
1213
num_iteration=num_iteration,
1226
1214
predict_type=predict_type,
1227
1215
)
1228
-
elifisinstance(data, dt_DataTable):
1229
-
_emit_datatable_deprecation_warning()
1230
-
preds, nrow=self.__pred_for_np2d(
1231
-
mat=data.to_numpy(),
1232
-
start_iteration=start_iteration,
1233
-
num_iteration=num_iteration,
1234
-
predict_type=predict_type,
1235
-
)
1236
1216
else:
1237
1217
try:
1238
1218
_log_warning("Converting data to scipy sparse matrix.")
@@ -1790,7 +1770,7 @@ def __init__(
1790
1770
1791
1771
Parameters
1792
1772
----------
1793
-
data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, Sequence, list of Sequence, list of numpy array or pyarrow Table
1773
+
data : str, pathlib.Path, numpy array, pandas DataFrame, scipy.sparse, Sequence, list of Sequence, list of numpy array or pyarrow Table
1794
1774
Data source of Dataset.
1795
1775
If str or pathlib.Path, it represents the path to a text file (CSV, TSV, or LibSVM) or a LightGBM Dataset binary file.
1796
1776
label : list, numpy 1-D array, pandas Series / one-column DataFrame, pyarrow Array, pyarrow ChunkedArray or None, optional (default=None)
@@ -2196,9 +2176,6 @@ def _lazy_init(
2196
2176
raiseTypeError("Data list can only be of ndarray or Sequence")
data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, Sequence, list of Sequence or list of numpy array
2599
+
data : str, pathlib.Path, numpy array, pandas DataFrame, scipy.sparse, Sequence, list of Sequence or list of numpy array
2623
2600
Data source of Dataset.
2624
2601
If str or pathlib.Path, it represents the path to a text file (CSV, TSV, or LibSVM) or a LightGBM Dataset binary file.
2625
2602
label : list, numpy 1-D array, pandas Series / one-column DataFrame, pyarrow Array, pyarrow ChunkedArray or None, optional (default=None)
data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, Sequence, list of Sequence or list of numpy array or None
3256
+
data : str, pathlib.Path, numpy array, pandas DataFrame, scipy.sparse, Sequence, list of Sequence or list of numpy array or None
data : str, pathlib.Path, numpy array, pandas DataFrame, pyarrow Table, H2O DataTable's Frame (deprecated) or scipy.sparse
4673
+
data : str, pathlib.Path, numpy array, pandas DataFrame, pyarrow Table or scipy.sparse
4721
4674
Data source for prediction.
4722
4675
If str or pathlib.Path, it represents the path to a text file (CSV, TSV, or LibSVM).
4723
4676
start_iteration : int, optional (default=0)
@@ -4798,7 +4751,7 @@ def refit(
4798
4751
4799
4752
Parameters
4800
4753
----------
4801
-
data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, Sequence, list of Sequence or list of numpy array
4754
+
data : str, pathlib.Path, numpy array, pandas DataFrame, scipy.sparse, Sequence, list of Sequence or list of numpy array
4802
4755
Data source for refit.
4803
4756
If str or pathlib.Path, it represents the path to a text file (CSV, TSV, or LibSVM).
4804
4757
label : list, numpy 1-D array, pandas Series / one-column DataFrame, pyarrow Array or pyarrow ChunkedArray
X_shape="numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1078
+
X_shape="numpy array, pandas DataFrame, scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1081
1079
y_shape="numpy array, pandas DataFrame, pandas Series, list of int or float of shape = [n_samples]",
1082
1080
sample_weight_shape="numpy array, pandas Series, list of int or float of shape = [n_samples] or None, optional (default=None)",
1083
1081
init_score_shape="numpy array, pandas DataFrame, pandas Series, list of int or float of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task) or shape = [n_samples, n_classes] (for multi-class task) or None, optional (default=None)",
@@ -1104,7 +1102,7 @@ def predict(
1104
1102
"""Docstring is set after definition, using a template."""
1105
1103
ifnotself.__sklearn_is_fitted__():
1106
1104
raiseLGBMNotFittedError("Estimator not fitted, call fit before exploiting the model.")
1107
-
ifnotisinstance(X, (pd_DataFrame, dt_DataTable)):
1105
+
ifnotisinstance(X, pd_DataFrame):
1108
1106
X=_LGBMValidateData(
1109
1107
self,
1110
1108
X,
@@ -1154,7 +1152,7 @@ def predict(
1154
1152
1155
1153
predict.__doc__=_lgbmmodel_doc_predict.format(
1156
1154
description="Return the predicted value for each sample.",
1157
-
X_shape="numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1155
+
X_shape="numpy array, pandas DataFrame, scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1158
1156
output_name="predicted_result",
1159
1157
predicted_result_shape="array-like of shape = [n_samples] or shape = [n_samples, n_classes]",
1160
1158
X_leaves_shape="array-like of shape = [n_samples, n_trees] or shape = [n_samples, n_trees * n_classes]",
description="Return the predicted probability for each class for each sample.",
1651
-
X_shape="numpy array, pandas DataFrame, H2O DataTable's Frame (deprecated), scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1649
+
X_shape="numpy array, pandas DataFrame, scipy.sparse, list of lists of int or float of shape = [n_samples, n_features]",
1652
1650
output_name="predicted_probability",
1653
1651
predicted_result_shape="array-like of shape = [n_samples] or shape = [n_samples, n_classes]",
1654
1652
X_leaves_shape="array-like of shape = [n_samples, n_trees] or shape = [n_samples, n_trees * n_classes]",
0 commit comments