Skip to content

LimitTransform #1316

@Mr-Geekman

Description

@Mr-Geekman

🚀 Feature Request

Create a transform that limits values of some feature between the borders.

Proposal

Create LimitTransform.

Parameters:

  • in_column: column to make transformation on;

  • lower_bound: lower bound for the value of the column; -infty by default;

  • upper_bound: upper bound for the value of the column; +infty by default;

  • If there is value out of limit the exception should be raised.

  • NaNs should be ignored.

Reference: Ensure time series forecasts stay within limits.

To discuss:

  • Should this transform work for non-target column?
    • It should
  • Should this transform have inplace parameter for working in non-inplace mode?
    • Not, it shoudn't
  • Is there a better name for this transform?
    • Suggested name is ok

Test cases

What should be checked:

  • Working on non-target column
  • Working on target column
    • It should make inverse transformation for quantiles
  • Working with set/unset lower/upper values
  • Exception on out-of-limit value
  • Full pipeline that predicts some arbitrary values can be used
  • Full backtest with pipeline that uses this transform

Don't forget to add inference tests into tests/test_transforms/test_inference/.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions