{"id":18657983,"url":"https://github.com/ifrazaib/perceptrontraining","last_synced_at":"2025-11-05T22:30:25.230Z","repository":{"id":244429346,"uuid":"815177299","full_name":"ifrazaib/PerceptronTraining","owner":"ifrazaib","description":"In this repo I have added Perceptron training rule is a topic of machine learning in which we use our activation function and neural network and update our weights if there is an error in actual output or output that we had to matched. ","archived":false,"fork":false,"pushed_at":"2024-09-07T14:19:31.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T15:12:53.622Z","etag":null,"topics":["perceptron-learning-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ifrazaib.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T14:14:48.000Z","updated_at":"2024-09-07T14:19:34.000Z","dependencies_parsed_at":"2024-09-07T15:43:24.985Z","dependency_job_id":null,"html_url":"https://github.com/ifrazaib/PerceptronTraining","commit_stats":null,"previous_names":["ifra-zaib/machine-learning-perceptron-training-rule","ifrazaib/perceptron-training-rule-ml-","ifrazaib/perceptrontraining"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifrazaib%2FPerceptronTraining","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifrazaib%2FPerceptronTraining/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifrazaib%2FPerceptronTraining/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifrazaib%2FPerceptronTraining/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifrazaib","download_url":"https://codeload.github.com/ifrazaib/PerceptronTraining/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475960,"owners_count":19645041,"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":["perceptron-learning-algorithm"],"created_at":"2024-11-07T07:30:53.962Z","updated_at":"2025-11-05T22:30:25.183Z","avatar_url":"https://github.com/ifrazaib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Perceptron Training Rule\n## Overview\nThe Perceptron is one of the simplest types of artificial neural networks used for binary classification tasks. This project demonstrates how to implement the Perceptron training rule, train a Perceptron on a dataset, and calculate the accuracy of the model.\n\n## Features\n- Perceptron Training: Implementation of the Perceptron training algorithm.\n- Accuracy Calculation: Evaluate the model's performance by calculating the accuracy on a test dataset.\n- Binary Classification: Applicable to binary classification problems.\n- Customizable Parameters: Learning rate and number of iterations can be adjusted.\n## Contents\n- Perceptron Training Rule\n- Dataset\n- Usage\n- Example\n- Contributing\n## Perceptron Training Rule\nThe Perceptron training rule updates the weights based on the prediction error for each training sample. The rule is as follows:\n- Initialize weights (including bias) to small random numbers.\n- For each training sample:\n- Compute the output using the current weights.\n- Update the weights based on the error:\n  wi\u003c-wi+\n𝑤𝑖←𝑤𝑖+𝜂(𝑦−𝑦^)𝑥𝑖w i←wi+η(y− y^)xi\n​\nwhere \n𝑤𝑖= is the weight for feature.\nη is the learning rate, \ny is the true label, \ny^ is the predicted label, and \n𝑥𝑖 is the feature value.\n\n\n![graphtr](https://github.com/Ifra-Zaib/Machine-Learning-Perceptron-training-rule/assets/172352661/5e398c2a-78fa-49c2-b7e8-15941ec9ded7)\n\n![tr](https://github.com/Ifra-Zaib/Machine-Learning-Perceptron-training-rule/assets/172352661/16c3e273-b805-4dee-890c-ed4b812b1fb0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifrazaib%2Fperceptrontraining","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fifrazaib%2Fperceptrontraining","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifrazaib%2Fperceptrontraining/lists"}