{"id":19472046,"url":"https://github.com/mannasoumya/grnn","last_synced_at":"2026-02-04T01:40:04.444Z","repository":{"id":57254338,"uuid":"214385788","full_name":"mannasoumya/grnn","owner":"mannasoumya","description":"basic and simple General Regression Neural Network for NodeJS","archived":false,"fork":false,"pushed_at":"2021-11-06T08:33:24.000Z","size":53,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-08T16:50:46.658Z","etag":null,"topics":["javascript","learning","machine-learning","machine-learning-algorithms","machinelearning","neural-network","neural-networks","node-js","node-module","nodejs","prediction","prediction-algorithm","prediction-model","radial-basis-function","regression","regression-algorithms","regression-models"],"latest_commit_sha":null,"homepage":null,"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/mannasoumya.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}},"created_at":"2019-10-11T08:36:56.000Z","updated_at":"2023-03-03T16:36:05.000Z","dependencies_parsed_at":"2022-08-31T08:21:35.330Z","dependency_job_id":null,"html_url":"https://github.com/mannasoumya/grnn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mannasoumya/grnn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannasoumya%2Fgrnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannasoumya%2Fgrnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannasoumya%2Fgrnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannasoumya%2Fgrnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mannasoumya","download_url":"https://codeload.github.com/mannasoumya/grnn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannasoumya%2Fgrnn/sbom","scorecard":{"id":615359,"data":{"date":"2025-08-11","repo":{"name":"github.com/mannasoumya/grnn","commit":"82917be8785faf8c4cf6959f037737be702d0c13"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T03:48:21.402Z","repository_id":57254338,"created_at":"2025-08-21T03:48:21.402Z","updated_at":"2025-08-21T03:48:21.402Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29063974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T00:26:14.114Z","status":"ssl_error","status_checked_at":"2026-02-04T00:23:06.435Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","learning","machine-learning","machine-learning-algorithms","machinelearning","neural-network","neural-networks","node-js","node-module","nodejs","prediction","prediction-algorithm","prediction-model","radial-basis-function","regression","regression-algorithms","regression-models"],"created_at":"2024-11-10T19:12:04.177Z","updated_at":"2026-02-04T01:40:04.426Z","avatar_url":"https://github.com/mannasoumya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple General Regression Neural Network for NodeJS\n### (With an In-Built CSV Parser)\n[![npm version](https://badge.fury.io/js/grnn.svg)](https://www.npmjs.com/package/grnn)\n## Description\nThis is a NodeJS module to use \u003cb\u003eGRNN\u003c/b\u003e to predict given a training data.\n\nThe \u003cb\u003e\"npm\"\u003c/b\u003e package can be found \u003cb\u003e\u003ca href=\"https://www.npmjs.com/package/grnn\" target=\"__blank\" rel=\"noopener noreferrer\"\u003ehere\u003c/a\u003e\u003c/b\u003e.  \n\nCheck out the \u003cb\u003e \u003ca href=\"https://en.wikipedia.org/wiki/General_regression_neural_network\" target=\"__blank\" rel=\"noopener noreferrer\"\u003eWikipedia \u003c/a\u003e \u003c/b\u003epage to find out more about GRNN or the beginner stuffs \u003cb\u003e\u003ca href=\"https://easyneuralnetwork.blogspot.com/2013/07/grnn-generalized-regression-neural.html\" target=\"__blank\" rel=\"noopener noreferrer\"\u003ehere\u003c/a\u003e\u003c/b\u003e.\n##### (This script has no external dependencies)\n### Input Parameters\n#### \u003ci\u003eRequired\u003c/i\u003e\ndouble \u003cb\u003etrain_x\u003c/b\u003e    : 2d array of n rows(training size) and m columns(features)\u003cbr\u003e\ndouble \u003cb\u003etrain_y\u003c/b\u003e    : 1d array of size n (actual output correspondng to each training input)\u003cbr\u003e\ndouble \u003cb\u003etest_x\u003c/b\u003e    : 2d array of n1 rows(testing size) and m columns(features)\u003cbr\u003e\ndouble \u003cb\u003etest_y\u003c/b\u003e    : 1d array of size n1 (actual output correspondng to each testing input)\u003cbr\u003e\ndouble \u003cb\u003einput\u003c/b\u003e      : 1d array of size n (input data whose Y needs to be predicted) \u003cbr\u003e\ndouble \u003cb\u003esigma\u003c/b\u003e      : the value of sigma in the Radial Basis Function :: Standard Deviation\u003cbr\u003e\nboolean \u003cb\u003enormalize\u003c/b\u003e : whether to normalize train_x or not (generally normalization of training samples gives better predictions)\u003cbr\u003e\n\n### Functions\n\u003cb\u003epredict(input)\u003c/b\u003e - Returns predicted value of given input \u003cbr\u003e\n\u003cb\u003emse()\u003c/b\u003e - Returns the Mean Squared Error for the given input \u003cbr\u003e\n### Variables\n\u003cb\u003eypred[]\u003c/b\u003e - Array which have the predicted values for test input data \u003cbr\u003e\n\u003cb\u003eoptimal_sigma\u003c/b\u003e - Value of Optimal Sigma ( Minimum MSE ) -- Must be used after calling mse() function \n\n## How to Use ? (Example)\n### Step 1 : Clone repository\n```shell\n\u003e git clone https://github.com/mannasoumya/grnn.git\n```\n#### Or\n\n### Step 1 : Install Via npm\n```shell\n\u003e npm install grnn\n```\n### Step 2: Import module and use as follows \nOr you can use it in your own code \u003cbr\u003e\n```javascript\nconst grnn = require(\"./grnn\"); // assuming cloned repo in cwd; otherwise use appropriate path to grnn.js\n// const grnn = require(\"grnn\");  -- \u003e if installed via npm\nconst train_x = [[1, 2], [5, 6], [10, 11]],\n  train_y = [3, 7, 12],\n  input = [5.5, 6.5],\n  sigma = 2.16,\n  normalize = true;\nconst test_x = [[8.8, 9.8], [13, 14]];\nconst test_y = [10.8, 15];\nconst gr = new grnn(train_x, train_y, sigma, normalize, test_x, test_y);\nconst pred = gr.predict(input);\nconst mse = gr.mse();\nconsole.log(\"Prediction:  \" + pred);\nconsole.log(\"MSE:  \" + mse);\nconsole.log(\"Optimal Value of Sigma:  \" + gr.optimal_sigma);\nconsole.log(\"Predicted Values against Test:  \"+ gr.ypred);\n``` \n### If you are using CSV parser from file to load data\nHere is a snapshot of a \u003cb\u003esample data\u003c/b\u003e.\u003cbr\u003e\u003cbr\u003e\nNote that the \u003cb\u003eVariable to be Predicted\u003c/b\u003e must be in the \u003cb\u003e\u003ci\u003e\"LAST COLUMN\"\u003c/i\u003e\u003c/b\u003e of the csv file.\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/mannasoumya/grnn/master/sample_data_snapshot.PNG\"\u003e\u003c/img\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n#### Here's a sample code to use the built-in CSV parser\n\n```javascript\nconst grnn = require(\"./grnn\"); // assuming cloned repo in cwd; otherwise use appropriate path to grnn.js\n// const grnn = require(\"grnn\");  -- \u003e if installed via npm\nlet gr = new grnn(); // initialize constructor with no parameters\nconst path=\"..../data.csv\", // path to csv file\n  header=true; // if your data contain headers\nconst data = gr.parseCSV(path, header);\nconst { train_x, \n        test_x, \n        train_y, \n        test_y } = gr.split_test_train(data); // attribute names are train_x, test_x, train_y, test_y\ngr = new grnn(train_x, train_y, 0.1180, false, test_x, test_y); // initialized with actual parameters\nconst mse = gr.mse();\nconsole.log(\"MSE:  \" + mse);\nconsole.log(\"Optimal Value of Sigma:  \" + gr.optimal_sigma);\nconsole.log(\"Predicted Values against Test:  \"+gr.ypred.map(el=\u003eel.toPrecision(4)));\n```\n\n\n\u003ch3\u003e Please contribute and raise issues. Pull requests are welcome. \u003c/h3\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmannasoumya%2Fgrnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmannasoumya%2Fgrnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmannasoumya%2Fgrnn/lists"}