Skip to content

Set alpha parameter for regularization of LassoRegression #163

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

It's not possible to set the alpha parameter for regularization of lasso regression.

Desired solution

  • Add a new parameter alpha: float to the initializer of safeds.ml.regression.LassoRegression
  • Raise a value error if alpha < 0
  • Warn if alpha == 0 -> Users should use LinearRegression instead
  • Pass it along to alpha of the wrapped scikit-learn model in the fit method

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

  • Use warnings.warn to warn.
  • Use with pytest.warns to test that the warning is created.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions