|
| fit (self, X, y, sample_weight=None, init_score=None, eval_set=None, eval_names=None, eval_sample_weight=None, eval_class_weight=None, eval_init_score=None, eval_metric=None, early_stopping_rounds=None, verbose=True, feature_name='auto', categorical_feature='auto', callbacks=None) |
|
| predict (self, X, raw_score=False, num_iteration=None, pred_leaf=False, pred_contrib=False, **kwargs) |
|
| predict_proba (self, X, raw_score=False, num_iteration=None, pred_leaf=False, pred_contrib=False, **kwargs) |
|
| classes_ (self) |
|
| n_classes_ (self) |
|
| __init__ (self, boosting_type='gbdt', num_leaves=31, max_depth=-1, learning_rate=0.1, n_estimators=100, subsample_for_bin=200000, objective=None, class_weight=None, min_split_gain=0., min_child_weight=1e-3, min_child_samples=20, subsample=1., subsample_freq=0, colsample_bytree=1., reg_alpha=0., reg_lambda=0., random_state=None, n_jobs=-1, silent=True, importance_type='split', **kwargs) |
|
| get_params (self, deep=True) |
|
| set_params (self, **params) |
|
| n_features_ (self) |
|
| best_score_ (self) |
|
| best_iteration_ (self) |
|
| objective_ (self) |
|
| booster_ (self) |
|
| evals_result_ (self) |
|
| feature_importances_ (self) |
|
lightgbm.sklearn.LGBMClassifier.predict_proba |
( |
|
self, |
|
|
|
X, |
|
|
|
raw_score = False , |
|
|
|
num_iteration = None , |
|
|
|
pred_leaf = False , |
|
|
|
pred_contrib = False , |
|
|
** |
kwargs |
|
) |
| |
Return the predicted probability for each class for each sample.
Parameters
----------
X : array-like or sparse matrix of shape = [n_samples, n_features]
Input features matrix.
raw_score : bool, optional (default=False)
Whether to predict raw scores.
num_iteration : int or None, optional (default=None)
Limit number of iterations in the prediction.
If None, if the best iteration exists, it is used; otherwise, all trees are used.
If <= 0, all trees are used (no limits).
pred_leaf : bool, optional (default=False)
Whether to predict leaf index.
pred_contrib : bool, optional (default=False)
Whether to predict feature contributions.
Note
----
If you want to get more explanation for your model's predictions using SHAP values
like SHAP interaction values,
you can install shap package (https://github.com/slundberg/shap).
**kwargs
Other parameters for the prediction.
Returns
-------
predicted_probability : array-like of shape = [n_samples, n_classes]
The predicted probability for each class for each sample.
X_leaves : array-like of shape = [n_samples, n_trees * n_classes]
If ``pred_leaf=True``, the predicted leaf every tree for each sample.
X_SHAP_values : array-like of shape = [n_samples, (n_features + 1) * n_classes]
If ``pred_contrib=True``, the each feature contributions for each sample.