Skip to content

Instantly share code, notes, and snippets.

@kvnkho
Created January 19, 2022 03:35
Show Gist options
  • Save kvnkho/461a51e0d5d7da8c598346cef3307885 to your computer and use it in GitHub Desktop.
Save kvnkho/461a51e0d5d7da8c598346cef3307885 to your computer and use it in GitHub Desktop.
from tune import Space, Grid, RandInt, Rand
space1 = Space(model=LogisticRegression, solver="lbfgs", C=Grid(10,20), penalty=Grid("l2","none"))
space2 = Space(model=RandomForestClassifier, max_samples=Rand(0.8,1), max_depth=RandInt(3,4)).sample(4)
space = [x.simple_value for x in list(space1+space2)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment