Skip to content

MNT remove unused args in _predict_regression_tree_inplace_fast_dense #26314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions sklearn/ensemble/_gradient_boosting.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ cdef void _predict_regression_tree_inplace_fast_dense(
double *value,
double scale,
Py_ssize_t k,
Py_ssize_t n_samples,
Py_ssize_t n_features,
cnp.float64_t[:, :] out
) noexcept nogil:
"""Predicts output for regression tree and stores it in ``out[i, k]``.
Expand All @@ -60,16 +58,12 @@ cdef void _predict_regression_tree_inplace_fast_dense(
k : int
The index of the tree output to be predicted. Must satisfy
0 <= ``k`` < ``K``.
n_samples : int
The number of samples in the input array ``X``;
``n_samples == X.shape[0]``.
n_features : int
The number of features; ``n_samples == X.shape[1]``.
out : memory view on array of type np.float64_t
The data array where the predictions are stored.
``out`` is assumed to be a two-dimensional array of
shape ``(n_samples, K)``.
"""
cdef SIZE_t n_samples = X.shape[0]
cdef Py_ssize_t i
cdef Node *node
for i in range(n_samples):
Expand Down Expand Up @@ -212,8 +206,6 @@ def predict_stages(
value=tree.value,
scale=scale,
k=k,
n_samples=X.shape[0],
n_features=X.shape[1],
out=out
)
# out[:, k] += scale * tree.predict(X).ravel()
Expand Down