Skip to content

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

@sara-mft

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)

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