Skip to content

Instantly share code, notes, and snippets.

@jaor
Last active November 8, 2016 17:58
Show Gist options
  • Save jaor/b9905e2b5708e244578746f45eb95098 to your computer and use it in GitHub Desktop.
Save jaor/b9905e2b5708e244578746f45eb95098 to your computer and use it in GitHub Desktop.
model and evaluate all sources in a project
(define (create-evaluations project-id)
(let (src-ids (resource-ids (list-sources {"project" project-id})))
(for (src-id src-ids)
(let (ds-id (create-dataset src-id)
[train-id test-id] (create-random-dataset-split ds-id 0.8)
ens-id (create-ensemble train-id {"number_of_models" 100}))
(create-evaluation test-id ens-id)))))
(define result (wait* (create-evaluations "project/xxxxxxxxxx")))
(define result
(let (src-ids (resource-ids (list-sources {"project" "pepe"})))
(for (src-id src-ids)
(let (ds-id (create-dataset src-id)
[train-id test-id] (create-random-dataset-split ds-id 0.8)
ens-id (create-ensemble train-id {"number_of_models" 100})
eval-id (create-and-wait-evaluation test-id ens-id))
{"ensemble" ens-id "evaluation" eval-id}))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment