Skip to content

Poisson criterion in RandomForestRegressor #19304

Closed
@lorentzenchr

Description

@lorentzenchr

Describe the workflow you want to enable

I want to officially use the Poisson splitting criterion in RandomForestRegressor.

Describe your proposed solution

#17386 implemented the poisson splitting criterion for DecisionTreeRegressor and ExtraTreeRegressor. This also enabled—somewhat silently—to do:

import numpy as np
from sklearn.ensemble import RandomForestRegressor
y = [0, 1, 2]
X = np.arange(6).reshape(3, 2)
rf = RandomForestRegressor(criterion="poisson")
rf.fit(X, y)

Note: The same is true for ensemble.ExtraTreesRegressor.

Tasks:

  • Add the poisson splitting criterion to the docstring of RandomForestRegressor.
  • Add input validation (non-negative y) to RandomForestRegressor.
  • Expand the tests for RandomForestRegressor.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions