Skip to content

DataConversionWarning: A column-vector y was passed when a 1d array was expected #2

Description

@sara-mft

The following warning while training a neural network model on the BankChurners dataset. One way to resolve this is by adding train_y.values.ravel() in the fit method.

python3.9/site-packages/sklearn/preprocessing/_label.py:114: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel(). y = column_or_1d(y, warn=True)

Activity

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

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