{"id":38589628,"url":"https://github.com/adadgio/neural-data-normalizer","last_synced_at":"2026-01-17T08:23:04.046Z","repository":{"id":65457029,"uuid":"102613988","full_name":"adadgio/neural-data-normalizer","owner":"adadgio","description":"Data to bits normalization helpers script to use with neural network(s).","archived":false,"fork":false,"pushed_at":"2019-01-21T08:35:40.000Z","size":57,"stargazers_count":49,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T11:25:19.070Z","etag":null,"topics":["big-data","neural-networks","synaptic"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/adadgio.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}},"created_at":"2017-09-06T13:45:44.000Z","updated_at":"2024-10-22T04:47:30.000Z","dependencies_parsed_at":"2023-01-24T12:05:12.666Z","dependency_job_id":null,"html_url":"https://github.com/adadgio/neural-data-normalizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adadgio/neural-data-normalizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adadgio%2Fneural-data-normalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adadgio%2Fneural-data-normalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adadgio%2Fneural-data-normalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adadgio%2Fneural-data-normalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adadgio","download_url":"https://codeload.github.com/adadgio/neural-data-normalizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adadgio%2Fneural-data-normalizer/sbom","scorecard":{"id":164210,"data":{"date":"2025-08-11","repo":{"name":"github.com/adadgio/neural-data-normalizer","commit":"e4562ad06fc0936d53b273d9272cf81163ce3fdf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/29 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":"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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"40 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-332q-7ff2-57h2"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T14:22:56.453Z","repository_id":65457029,"created_at":"2025-08-16T14:22:56.453Z","updated_at":"2025-08-16T14:22:56.453Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["big-data","neural-networks","synaptic"],"created_at":"2026-01-17T08:23:03.973Z","updated_at":"2026-01-17T08:23:04.039Z","avatar_url":"https://github.com/adadgio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple data normalizer to be used with neural networks\n\nAs my grandfather used to say (probably), **neural networks** are dumb. When they're born and when you need to train them just to see how all the magic works, its a pain in the... neck.\n\nThis is library **convert datasets of human data** into **arrays of bits** understandable for neurons (duh).\n\n*Disclaimer*:\nThis script was made when i tested the awesome [synaptic.js](https://github.com/cazala/synaptic) neural network library and might not suit all sorts of inputs. Its mainly meant to be able to quickly have test data from example given around the web for neural networks input.\n\n## Cut the crap, show me how to\n\nConsider this. I'm trying to plug a neural network into my Arduino Connected Garden and i've got the following data. I want my network to know when or when not to water my plants on its own (whatever the units are for now).\n\n```json\n{ \"soilhumidity\": 500, \"airtemp\": 32, \"airhum\": 18, \"water\": true, \"plants\": [\"tomatoes\", \"potatoes\"] },\n{ \"soilhumidity\": 1050, \"airtemp\": 40, \"airhum\": 21, \"water\": true, \"plants\": [\"potatoes\", \"asparagus\"] },\n{ \"soilhumidity\": 300, \"airtemp\": 100, \"airhum\": 90, \"water\": false, \"plants\": [\"asparagus\", \"tomatoes\"] },\n{ \"soilhumidity\": 950, \"airtemp\": 103, \"airhum\": 26, \"water\": true, \"plants\": [\"asparagus\", \"asparagus\"] },\n{ \"soilhumidity\": 1050, \"airtemp\": 8, \"airhum\": 26, \"water\": true, \"plants\": [\"tomatoes\", \"tomatoes\"] },\n{ \"soilhumidity\": 1050, \"airtemp\": 56, \"airhum\": 26, \"water\": true, \"plants\": [\"potatoes\", \"french fries\"] },\n```\n\nIn the end, my output is \"should i water the plants?\": `water: true` and the rest are my inputs. Let's do this.\n\n```ts\nconst normalizer = new Normalizer(sampleData);\n\n// setting required options and normalize the data\nnormalizer.setOutputProperties(['water']);\nnormalizer.normalize();\n\n// find useful information about your data\n// to pass to your neural network\nconst nbrInputs = normalizer.getInputLength();\nconst nbrOutputs = normalizer.getOutputLength();\n\nconst metadata = normalizer.getDatasetMetaData();\nconst inputs = normalizer.getBinaryInputDataset();\nconst outputs = normalizer.getBinaryOutputDataset();\n\nconsole.log(metadata);\nconsole.log(inputs);\nconsole.log(outputs);\n```\n\nThere you should have all useful information to give to your network. You know the **number if inputs** and **outputs**, you get **~~binarized(?) dataset suitable for neural networks**, and event some *metadata* about your data.\n\n```\n$ (console output)\n{ soilhum: { type: 'number', min: 300, max: 1050, distinctValues: null },\n  airtemp: { type: 'number', min: 8, max: 103, distinctValues: null },\n  airhum: { type: 'number', min: 18, max: 90, distinctValues: null },\n  water: { type: 'boolean', min: 0, max: 1, distinctValues: null },\n  plants:\n   { type: 'array',\n     min: null,\n     max: null,\n     distinctValues: [ 'tomatoes', 'potatoes', 'asparagus', 'french fries' ] } }\n\n[ [ 0.266667, 0.252632, 0, 1, 1, 0, 0 ],\n  [ 1, 0.336842, 0.041667, 0, 1, 1, 0 ],\n  [ 0, 0.968421, 1, 1, 0, 1, 0 ],\n  [ 0.866667, 1, 0.111111, 0, 0, 1, 0 ],\n  [ 1, 0, 0.111111, 1, 0, 0, 0 ],\n  [ 1, 0.505263, 0.111111, 0, 1, 0, 1 ] ]\n\n[ [ 1 ], [ 1 ], [ 0 ], [ 1 ], [ 1 ], [ 1 ] ]\n```\n\n## Why metadata ?\n\nConsider  a real example where you actually started to understand what are neural networks and start implementing it. You realize the biggest challenge is data formatting. When you **activate Alfred** with you data (i always call my network Alfred)\nyou realize you also need to **normalize the new data input** as well.\n\nSo you need to save metadata information that you got earlier (mins, maxes, ets) so that our data normalizer here converts the new inputs to the same scales! (this implies training data MUST contain min and maxes values at some point).\n\nThen on new unkown input you just have to recall the normalizer one thing: *metadata of known values* range.\n\n```\nconst normalizer = new Normalizer(newData);\n\nnormalizer\n    .setDatasetMetaData(networkObject.metadata)\n    .setOutputProperties(['water']);\n\nconst input = normalizer.getBinaryInputDataset()[0];\n\n// and activate your neural network with data ! (see index.ts for an example using synaptic)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadadgio%2Fneural-data-normalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadadgio%2Fneural-data-normalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadadgio%2Fneural-data-normalizer/lists"}