Skip to content

Set number of trees for random forests #161

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

It's not possible to set the number of trees of random forests (classifier & regressor).

Desired solution

  • Add a new parameter number_of_trees: int to the initializer of safeds.ml.classification.RandomForest and safeds.ml.regression.RandomForest
  • Raise a value error if number_of_trees < 1
  • Pass it along to n_estimators of the wrapped scikit-learn model in the fit method

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions