Skip to content

Instantly share code, notes, and snippets.

@thigm85
Created July 15, 2022 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thigm85/46abeb8a6cceb3d717d8b695e01192aa to your computer and use it in GitHub Desktop.
Save thigm85/46abeb8a6cceb3d717d8b695e01192aa to your computer and use it in GitHub Desktop.
numeric_features = pd.get_dummies(features)
targets = (
(numeric_features["query(value)"] +
numeric_features["attribute(numeric)"] -
0.5 * numeric_features["attribute(categorical)_a"] +
0.5 * numeric_features["attribute(categorical)_c"]) > 1.0
) * 1.0
targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment