Skip to content

Instantly share code, notes, and snippets.

@mmmayo13
Created October 14, 2016 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mmmayo13/efae81f7669d01f28ccb8a95d055910a to your computer and use it in GitHub Desktop.
Save mmmayo13/efae81f7669d01f28ccb8a95d055910a to your computer and use it in GitHub Desktop.
rez = mldb.post("/v1/procedures", {
"type": "classifier.experiment",
"params": {
"experimentName": "car_brand_cls",
"inputData": """
SELECT
{* EXCLUDING(brand)} as features,
brand as label
FROM training_dataset
""",
"mode": "categorical",
"modelFileUrlPattern": "file:///mldb_data/car_brand_cls.cls",
"configuration": {
"type": "bagging",
"weak_learner": {
"type": "boosting",
"weak_learner": {
"type": "decision_tree",
"max_depth": 5,
"update_alg": "gentle",
"random_feature_propn": 0.6
},
"min_iter": 5,
"max_iter": 30
},
"num_bags": 15
}
}
})
runResults = rez.json()["status"]["firstRun"]["status"]["folds"][0]["resultsTest"]
print rez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment