8000 Input validation refactoring · Issue #3440 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Input validation refactoring #3440
Closed
Closed
@amueller

Description

@amueller

I propose to refactor the input validation. The current zoo of methods is kinda confusing.

Related to #3142.

Checks that we want are:

  • numpy array vs sparse vs list vs anything indexable
  • sparse matrix type
  • inf / nan
  • dtype
  • ndims
  • number of samples is consistent in multiple arrays.
  • contiguous

I'll now check if there is anything else that we currently check and see what functions we have.

Remaining Issues

  • possibly remove "make_float_array" and "1d_or_column" and also make these options of check_array.
  • Currently "ensure2d" makes vectors into rows, which I find pretty counter-intuitive. This is for backward compatibility. 1d input is not currently handled consistently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0