Skip to content

import statement update train_test_split #12

@WilliamLage

Description

@WilliamLage

noted that in the chapter one oner_application code you're using an outdated import statement for sklearn's train_test_split function. please update as follows to comply with sklearn version 0.24.1

existing code
from sklearn.cross_validation import train_test_split

please update to
from sklearn.model_selection import train_test_split

the code runs fine after that amendment, but as this is likely in other notebooks in this publication it will require changes in subsequent files barring users who practice version control.

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