Skip to content

NULL value handling #8

Description

@sipemu

There may be NULL values in y or X. Handle this like in Polars (https://github.com/azmyrajab/polars_ols/blob/c647fd297b75e099bac921fd4f27cd88e5febc5d/polars_ols/__init__.py#L48)

  • null_policy: Strategy for handling missing data, it can be:
    • "ignore": does no null handling - use this option if nulls are already handled upstream.
    • "zero": simply zero fills nulls in both targets & features prior to fitting.
    • "drop": drops any rows (across targets or features) which have nulls prior to computing
      coefficients. For non-moving-window models, it then masks associated predictions
      with nulls. For moving-window models, coefficients are forward-filled.
    • "drop_y_zero_x": Similar to "drop", but only rows with null targets are masked.
      If features contain remaining nulls, it fills them with zeros.
      This option allows extrapolation.
    • "drop_zero": Masks rows with null targets or features similar in fitting coefficients.
      similar to "drop". However, for predictions, it uses zero-filled features
      dotted with those coefficients instead of masking with null.
      This option allows extrapolation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions