Skip to content

Instantly share code, notes, and snippets.

@pabloalcain
Last active October 1, 2022 20:49
Show Gist options
  • Save pabloalcain/c7b76f7679bf47c077319b6f1b54a5a0 to your computer and use it in GitHub Desktop.
Save pabloalcain/c7b76f7679bf47c077319b6f1b54a5a0 to your computer and use it in GitHub Desktop.
...
def fit_model(features, target):
classifier = Pipeline(steps=[("select", SelectKBest(k=2)),
("clf", LogisticRegression())])
classifier.fit(features, target)
return classifier
def load_model(filename):
...
def save_model(classifier, filename):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment