Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Maintaining BigML bindings

mmerce

💭
Maintaining BigML bindings
View GitHub Profile
@mmerce
mmerce / movies.csv
Last active Mar 15, 2021
Example of raw movies rating data
View movies.csv
user_id gender age_range occupation zipcode movie_id title genres rating
1 Female Under 18 K-12 student 48067 1193 One Flew Over the Cuckoo's Nest (1975) Drama 5
1 Female Under 18 K-12 student 48067 661 James and the Giant Peach (1996) Animation$Children's$Musical 3
1 Female Under 18 K-12 student 48067 914 My Fair Lady (1964) Musical$Romance 3
1 Female Under 18 K-12 student 48067 3408 Erin Brockovich (2000) Drama 4
1 Female Under 18 K-12 student 48067 2355 Bug's Life, A (1998) Animation$Children's$Comedy 5
1 Female Under 18 K-12 student 48067 1197 Princess Bride, The (1987) Action$Adventure$Comedy$Romance 3
1 Female Under 18 K-12 student 48067 1287 Ben-Hur (1959) Action$Adventure$Drama 5
1 Female Under 18 K-12 student 48067 2804 Christmas Story, A (1983) Comedy$Drama 5
1 Female Under 18 K-12 student 48067 594 Snow White and the Seven Dwarfs (1937) Animation$Children's$Musical 4
@mmerce
mmerce / sum.json
Last active May 19, 2020
Basic example of WhizzML code for tests
View sum.json
{"inputs": [{"type": "number",
"name": "a",
"default": 1},
{"type": "number",
"name": "b",
"default": 1}],
"outputs": [{"type": "number",
"name": "sum"}]}
@mmerce
mmerce / sum.json
Created May 19, 2020
Basic example of WhizzML code for tests
View sum.json
{"inputs": [{"type": "numeric",
"name": "a"},
{"type": "numeric",
"name": "b"}],
"outputs": [{"type": "numeric",
"name": "sum"}]}
@mmerce
mmerce / execute_scripts_3.whizzml
Created Apr 24, 2019
WhizzML executes WhizzML
View execute_scripts_3.whizzml
;; Creating and executing dependent scripts in a pipeline
;; script2 uses the output of an execution of script1 directly as input
;; and multiplies it by another input.
;; As one script uses the execution of the previous script, they will be executed
;; in a sequence
;; creating a first script that adds two numbers
(define script1 (create-script {"source_code" "(define sum (+ a b))"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
@mmerce
mmerce / execute_scripts_2.whizzml
Created Apr 24, 2019
WhizzML executes WhizzML
View execute_scripts_2.whizzml
;; Creating and executing dependent scripts.
;; script2 uses the output of an execution of script1 to multiply it by a number
;; As one script uses the execution of the previous script, they will be executed
;; in a sequence
;; creating the first script to add two numbers
(define script1 (create-script {"source_code" "(define sum (+ a b))"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
{"type" "number" "name" "b"}]
@mmerce
mmerce / execute_scripts_1.whizzml
Last active Apr 24, 2019
WhizzML executes WhizzML
View execute_scripts_1.whizzml
;; Creating two scripts to be run together in the same execution
;; The scripts share no data and are not related, so they can be executed in parallel
;; the parameter for the execution is a list of maps describing each script
;; and its inputs
;; creating the first script to add two numbers
(define script1 (create-script {"source_code" "(+ a b)"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
{"type" "number" "name" "b"}]}))
@mmerce
mmerce / pick_row_in_group.json
Last active Jan 25, 2019
Filtering a random row in a group
View pick_row_in_group.json
{
"name": "Pick random row in group",
"description": "Selects one of the rows (at random) from the ones grouped by a list of fields",
"inputs": [
{
"name": "dataset-id",
"type": "dataset-id",
"description": "The original dataset id to be filtered"
},
{
@mmerce
mmerce / batch_centroids.json
Last active Nov 7, 2018
Batch centroids distances to all centroids
View batch_centroids.json
{
"name": "Batch centroid distances",
"description": "It creates a dataset with the distances to all centroids in a cluster",
"inputs": [
{
"name": "cluster-id",
"type": "cluster-id",
"description": "Cluster"
},
{
@mmerce
mmerce / truncate_categories.json
Last active Nov 4, 2018
truncating categories in dataset fields
View truncate_categories.json
{
"name": "Truncating text fields to categories",
"description": "It creates a dataset with the selected first n categories in the fields provided",
"inputs": [
{
"name": "source-id",
"type": "source-id",
"description": "Data source"
},
{
@mmerce
mmerce / top-n-dataset.json
Last active Nov 2, 2018
Creating dataset with top-n features of a model
View top-n-dataset.json
{
"name": "Top n features dataset from model",
"description": "It creates a dataset that includes the top n features as detected by a model",
"inputs": [
{
"name": "model-id",
"type": "model-id",
"description": "Model that selects the features"
},
{