{"id":15486206,"url":"https://github.com/invisal/noobjs","last_synced_at":"2026-03-11T05:04:01.306Z","repository":{"id":81848575,"uuid":"117523389","full_name":"invisal/noobjs","owner":"invisal","description":"Javascript Algorithms Toolsets","archived":false,"fork":false,"pushed_at":"2019-01-24T13:32:32.000Z","size":135,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-22T17:00:25.864Z","etag":null,"topics":["algorithm","datastructures","javascript","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invisal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-15T09:16:22.000Z","updated_at":"2025-03-11T17:48:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f042358a-1039-4b2b-8dfd-1c729642ceff","html_url":"https://github.com/invisal/noobjs","commit_stats":{"total_commits":65,"total_committers":4,"mean_commits":16.25,"dds":0.1384615384615384,"last_synced_commit":"baec731965a0e834fd7ba511e827ab65c74937ed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/invisal/noobjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invisal%2Fnoobjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invisal%2Fnoobjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invisal%2Fnoobjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invisal%2Fnoobjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invisal","download_url":"https://codeload.github.com/invisal/noobjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invisal%2Fnoobjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","datastructures","javascript","machine-learning"],"created_at":"2024-10-02T06:07:02.047Z","updated_at":"2026-03-11T05:03:56.298Z","avatar_url":"https://github.com/invisal.png","language":"JavaScript","readme":"# NoobJS\n\n[![Build Status](https://travis-ci.org/invisal/noobjs.svg?branch=master)](https://travis-ci.org/invisal/noobjs)\n\nNoobJS contains Javascript implementations of many algorithms.\n\n### Implemented Algorithms\n\n#### Machine Learning\n- [Linear Regression](https://github.com/invisal/noobjs/wiki/Linear-Regression)\n- [KNN Classifier](https://github.com/invisal/noobjs/wiki/Nearest-Neighbors-Classifier)\n- [KMean Clustering](https://github.com/invisal/noobjs/wiki/KMean-Clustering)\n\n#### Graph\n- [Graph Data Structure](https://github.com/invisal/noobjs/wiki/Graph)\n- [Prim's algorithm](https://github.com/invisal/noobjs/wiki/Graph)\n- [Kruskal's algorithm](https://github.com/invisal/noobjs/wiki/Graph)\n- [Breadth-first search](https://github.com/invisal/noobjs/wiki/Graph)\n- [Depth-first search](https://github.com/invisal/noobjs/wiki/Graph)\n- [Graph Coloring using Greedy](https://github.com/invisal/noobjs/wiki/Graph-Coloring)\n\n#### Math\n- [BigNumber](https://github.com/invisal/noobjs/wiki/Big-Number)\n- Matrix Multiplication (Brute Force)\n- [Matrix Inverse (Gaussian Elimination)](https://github.com/invisal/noobjs/wiki/Linear-Algebra#matrix-inverse)\n\n#### Elementary Data Structure\n- [Disjoint Set](https://github.com/invisal/noobjs/wiki/Disjoint-Set)\n- Queue\n- Stack\n- [Priority Queue (Binary Heap)](https://github.com/invisal/noobjs/wiki/Priority-Queue)\n- Hash Priority Queue\n\n#### Tree\n- [Ball Tree](https://github.com/invisal/noobjs/wiki/Ball-Tree)\n\n#### Random Number\n- Linear Congruential Generator\n- Marsaglia Polar Method\n\n#### Other\n- QuickSelect\n- Partition (Lomuto \u0026 Hoare)\n- Fisher Yates Shuffle\n- Sieve of Eratosthenes\n\n## Examples\n\nUsing Linear Regression\n\n```javascript\nvar { LinearRegression } = noobjs;\n\nvar x = [ \n    [0.17], [2.47], [1.73], [4.43], [4.51], \n    [4.59], [1.24], [0.84], [0.09], [0.51], \n    [2.06], [2.89], [0.81], [4.39], [1.20] \n];\n\nvar y = [ \n    [100.0], [410.0], [250.0], [560.0], [440.0], \n    [510.0], [230.0], [170.0], [100.0], [140.0], \n    [250.0], [460.0], [160.0], [490.0], [210.0] \n];\n\nvar model = new LinearRegression();\nmodel.fit(x, y);\nconsole.log( model.predict( [ [4.0], [2.0], [1.5] ] ) );\n```\n\nUsing Elementary Data Structures\n\n```javascript\nvar { PriorityQueue, Stack, Queue } = noobjs;\n\nvar p = new PriorityQueue();\np.push(7);\np.push(8);\np.push(6);\n\nconsole.log(p.pop());  // 6\nconsole.log(p.pop());  // 7\nconsole.log(p.pop());  // 8\n```\n\nUsing NoobJS to solve linear system of equations\n\n```javascript\nvar { LinearAlgebra } = noobjs;\n\n//  x + 2y -  z = 2\n// 2x + 2y + 2z = 12\n//  x -  y + 2z = 5\nvar a = [\n  [ 1,  2,  -1],\n  [ 2,  2,   2],\n  [ 1, -1,   2]\n];\n\nvar b = [ [2], [12], [5] ];\n\nconsole.log(LinearAlgebra.mat_multiply(LinearAlgebra.mat_inverse(a), b));\n// [ 1.00, 2.00, 3.00 ]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvisal%2Fnoobjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvisal%2Fnoobjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvisal%2Fnoobjs/lists"}