Skip to content

Instantly share code, notes, and snippets.

@pabloalcain
Created October 1, 2022 20:47
Show Gist options
  • Save pabloalcain/5564cbb10c54088a9703d8c5a6baaea9 to your computer and use it in GitHub Desktop.
Save pabloalcain/5564cbb10c54088a9703d8c5a6baaea9 to your computer and use it in GitHub Desktop.
#file: train.py
...
classifier = Pipeline(steps=[("select", SelectKBest(k=2)),
("clf", LogisticRegression())])
classifier.fit(features, target)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment