Skip to content

Instantly share code, notes, and snippets.

@Bcohn
Bcohn / data.tsv
Last active March 11, 2016 21:53
Simple linear regression
sepalLength sepalWidth petalLength petalWidth species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@Bcohn
Bcohn / index.html
Last active March 11, 2016 21:52
knn
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<style>
.yAxis text {
font: 10px sans-serif;
}
.xAxis text {
font: 10px sans-serif;
}
@Bcohn
Bcohn / fruit.csv
Last active March 11, 2016 21:30
softmax
fruit width height
1 8.4 7.3
1 8 6.8
1 7.4 7.2
1 7.1 7.8
1 7.4 7
1 6.9 7.3
1 7.1 7.6
1 7 7.1
1 7.3 7.7
@Bcohn
Bcohn / costs.csv
Last active March 11, 2016 21:33
Spendink!
icd_code totalEncounters totalCost
427.31 atrial fibrillation 1008266 850000000
401.9 hypertension nos 966385 664000000
250.00 dmii wo cmp nt st uncntr 949621 801000000
585.6 end stage renal disease 801015 2560000000
V76.12 screen mammogram nec 716272 167000000
599.0 urin tract infection nos 564942 748000000
V58.83 therapeutic drug monitor 529529 47700000
272.4 hyperlipidemia nec/nos 525737 176000000
401.1 benign hypertension 451413 335000000
@Bcohn
Bcohn / index.html
Last active March 11, 2016 21:39
TheNpercent
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet">
<style>