Skip to content

Instantly share code, notes, and snippets.

@aficionado
aficionado / README.rst
Created August 27, 2012 20:11 — forked from njwilson/README.rst
Machine Learning Throwdown

Services and Algorithms

This section describes each of the services compared in the throwdown and the algorithms/models used.

BigML

Decision trees.

@aficionado
aficionado / JSON PML schemas.md
Last active September 4, 2018 23:49
JSON PML schemas

JSON PML: schemas for models

  • model-schema.json A generic ML model, containing fields shared by most models despite of their concrete type. It uses:
    • sample-schema.json The schema for dataset sampling specifications
    • field-collection-schema.json Auxiliary schema describing a collection of field (or "properties") descriptors
    • generic-field-schema.json Properties shared by all fields, regardless of their type.
    • field-schema.json The union schema of all field descriptor types, with their specific properties.
  • tree-model-schema.json A specialization of the model schema to decision tree models. It uses:
  • node-schema The schema for the nodes in a decision tree
@aficionado
aficionado / local_predictions.py
Created March 13, 2013 01:06
A simple example to create local predictions using a pre-built model
# import BigML class
from bigml.api import BigML
# import local Model class
from bigml.model import Model
# Instantiate the API with your credentials. You can avoid this if you set up your username and API key in your environment
api = BigML('yourusername', '3ff25044b4f4582903d90000a5fab240442e734c')
# Get the model. Assuming that you already created in BigML
@aficionado
aficionado / support_vs_confidence.py
Last active December 15, 2015 13:39
Plot Support vs Confidence for BigML promotional sources
from bigml.api import BigML
from bigml.model import Model
api = BigML()
def support_vs_confidence(model_id):
model = api.get_model(model_id)
local_model = Model(model)
leaves = local_model.get_leaves()
outputs = unique([leaf['output'] for leaf in leaves])
colors = linspace(0, 1, len(outputs))
@aficionado
aficionado / index.html
Last active December 15, 2015 15:39
Pima Indians Diabetes - Scattergraph (support vs confidence)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;
@aficionado
aficionado / index.html
Last active December 15, 2015 15:39
Iris - Scattergraph (support vs confidence) -
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;
@aficionado
aficionado / index.html
Last active December 15, 2015 15:39
Adult - Scattergraph (support vs confidence)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;
@aficionado
aficionado / index.html
Last active December 15, 2015 15:39
Cover - Scattergraph (support vs confidence)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;
@aficionado
aficionado / index.html
Created April 2, 2013 22:32
private public model
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;
@aficionado
aficionado / index.html
Last active December 24, 2015 06:09
Visualizing Model Performance
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
background: #fff;