Skip to content

Test set not encoded in classify_example.py #87

Description

@bit-scientist

Hi, @AndyMc629, thanks for the book.

I am not sure if it's intentional, but I wanted to raise a small, yet important point in the ingest_and_prep_data function of classify_example.py, Chapter01/classification. I believe X_test should also be transformed identically to X_train.

I understand this example is meant to be illustrative, and training works fine. But evaluating the model on X_test will fail with ValueError: could not convert string to float: 'entrepreneur', because the test set never undergoes one-hot encoding.

I think, readers must be provided a more clearer example than this.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions