Skip to content

Instantly share code, notes, and snippets.

@whizzmler
whizzmler / create-batchcentroid.json
Last active June 7, 2016 17:42 — forked from jaor/create_batchcentroid.whizzml
One click batchcentroid dataset
{
"name": "Batch-centroid",
"description": "Create a dataset with a new column showing the cluster each instance belongs to",
"inputs": [
{
"name": "source-id",
"type": "source-id",
"description": "Identifier of the input source"
}
@whizzmler
whizzmler / best-first.whizzml
Created April 21, 2016 01:54 — forked from charleslparker/best-first.whizzml
Best-first feature selection via WhizzML
;; A simple function to get the max value in a list
(define (get-max xs) (reduce (lambda (x y) (if (> x y) x y)) (head xs) xs))
;; Get feature names given ids
(define (feature-names dataset-id ids)
(let (fields (get (fetch dataset-id) "fields"))
(map (lambda (id) (get-in fields [id "name"])) ids)))
;; Create a dataset sample
(define (sample-dataset ds-id rate oob)
@whizzmler
whizzmler / gradient-boosting.json
Last active May 10, 2016 21:13 — forked from charleslparker/gradient-boosting.whizzml
A vanilla implementation of gradient boosting in WhizzML
{
"name": "Gradient Boosting",
"description": "Perform gradient boosting for classification",
"inputs": [{
"name": "dataset-id",
"type": "dataset-id",
"description": "Select the training dataset"
}],
"outputs": [{
"name": "model-array",
@whizzmler
whizzmler / normalize-dataset.json
Last active May 15, 2016 03:50 — forked from osroca/README.md
Remove anomalies from dataset
{
"name": "Normalize Dataset",
"description": "Remove the top n anomalies from a dataset",
"inputs": [
{"name": "dataset-id", "type": "dataset-id", "description": "Dataset Id"},
{"name": "top-n", "type": "number", "description": "Top N Anomalies to Remove"}
],
"outputs": [
{"name": "normalized-dataset", "type": "dataset-id", "description": "Normalized Dataset"}
],