An interactive Support Vector Machine (SVM) classifier. Create at least 6 points of class 1 and class -1 to activate the classifier. Every time you create an additional point the SMO algorithm will then redetermine the optimal separating hyperplane.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"geometry": {"type": "Polygon", "coordinates": [[[-95.89512, 41.132321], [-95.895073, 41.133351], [-95.895075, 41.134383], [-95.895077, 41.135414], [-95.89507, 41.135939], [-95.895062, 41.136481], [-95.893699, 41.13647], [-95.892315, 41.136461], [-95.890919, 41.136454], [-95.889518, 41.136452], [-95.888853, 41.13645], [-95.888338, 41.136447], [-95.888164, 41.136447], [-95.887743, 41.136457], [-95.8875, 41.136478], [-95.887383, 41.136473], [-95.88724, 41.13647], [-95.886976, 41.136466], [-95.886343, 41.136474], [-95.885911, 41.13649], [-95.885679, 41.136508], [-95.884875, 41.136598], [-95.884568, 41.136665], [-95.884235, 41.136737], [-95.883875, 41.136853], [-95.88336, 41.137033], [-95.881079, 41.137923], [-95.880314, 41.13821], [-95.879318, 41.138586], [-95.878673, 41.137685], [-95.878302, 41.136947], [-95.87802, 41.136658], [-95.877699, 41.136176], [-95.877476, 41.136], [-95.877375, 41.13586], [-95.877042, 41.135399], [-95.876386, 41.134649], [-95.876048, 41.134132], [-95.875864, 41.134021], [-95.875633, 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LinearRegression(data){ | |
var X = [], | |
y = []; | |
for (var i = 0; i < data.length; i ++){ | |
var tempX = []; | |
for(var j = 0; j < data[0]['x'].length; j++){ | |
tempX.push(data[i]['x'][j]); | |
} | |
X.push(tempX); | |
y.push([data[i].y]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LinearRegression(data){ | |
var X = [], | |
y = []; | |
// Get everything in array format | |
for (var i = 0; i < data.length; i ++){ | |
X[i] = []; | |
y[i] = data[i].y; | |
for(var j = 0; j < data[0]['x'].length; j++){ | |
X[i][j] = data[i]['x'][j]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"x":1.3918159586,"y":2.3137462987,"c":-1},{"x":2.7553492977,"y":3.8358933062,"c":-1},{"x":1.3068825052,"y":1.562141254,"c":-1},{"x":2.8944226465,"y":2.5841533943,"c":-1},{"x":3.7024428812,"y":2.7501198675,"c":-1},{"x":3.5026863304,"y":4.1441852379,"c":-1},{"x":1.2875267989,"y":1.6449839313,"c":-1},{"x":1.5512224368,"y":3.479681808,"c":-1},{"x":2.4134867529,"y":4.2236237896,"c":-1},{"x":3.6559341255,"y":1.9783436371,"c":-1},{"x":6.9659900849,"y":5.3009901301,"c":1.0},{"x":9.0119210614,"y":7.702946096,"c":1.0},{"x":5.950966712,"y":7.2311001543,"c":1.0},{"x":5.979236673,"y":7.7339372771,"c":1.0},{"x":5.955605886,"y":6.8574976596,"c":1.0},{"x":7.8664572356,"y":6.3242365141,"c":1.0},{"x":5.2714950518,"y":6.744864841,"c":1.0},{"x":7.0457948624,"y":8.2216029477,"c":1.0},{"x":8.3580121873,"y":7.1820232618,"c":1.0},{"x":9.6273291291,"y":7.0579781464,"c":1.0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"x":1.3918159586,"y":2.3137462987,"c":-1},{"x":2.7553492977,"y":3.8358933062,"c":-1},{"x":1.3068825052,"y":1.562141254,"c":-1},{"x":2.8944226465,"y":2.5841533943,"c":-1},{"x":3.7024428812,"y":2.7501198675,"c":-1},{"x":3.5026863304,"y":4.1441852379,"c":-1},{"x":1.2875267989,"y":1.6449839313,"c":-1},{"x":1.5512224368,"y":3.479681808,"c":-1},{"x":2.4134867529,"y":4.2236237896,"c":-1},{"x":3.6559341255,"y":1.9783436371,"c":-1},{"x":6.9659900849,"y":5.3009901301,"c":1.0},{"x":9.0119210614,"y":7.702946096,"c":1.0},{"x":5.950966712,"y":7.2311001543,"c":1.0},{"x":5.979236673,"y":7.7339372771,"c":1.0},{"x":5.955605886,"y":6.8574976596,"c":1.0},{"x":7.8664572356,"y":6.3242365141,"c":1.0},{"x":5.2714950518,"y":6.744864841,"c":1.0},{"x":7.0457948624,"y":8.2216029477,"c":1.0},{"x":8.3580121873,"y":7.1820232618,"c":1.0},{"x":9.6273291291,"y":7.0579781464,"c":1.0}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"N":"Assoc/Pub-R-S", "D":"Associate’s—Public Rural-serving Small", "ID": "1"}, | |
{"N":"Assoc/Pub-R-M", "D":"Associate’s—Public Rural-serving Medium", "ID": "2"}, | |
{"N":"Assoc/Pub-R-L", "D":"Associate’s—Public Rural-serving Large", "ID": "3"}, | |
{"N":"Assoc/Pub-S-SC", "D":"Associate’s—Public Suburban-serving Single Campus", "ID": "4"}, | |
{"N":"Assoc/Pub-S-MC", "D":"Associate’s—Public Suburban-serving Multicampus", "ID": "5"}, | |
{"N":"Assoc/Pub-U-SC", "D":"Associate’s—Public Urban-serving Single Campus", "ID": "6"}, | |
{"N":"Assoc/Pub-U-MC", "D":"Associate’s—Public Urban-serving Multicampus", "ID": "7"}, | |
{"N":"Assoc/Pub-Spec", "D":"Associate’s—Public Special Use", "ID": "8"}, | |
{"N":"Assoc/PrivNFP", "D":"Associate’s—Private Not-for-profit", "ID": "9"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"N":"Assoc/Pub-R-S", "D":"Associate’s—Public Rural-serving Small", "ID": "1"}, | |
{"N":"Assoc/Pub-R-M", "D":"Associate’s—Public Rural-serving Medium", "ID": "2"}, | |
{"N":"Assoc/Pub-R-L", "D":"Associate’s—Public Rural-serving Large", "ID": "3"}, | |
{"N":"Assoc/Pub-S-SC", "D":"Associate’s—Public Suburban-serving Single Campus", "ID": "4"}, | |
{"N":"Assoc/Pub-S-MC", "D":"Associate’s—Public Suburban-serving Multicampus", "ID": "5"}, | |
{"N":"Assoc/Pub-U-SC", "D":"Associate’s—Public Urban-serving Single Campus", "ID": "6"}, | |
{"N":"Assoc/Pub-U-MC", "D":"Associate’s—Public Urban-serving Multicampus", "ID": "7"}, | |
{"N":"Assoc/Pub-Spec", "D":"Associate’s—Public Special Use", "ID": "8"}, | |
{"N":"Assoc/PrivNFP", "D":"Associate’s—Private Not-for-profit", "ID": "9"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
// The Identity Monad | |
class Container<A> { | |
value: A; | |
constructor(x: A) { | |
this.value = x; | |
} | |
map<B>(f: (x: A) => B): Container<B> { |