{"id":49453695,"url":"https://github.com/repetere/tensorscript","last_synced_at":"2026-06-18T22:00:57.994Z","repository":{"id":54755606,"uuid":"142696540","full_name":"repetere/tensorscript","owner":"repetere","description":"REPO MOVED TO https://repetere.github.io/jsonstack-model  - Deep Learning Classification, Clustering, LSTM Time Series and Regression with Tensorflow","archived":true,"fork":false,"pushed_at":"2022-07-12T02:15:56.000Z","size":3025,"stargazers_count":38,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-29T02:51:24.063Z","etag":null,"topics":["classification","deep-learning","deep-neural-networks","machine-learning","neural-network","regression","tensorflow"],"latest_commit_sha":null,"homepage":"https://repetere.github.io/jsonstack-model/","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/repetere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-07-28T17:23:44.000Z","updated_at":"2025-09-24T12:19:50.000Z","dependencies_parsed_at":"2022-08-14T01:50:43.945Z","dependency_job_id":null,"html_url":"https://github.com/repetere/tensorscript","commit_stats":null,"previous_names":["repetere/ts-deeplearning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/repetere/tensorscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Ftensorscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Ftensorscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Ftensorscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Ftensorscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repetere","download_url":"https://codeload.github.com/repetere/tensorscript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Ftensorscript/sbom","scorecard":{"id":771337,"data":{"date":"2025-08-11","repo":{"name":"github.com/repetere/tensorscript","commit":"8ec5126a3b27d938c77158145f9bce47ffdb108d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/26 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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 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"}}]},"last_synced_at":"2025-08-23T02:21:11.003Z","repository_id":54755606,"created_at":"2025-08-23T02:21:11.003Z","updated_at":"2025-08-23T02:21:11.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"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":["classification","deep-learning","deep-neural-networks","machine-learning","neural-network","regression","tensorflow"],"created_at":"2026-04-30T04:01:03.703Z","updated_at":"2026-06-18T22:00:57.987Z","avatar_url":"https://github.com/repetere.png","language":"JavaScript","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# 🚨🚨⚠️⚠️ THIS REPO HAS MOVED TO: [JSON Stack Models](https://repetere.github.io/jsonstack-model) ⚠️⚠️🚨🚨 #\n\n# TensorScript - Machine Learning and Neural Networks with Tensorflow\n\n[![Coverage Status](https://coveralls.io/repos/github/repetere/tensorscript/badge.svg?branch=master)](https://coveralls.io/github/repetere/tensorscript?branch=master) [![Build Status](https://travis-ci.org/repetere/tensorscript.svg?branch=master)](https://travis-ci.org/repetere/tensorscript)\n\n## Introduction\n\nThis library is a compilation of model building modules with a consistent API for quickly implementing Tensorflow at edge(browser) or any JavaScript environment (Node JS / GPU).\n\n### [Read the manual](https://repetere.github.io/tensorscript/manual/overview.html)\n\n## List of Tensorflow models\n\n### Classification\n\n* Deep Learning Classification: [`DeepLearningClassification`](https://repetere.github.io/tensorscript/manual/usage.html#classification)\n* Logistic Regression: [`LogisticRegression`](https://repetere.github.io/tensorscript/manual/usage.html#classification)\n\n\n### Regression\n\n* Deep Learning Regression: [`DeepLearningRegression`](https://repetere.github.io/tensorscript/manual/usage.html#regression)\n* Multivariate Linear Regression: [`MultipleLinearRegression`](https://repetere.github.io/tensorscript/manual/usage.html#regression)\n\n### Artificial neural networks (ANN)\n\n* Multi-Layered Perceptrons: [`BaseNeuralNetwork`](https://repetere.github.io/tensorscript/manual/usage.html#neural-networks)\n\n### LSTM Time Series\n\n* Long Short Term Memory Time Series: [`LSTMTimeSeries`](https://repetere.github.io/tensorscript/manual/usage.html#timeseries)\n* Long Short Term Memory Multivariate Time Series: [`LSTMMultivariateTimeSeries`](https://repetere.github.io/tensorscript/manual/usage.html#timeseries)\n\n## Basic Usage\n\nTensorScript is and ECMA Script module designed to be used in an `ES2015+` environment, if you need compiled modules for older versions of node use the compiled modules in the bundle folder.\n\nPlease read more on tensorflow configuration options, specifying epochs, and using custom layers in [configuration](https://repetere.github.io/tensorscript/manual/overview.html#configuration).\n\n### Regression Examples\n\n```javascript\nimport { MultipleLinearRegression, DeepLearningRegression, } from 'tensorscript';\nimport ms from 'modelscript';\n\nasync function main(){\n  const independentVariables = [ 'sqft', 'bedrooms',];\n  const dependentVariables = [ 'price', ];\n  const housingdataCSV = await ms.csv.loadCSV('./test/mock/data/portland_housing_data.csv');\n  const DataSet = new ms.DataSet(housingdataCSV);\n  const x_matrix = DataSet.columnMatrix(independentVariables);\n  const y_matrix = DataSet.columnMatrix(dependentVariables);\n  const MLR = new MultipleLinearRegression();\n  await MLR.train(x_matrix, y_matrix);\n  const DLR = new DeepLearningRegression();\n  await DLR.train(x_matrix, y_matrix);\n  //1600 sqft, 3 bedrooms\n  await MLR.predict([1650,3]); //=\u003e[293081.46]\n  await DLR.predict([1650,3]); //=\u003e[293081.46]\n}\nmain();\n```\n\n### Classification Examples\n\n```javascript\nimport { DeepLearningClassification, } from 'tensorscript';\nimport ms from 'modelscript';\n\nasync function main(){\n  const independentVariables = [\n    'sepal_length_cm',\n    'sepal_width_cm',\n    'petal_length_cm',\n    'petal_width_cm',\n  ];\n  const dependentVariables = [\n    'plant_Iris-setosa',\n    'plant_Iris-versicolor',\n    'plant_Iris-virginica',\n  ];\n  const housingdataCSV = await ms.csv.loadCSV('./test/mock/data/iris_data.csv');\n  const DataSet = new ms.DataSet(housingdataCSV).fitColumns({ columns: {plant:'onehot'}, });\n  const x_matrix = DataSet.columnMatrix(independentVariables);\n  const y_matrix = DataSet.columnMatrix(dependentVariables);\n  const nnClassification = new DeepLearningClassification();\n  await nnClassification.train(x_matrix, y_matrix);\n  const input_x = [\n    [5.1, 3.5, 1.4, 0.2, ],\n    [6.3, 3.3, 6.0, 2.5, ],\n    [5.6, 3.0, 4.5, 1.5, ],\n    [5.0, 3.2, 1.2, 0.2, ],\n    [4.5, 2.3, 1.3, 0.3, ],\n  ];\n  const predictions = await nnClassification.predict(input_x); \n  const answers = await nnClassification.predict(input_x, { probability:false, });\n  /*\n    predictions = [\n      [ 0.989512026309967, 0.010471616871654987, 0.00001649192017794121, ],\n      [ 0.0000016141033256644732, 0.054614484310150146, 0.9453839063644409, ],\n      [ 0.001930746017023921, 0.6456733345985413, 0.3523959517478943, ],\n      [ 0.9875779747962952, 0.01239941269159317, 0.00002274810685776174, ],\n      [ 0.9545140862464905, 0.04520365223288536, 0.0002823179238475859, ],\n    ];\n    answers = [\n      [ 1, 0, 0, ], //setosa\n      [ 0, 0, 1, ], //virginica\n      [ 0, 1, 0, ], //versicolor\n      [ 1, 0, 0, ], //setosa\n      [ 1, 0, 0, ], //setosa\n    ];\n   */\n}\nmain();\n```\n\n```javascript\nimport { LogisticRegression, } from 'tensorscript';\nimport ms from 'modelscript';\n\nasync function main(){\n  const independentVariables = [\n    'Age',\n    'EstimatedSalary',\n  ];\n  const dependentVariables = [\n    'Purchased',\n  ];\n  const housingdataCSV = await ms.csv.loadCSV('./test/mock/data/social_network_ads.csv');\n  const DataSet = new ms.DataSet(housingdataCSV).fitColumns({ columns: {Age:['scale','standard'],\n  EstimatedSalary:['scale','standard'],}, });\n  const x_matrix = DataSet.columnMatrix(independentVariables);\n  const y_matrix = DataSet.columnMatrix(dependentVariables);\n  const LR = new LogisticRegression();\n  await LR.train(x_matrix, y_matrix);\n  const input_x = [\n    [-0.062482849427819266, 0.30083326827486173,], //0\n    [0.7960601198093905, -1.1069168538010206,], //1\n    [0.7960601198093905, 0.12486450301537644,], //0\n    [0.4144854668150751, -0.49102617539282206,], //0\n    [0.3190918035664962, 0.5061301610775946,], //1\n  ];\n  const predictions = await LR.predict(input_x); // =\u003e [ [ 0 ], [ 0 ], [ 1 ], [ 0 ], [ 1 ] ];\n}\nmain();\n```\n\n### Time Series Example\n\n```javascript\nimport { LSTMTimeSeries, } from 'tensorscript';\nimport ms from 'modelscript';\n\nasync function main(){\n  const dependentVariables = [\n    'Passengers',\n  ];\n  const airlineCSV = await ms.csv.loadCSV('./test/mock/data/airline-sales.csv');\n  const DataSet = new ms.DataSet(airlineCSV);\n  const x_matrix = DataSet.columnMatrix(independentVariables);\n  const TS = new LSTMTimeSeries();\n  await TS.train(x_matrix);\n  const forecastData = TS.getTimeseriesDataSet([ [100 ], [200], [300], ])\n  await TS.predict(forecastData.x_matrix); //=\u003e[200,300,400]\n}\nmain();\n```\n\n### Testing\n\n```sh\n$ npm i\n$ npm test\n```\n\n### Contributing\n\nFork, write tests and create a pull request!\n\n### Misc\n\nAs of Node 8, ES modules are still used behind a flag, when running natively as an ES module\n\n```sh\n$ node --experimental-modules manual/examples/ex_regression-boston.mjs\n# Also there are native bindings that require Python 2.x, make sure if you're using Anaconda, you build with your Python 2.x bin\n$ npm i --python=/usr/bin/python\n ```\n\n ### Special Thanks\n - [Machine Learning Mastery](https://machinelearningmastery.com/)\n - [Super Data Science](https://www.superdatascience.com/)\n - [Python Programming](https://pythonprogramming.net/)\n - [Towards Data Science](https://towardsdatascience.com/)\n - [ml.js](https://github.com/mljs/ml)\n\nLicense\n----\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepetere%2Ftensorscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepetere%2Ftensorscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepetere%2Ftensorscript/lists"}