NoobJS
NoobJS contains Javascript implementations of many algorithms.
Algorithms Roadmap
Machine Learning
Regression | Classifier | Cluster |
---|---|---|
✔ Linear Regression | ✔ KNN Classifier | k-mean Clustering |
KNN using kd-tree | ||
KNN using ball-tree | ||
Gaussian Naive Bayes Classifier |
Math and Numbers
Matrix | BigNumber | Prime |
---|---|---|
✔ Matrix Multiplication (Brute Force) | ✔ Long Addition | ✔ Primity Test (Brute Force) |
✔ Matrix Transpose | ✔ Long Subtraction | ✔ Sieve of Eranthoses |
✔ Matrix Inverse (Gaussian Elimination) | ✔ Long Multiplication | Pollard's rho algorithm |
✔ Long Division |
Data Structure
Basic | Graph |
---|---|
✔ Queue | Depth-First Search |
✔ Stack | Breadth-First search |
✔ Priority Queue (Binary Heap) | Prim's algorithm |
✔ Hash Priority Queue |
Examples
Using Linear Regression
var LinearRegression = ML; var x = 017 247 173 443 451 459 124 084 009 051 206 289 081 439 120 ; var y = 1000 4100 2500 5600 4400 5100 2300 1700 1000 1400 2500 4600 1600 4900 2100 ; var model = ;model;console;
Using Elementary Data Structures
var PriorityQueue Stack Queue = Collections; var p = ;p;p;p; console; // 6console; // 7console; // 8
Using NoobJS to solve linear system of equations
var LinearAlgebra = noobjsNumbers; // x + 2y - z = 2// 2x + 2y + 2z = 12// x - y + 2z = 5var a = 1 2 -1 2 2 2 1 -1 2; var b = 2 12 5 ; console;// [ 1.00, 2.00, 3.00 ]