{"id":13936734,"url":"https://github.com/hugorut/neural-cli","last_synced_at":"2025-09-01T13:44:22.030Z","repository":{"id":57445760,"uuid":"69902417","full_name":"hugorut/neural-cli","owner":"hugorut","description":"command line neural network","archived":false,"fork":false,"pushed_at":"2018-10-15T19:05:45.000Z","size":38,"stargazers_count":143,"open_issues_count":3,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-20T03:53:37.444Z","etag":null,"topics":["hypothesis","neural-network","prediction"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/hugorut.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":"2016-10-03T19:15:30.000Z","updated_at":"2025-04-29T19:59:12.000Z","dependencies_parsed_at":"2022-09-26T17:30:54.855Z","dependency_job_id":null,"html_url":"https://github.com/hugorut/neural-cli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/hugorut/neural-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugorut%2Fneural-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugorut%2Fneural-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugorut%2Fneural-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugorut%2Fneural-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugorut","download_url":"https://codeload.github.com/hugorut/neural-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugorut%2Fneural-cli/sbom","scorecard":{"id":472886,"data":{"date":"2025-08-11","repo":{"name":"github.com/hugorut/neural-cli","commit":"a8c1eaabfc7dc9425b59dec0cd3f1bd9fe9edcb4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 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":"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":"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":"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":"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":"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 1 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-19T14:24:30.391Z","repository_id":57445760,"created_at":"2025-08-19T14:24:30.391Z","updated_at":"2025-08-19T14:24:30.391Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273136462,"owners_count":25051999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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":["hypothesis","neural-network","prediction"],"created_at":"2024-08-07T23:02:56.935Z","updated_at":"2025-09-01T13:44:21.990Z","avatar_url":"https://github.com/hugorut.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Command Line Neural Network\n\nNeuralcli provides a simple command line interface to a python implementation of a simple classification neural network. Neuralcli allows a quick way and easy to get instant feedback on a hypothesis or to play around with one of the most popular concepts in machine learning today.\n\n## Installation\n\nInstallation of neuralcli is provided through pip, just run:\n```\npip install neuralcli\n```\n\nIf you don't have some of the libraries used, such as `numpy` or `skitlearn` the install make take some time as pip installs all the dependencies. After pip finishes the install run the following `command -v neuralcli` to check that the executable has been successfully added. \n\n**Troubleshooting**\n\nWhen you run `neuralcli` for the first time you may get an output similar to below\n```\n/usr/local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\nwarnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n```\nThis is just a warning from matplotlib, and will be removed the next time you run the command.\n\nAdditionally matlibplot may throw another error that will produce an output similar to:\n```\n**RuntimeError**: Python is not installed as a framework\n```\n\nTo fix this issue follow the steps outlined [here](http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python)\n\n## Use\n\nNeuralcli comes bundled with three main commands.\n\n### Train\n\nThe train command takes a set of input features along with their expected outputs and performs backpropogation to learn the weights for a neural network. These weights can be saved to an output file to use for classification prediction later. The command takes the following.\n\n**parameters:**\n\n| name | type | description                                                                      | example        |\n|------|------|----------------------------------------------------------------------------------|----------------|\n| X    | file | a file path to a CSV which holds your training data                              | ./train.csv    |\n| Y    | file | a file path to a CSV which holds your expected outputs for the training examples | ./expected.csv |\n\n**flags:**\n\n| name        | type   | description                                                     | default | example      |\n|-------------|--------|-----------------------------------------------------------------|---------|--------------|\n| --lam       | float  | The regularization amount                                       | 1       | 0.07         |\n| --maxiter   | int    | The maximum iterations for chosen to minimise the cost function | 250     | 30           |\n| --output    | string | A file path to save the minimised parameters to                 | nil     | ./output.csv |\n| --normalize | bool   | Perform normalization on the training set                       | true    | false        |\n| --verbose   | bool   | Output the training progress                                    | true    | false        |\n\n**example:**\n\n```\n$ neuralcli train ./X.csv ./Y.csv --output=./weights.csv --normalize=true\n```\n\nOnce you run the train command the neural network will intialize and begin to learn the weights, you should see an output similar to bellow if the `--verbose` flag is set to true.\n\n![](http://i.imgur.com/EqPJD2s.gif)\n\n### Predict\n\nThe prediction command takes a set of learned weights and a given input to predict a an ouput. The learned weights are loaded into the neural network by providing an file which holds them in a rolled 1 * n vector shape. In order for the predict command to work correctly these parameters need to be unrolled and therefore you need to provide the sizes of the input layer, hidden layer, and output labels that you wish to unroll the \n\n**parameters:**\n\n| name   | type | description                                                                        | example     |\n|--------|------|------------------------------------------------------------------------------------|-------------|\n| x      | file | the file that holds the 1 * n row example that should be predicted                 | ./input.csv |\n| params | file | The file that holds a 1 * n rolled parameter vector (saved from the train command) | ./ouput.csv |\n| labels | int  | The size of the output layer that the parameters were trained on                   | 3           |\n\n**flags:**\n\n| name        | type   | description                                                     | default | example      |\n|-------------|--------|-----------------------------------------------------------------|---------|--------------|\n| --normalize | bool   | Perform normalization on the training set                       | true    | false        |\n| --sizeh     | int    | The size of the hidden layer if it differs from the input layer | nil     | 8            |\n\n**example:**\n\n```\n$ neuralcli predict ./x.csv 3 ./params.csv \n```\n\nNeuralcli will now print a prediction in INT form, corresponding to the index of you output labels.\ne.g. `0` will correspond to you first classification label. \n\n### Test\n\nThe test command gives some primitive feedback about the correctness of your hypothesis by running a diagnostic check on the given data set and expected output. This method plots the the margin of prediction error against the increase in size of training examples. This can be useful to determine what is going wrong with your hypothesis, i.e. whether it is underfitting or overfitting the training set.\n\n**parameters:**\n\n| name | type | description                                                                      | example        |\n|------|------|----------------------------------------------------------------------------------|----------------|\n| X    | file | a file path to a CSV which holds your training data                              | ./train.csv    |\n| Y    | file | a file path to a CSV which holds your expected outputs for the training examples | ./expected.csv |\n\n**flags:**\n\n| name        | type   | description                                                     | default | example      |\n|-------------|--------|-----------------------------------------------------------------|---------|--------------|\n| --lam       | float  | The regularization amount                                       | 1       | 0.07         |\n| --maxiter   | int    | The maximum iterations for chosen to minimise the cost function | 250     | 30           |\n| --normalize | bool   | Perform normalization on the training set                       | true    | false        |\n| --verbose   | bool   | Output the training progress                                    | true    | false        |\n| --step      | int    | The increments that the training will increase the set by       | 10      | 100          |\n\n**example:**\n\n```\n$ neuralcli train ./X.csv ./Y.csv --step=50 --normalize=true\n```\n\nNeural cli will then run the test sequence printing its progress as it increases the size of the training set.\n\n![](http://i.imgur.com/TFlhHJN.gif)\n\nAfter this runs it will then print a plot of the hypothesis error against the size of training set the weights where learned on. Below is an example graph plotted from the iris dataset.\n\n![](http://i.imgur.com/o3ZTQxY.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugorut%2Fneural-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugorut%2Fneural-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugorut%2Fneural-cli/lists"}