{"id":16897631,"url":"https://github.com/flouthoc/perceptron","last_synced_at":"2025-04-11T13:52:03.595Z","repository":{"id":87027734,"uuid":"164318864","full_name":"flouthoc/PerceptRon","owner":"flouthoc","description":":seedling: NeuralNetwork01: Lib for Single Perceptron ","archived":false,"fork":false,"pushed_at":"2019-01-24T11:50:58.000Z","size":32,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T10:05:25.415Z","etag":null,"topics":["machine-learning","neural-network","perceptron","perceptron-learning-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","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/flouthoc.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":"2019-01-06T15:14:34.000Z","updated_at":"2021-09-05T02:40:56.000Z","dependencies_parsed_at":"2023-05-30T06:15:13.688Z","dependency_job_id":null,"html_url":"https://github.com/flouthoc/PerceptRon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flouthoc%2FPerceptRon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flouthoc%2FPerceptRon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flouthoc%2FPerceptRon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flouthoc%2FPerceptRon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flouthoc","download_url":"https://codeload.github.com/flouthoc/PerceptRon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248411971,"owners_count":21099036,"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","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":["machine-learning","neural-network","perceptron","perceptron-learning-algorithm"],"created_at":"2024-10-13T17:38:51.519Z","updated_at":"2025-04-11T13:52:03.581Z","avatar_url":"https://github.com/flouthoc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Network01: PerceptRon\n\n\nImplementation of simplest neuron i.e Rosenblatt Perceptron Model. Following codebase will demonstrate a perceptron of learning basic \u003cstrong\u003elogic gates e.g AND , OR, NAND and a simple personality classifier on the bases of height and weight.\u003c/strong\u003e\n\n### Please read any of the examples and then dig into perceptron.h.\n\n## Usage\n```\ng++ -std=c++11 -o \u003cname-of-test\u003e \u003cname-of-test-file\u003e.cpp\n./\u003cname-of-test\u003e\n```\n\n## Docs\n#### Simple example for Boolean OR gate\n```c++\n#include \u003ciostream\u003e\n#include \u003cvector\u003e\n#include \"perceptron.h\"\n\nusing namespace std;\n\nint main(){\n\n\tPerceptron per(2);\n\tcout\u003c\u003c\"---- Weights before training ----\"\u003c\u003cendl;\n\tper.printWeights();\n\n\tvector\u003cpair\u003cvector\u003cdouble\u003e, bool\u003e\u003e trainingset{\n\t\tmake_pair(vector\u003cdouble\u003e {1,0}, true),\n\t\tmake_pair(vector\u003cdouble\u003e {0,1}, true),\n\t\tmake_pair(vector\u003cdouble\u003e {0,0}, false)\n\t};\n\tper.traintilllearn(trainingset);\n\tcout\u003c\u003c\"---- Weights after training ----\"\u003c\u003cendl;\n\tper.printWeights();\n\tcout\u003c\u003c\"----Predicted Outputs----\"\u003c\u003cendl;\n\tcout\u003c\u003cper.predict(vector\u003cdouble\u003e {1,1})\u003c\u003cendl;\n\tcout\u003c\u003cper.predict(vector\u003cdouble\u003e {1,0})\u003c\u003cendl;\n\tcout\u003c\u003cper.predict(vector\u003cdouble\u003e {0,1})\u003c\u003cendl;\n\tcout\u003c\u003cper.predict(vector\u003cdouble\u003e {0,0})\u003c\u003cendl;\n\t\n\treturn 0;\n}\n```\n\n## Theory\n### What is a perceptron\nRead from here\n* https://en.wikipedia.org/wiki/Perceptron\n* https://www.cs.toronto.edu/~jlucas/teaching/csc411/lectures/tut5_handout.pdf","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflouthoc%2Fperceptron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflouthoc%2Fperceptron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflouthoc%2Fperceptron/lists"}