Skip to content

Artificial-Intelligence-with-Python/Chapter 03/code/traffic_prediction.py #9

@satiayuga

Description

@satiayuga

Good Day!
Hi, i have a problem in line #52 of traffic_prediction.py. Please, you can help me to resolve this error?

test_datapoint_encoded[i] = int(label_encoder[count].transform(test_datapoint[i]))
File "C:\Python35\lib\site-packages\sklearn\preprocessing\label.py", line 128, in transform
y = column_or_1d(y, warn=True)
File "C:\Python35\lib\site-packages\sklearn\utils\validation.py", line 614, in column_or_1d
raise ValueError("bad input shape {0}".format(shape))
ValueError: bad input shape ()

Best Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions