Skip to content

Instantly share code, notes, and snippets.

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 Rodio346/38ac60a92b5472da71a8f5a27484813c to your computer and use it in GitHub Desktop.
Save Rodio346/38ac60a92b5472da71a8f5a27484813c to your computer and use it in GitHub Desktop.
import vtreat
transform = vtreat.BinomialOutcomeTreatment(
outcome_name='yc', # We want vtreat change variable base on this column
outcome_target=True, # Tell vtreat that this is actually the target
cols_to_copy=[], # columns that we dont want vtreat to touch
)
d_prepared = transform.fit_transform(df, df.target)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment