Skip to content

Instantly share code, notes, and snippets.

@aficionado
aficionado / metadata.json
Created January 5, 2019 05:12 — forked from jaor/metadata.json
Incremental anomaly detection
{
"name": "Incremental anomalies",
"kind": "script",
"description": "Adds a new dataset to a collection and computes a set of anomalies for the new, extended data",
"source_code": "script.whizzml",
"imports":[
],
"inputs":[
{
"name": "url",
{
"name": "Merge two datasets",
"description": "Merges two different datasets",
"source_code": "script.whizzml",
"inputs": [
{
"name": "dataset-1",
"type": "dataset-id",
"description": "First dataset"
},
{
"name": "Tree optimization",
"description": "Script for tree optimization using SMACdown",
"kind": "script",
"source_code": "script.whizzml",
"inputs":[
{
"name": "dataset-id",
"type": "dataset-id",
"description": "Dataset for which we are seeking an optimal tree"
#!/usr/bin/env python
"""A WhizzML simple example
"""
from bigml.api import BigML
API = BigML()
LIBRARY = API.create_library("(define (addition a b) (+ a b))")
@aficionado
aficionado / gradient-boosting.whizzml
Created May 6, 2016 12:59 — forked from charleslparker/gradient-boosting.whizzml
A vanilla implementation of gradient boosting in WhizzML
;; This is a vanilla implementation of gradient boosting. The main
;; function is at the bottom of the script, where it explains the
;; algorithm in some detail.
;; A constant added to the generated field names to let us know that
;; we generated them
(define boost-id "__bmlboost")
;; The names of the fields contain ground truth - if there are k
;; classes, this is k coluns, one for each class. If the true class
{
"name": "Model or ensemble",
"description": "Select the best option for modeling a source: a model or an ensemble?",
"parameters": [
{
"name": "input-source-id",
"type": "source-id",
"description": "Source for training/test the model and ensemble"
}
],
@aficionado
aficionado / one-click-dataset.json
Created May 6, 2016 12:56 — forked from whizzmler/one-click-dataset.json
One-Click Dataset from a Source
{
"name": "One-Click Dataset",
"description": "Create a new dataset from a source with a click",
"outputs": [
{"name": "dataset-id", "type": "dataset-id", "description": "The new dataset"},
{"name": "rows", "type": "number", "description": "The number of rows of the new dataset"}
],
"parameters": [
{"name": "source-id", "type": "source-id", "default": "", "description": "Source from which to create a new dataset"},
{"name": "source-name", "type": "string", "default": "", "description": "Name for the new dataset"}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Moves a resource to a project
"""
##############################################################################
# Copyright (c) 2015 BigML, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
@aficionado
aficionado / confidence_roc.py
Last active August 29, 2015 14:17
Confidence Threshold Evaluation Comparison
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Uses multiple confidence thresholds to evaluate a model.
"""
##############################################################################
# Copyright (c) 2015 BigML, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
from pymongo.son_manipulator import SONManipulator
class KeyTransform(SONManipulator):
"""Transforms keys going to database and restores them coming out.
This allows keys with dots in them to be used (but does break searching on
them unless the find command also uses the transform.
Example & test:
# To allow `.` (dots) in keys