Created
March 22, 2019 19:16
-
-
Save petersen-poul/108549f98efc7277ef5eb8a31f2c8c2e to your computer and use it in GitHub Desktop.
one-click-cluster-labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "One Click Cluster Labels", | |
"description": "Given a cluster as input, assigns the cluster label to every instance in the dataset used to train the cluster.", | |
"inputs": [ | |
{ | |
"name": "cluster", | |
"description": "Cluster to use for labeling", | |
"type": "cluster-id" | |
} | |
], | |
"outputs": [ | |
{ | |
"name": "labeled-dataset", | |
"description": "A link to the labeled dataset", | |
"type": "dataset-id" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define cluster-label-dataset | |
(let ( | |
dataset (get (fetch cluster) "dataset") | |
batchcentroid ( | |
create-and-wait-batchcentroid { | |
"cluster" cluster | |
"dataset" dataset | |
"all_fields" true | |
"output_dataset" true})) | |
((fetch batchcentroid) ["output_dataset_resource"] false))) | |
(define labeled-dataset cluster-label-dataset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment