{"id":16213843,"url":"https://github.com/solygambas/javascript-machine-learning","last_synced_at":"2026-04-24T16:06:55.046Z","repository":{"id":102301323,"uuid":"387238068","full_name":"solygambas/javascript-machine-learning","owner":"solygambas","description":"6 projects to understand basic algorithms in Machine Learning, using Lodash and Tensorflow.js.","archived":false,"fork":false,"pushed_at":"2022-05-02T04:47:51.000Z","size":924,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T22:15:41.650Z","etag":null,"topics":["javascript","lodash","machine-learning","tensorflow","tensorflowjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solygambas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-07-18T17:58:34.000Z","updated_at":"2021-11-18T15:48:19.000Z","dependencies_parsed_at":"2023-05-01T20:11:47.593Z","dependency_job_id":null,"html_url":"https://github.com/solygambas/javascript-machine-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solygambas/javascript-machine-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solygambas%2Fjavascript-machine-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solygambas%2Fjavascript-machine-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solygambas%2Fjavascript-machine-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solygambas%2Fjavascript-machine-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solygambas","download_url":"https://codeload.github.com/solygambas/javascript-machine-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solygambas%2Fjavascript-machine-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript","lodash","machine-learning","tensorflow","tensorflowjs"],"created_at":"2024-10-10T11:08:46.004Z","updated_at":"2026-04-24T16:06:55.016Z","avatar_url":"https://github.com/solygambas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Machine Learning Projects with JavaScript\n\n6 projects to understand basic algorithms in Machine Learning, using Lodash and Tensorflow.js.\n\n| #   | Project                                      | Description                                                                                  |\n| --- | -------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| 01  | [**Plinko**](#plinko)                        | A quick introduction to K-Nearest Neighbors (KNN) algorithm using Lodash.                    |\n| 02  | [**House Pricings**](#housepricings)         | Another implementation of K-Nearest Neighbors (KNN) algorithm with Tensorflow.js.            |\n| 03  | [**Gas Mileage Calculator**](#gasmileage)    | A gradient descent algorithm in linear regression using Tensorflow.js.                       |\n| 04  | [**Smog Test**](#smogtest)                   | A gradient descent algorithm in logistic regression to handle natural binary classification. |\n| 05  | [**Fuel Efficiency Class**](#fuelefficiency) | A multinominal logistic regression to handle multi-value classification.                     |\n| 06  | [**Handwriting Recognition**](#handwriting)  | Another multinominal logistic regression with a larger dataset.                              |\n\n## \u003ca name=\"plinko\"\u003e\u003c/a\u003e 1) Plinko\n\nA quick introduction to K-Nearest Neighbors (KNN) algorithm using Lodash.\n\n[See 01-plinko folder](01-plinko)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"01-plinko\"\u003e\n        \u003cimg src=\"01-plinko/screenshot.png\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n- implementing K-Nearest Neighbors (KNN) algorithm with Lodash methods.\n- testing the algorithm and interpreting bad results.\n- creating random test and training datasets.\n- generalizing KNN, gauging accuracy and printing a report.\n- investigating optimal k values.\n- updating KNN for multiple features.\n- applying normalization with MinMax.\n- handling objective feature selection with KNN.\n\n## \u003ca name=\"housepricings\"\u003e\u003c/a\u003e 2) House Pricings\n\nAnother implementation of K-Nearest Neighbors (KNN) algorithm with Tensorflow.js.\n\n[See 02-house-pricings folder](02-house-pricings)\n\n### Features\n\n- loading CSV data.\n- running K-Nearest Neighbors (KNN) algorithm with Tensorflow.js.\n- analyzing results and reporting error percentages.\n- applying standardization.\n- debugging calculations with node --inspect-brk and Chrome debugger.\n- adding features to get a better accuracy.\n\n## \u003ca name=\"gasmileage\"\u003e\u003c/a\u003e 3) Gas Mileage Calculator\n\nA gradient descent algorithm in linear regression using Tensorflow.js.\n\n[See 03-gas-mileage-calculator folder](03-gas-mileage-calculator)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"03-gas-mileage-calculator\"\u003e\n        \u003cimg src=\"03-gas-mileage-calculator/screenshot.png\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n- loading CSV data and creating a LinearRegression class.\n- creating a basic gradient descent implementation with arrays of data and for loops.\n- calculating mean squared error (MSE) slopes, updating coefficients and interpreting results.\n- understanding matrix multiplication.\n- vectorizing the gradient descent algorithm with Tensorflow.js helpers.\n- gauging model accuracy by implementing the coefficient of determination.\n- applying standardization and massaging learning rates.\n- refactoring for multivariate regression.\n- tracking MSE history to update learning rate automatically.\n- plotting MSE history with nodeplotlib.\n- refactoring towards batch and stochastic gradient descent for better performances.\n- making predictions with the model.\n\n## \u003ca name=\"smogtest\"\u003e\u003c/a\u003e 4) Smog Test\n\nA gradient descent algorithm in logistic regression to handle natural binary classification.\n\n[See 04-smog-test folder](04-smog-test)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"04-smog-test\"\u003e\n        \u003cimg src=\"04-smog-test/screenshot.png\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n- updating linear regression for logistic regression by adding the sigmoid equation.\n- implementing a test function to gauge classification accuracy.\n- supporting variable decision boundaries.\n- refactoring with cross entropy to update learning rate.\n- plotting cost history with nodeplotlib.\n\n## \u003ca name=\"fuelefficiency\"\u003e\u003c/a\u003e 5) Fuel Efficiency Class\n\nA multinominal logistic regression to handle multi-value classification.\n\n[See 05-fuel-efficiency folder](05-fuel-efficiency)\n\n### Features\n\n- refactoring to multi-column weights.\n- classifying continuous values in 3 ranges of fuel consumption: low, medium and high.\n- training a multinominal model.\n- handling conditional probability distribution with the softmax equation.\n- implementing accuracy gauges with argMax() and calculating accurary.\n\n## \u003ca name=\"handwriting\"\u003e\u003c/a\u003e 6) Handwriting Recognition\n\nAnother multinominal logistic regression with a larger dataset.\n\n[See 06-handwriting-recognition folder](06-handwriting-recognition)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"06-handwriting-recognition\"\u003e\n        \u003cimg src=\"06-handwriting-recognition/screenshot.png\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n- flattening image data from MNIST handwritten digit database.\n- encoding label values and implementing an accuracy gauge.\n- debugging the calculation process with node --inspect-brk.\n- dealing with zero variances.\n- creating memory snapshots with Chrome debugger.\n- releasing references to MNIST dataset.\n- optimizing Tensorflow.js memory usage with tf.tidy().\n- measuring footprint reduction.\n- plotting cost history and improving model accuracy.\n\nBased on [Machine Learning with JavaScript](https://www.udemy.com/course/machine-learning-with-javascript/) by Stephen Grider (2021).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolygambas%2Fjavascript-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolygambas%2Fjavascript-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolygambas%2Fjavascript-machine-learning/lists"}