{"id":18605875,"url":"https://github.com/varshneydevansh/perceptron","last_synced_at":"2025-10-06T14:45:57.332Z","repository":{"id":160355498,"uuid":"113277202","full_name":"varshneydevansh/perceptron","owner":"varshneydevansh","description":null,"archived":false,"fork":false,"pushed_at":"2017-12-06T06:44:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T19:47:46.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Processing","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/varshneydevansh.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,"zenodo":null}},"created_at":"2017-12-06T06:18:26.000Z","updated_at":"2017-12-06T06:24:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e9e4ce2-cf0d-4f28-ade4-46fa97be7159","html_url":"https://github.com/varshneydevansh/perceptron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/varshneydevansh/perceptron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varshneydevansh%2Fperceptron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varshneydevansh%2Fperceptron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varshneydevansh%2Fperceptron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varshneydevansh%2Fperceptron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varshneydevansh","download_url":"https://codeload.github.com/varshneydevansh/perceptron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varshneydevansh%2Fperceptron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278628784,"owners_count":26018476,"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-10-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2024-11-07T02:23:24.871Z","updated_at":"2025-10-06T14:45:57.327Z","avatar_url":"https://github.com/varshneydevansh.png","language":"Processing","funding_links":[],"categories":[],"sub_categories":[],"readme":"# perceptron\n\n### Build using [Processing](https://processing.org/)\n\nProcessing is an open source computer programming language and integrated development environment (IDE) built for the electronic arts, new media art, and visual design communities with the purpose of \nteaching the fundamentals of computer programming in a visual context, and to serve as the foundation for electronic sketchbooks.\n\nThe project was initiated in 2001 by Casey Reas and Benjamin Fry, both formerly of the Aesthetics and Computation Group at the MIT Media Lab. In 2012, they started the Processing Foundation along with \n[Daniel Shiffman](https://github.com/shiffman), who joined as a third project lead. Johanna Hedva joined the Foundation in 2014 as Director of Advocacy.One of the aims of Processing is to allow non-programmers to start computer programming aided by visual feedback. \nThe Processing language builds on the Java language, but uses a simplified syntax and a graphics user interface.\n\nIn *machine learning*, the perceptron is an algorithm for supervised learning of binary classifiers (functions that can decide whether an input, represented by a vector of numbers, belongs to some specific class or not).\nIt is a type of linear classifier, i.e. a classification algorithm that makes its predictions based on a linear predictor function combining a set of weights with the feature vector. The algorithm allows for online learning, \nin that it processes elements in the training set one at a time.\n\n## Neural networks must learn\n\nUnlike traditional algorithms, neural networks cannot be ‘programmed’ or ‘configured’ to work in the intended way. \nJust like human brains, they have to learn how to accomplish a task. Roughly speaking, there are three learning strategies:\n\n### Supervised learning\nThe easiest way. Can be used if a (large enough) set of test data with known results exists. \nThen the learning goes like this: \n * Process one dataset. \n * Compare the output against the known result. \n * Adjust the network and repeat. \nThis is the learning strategy we’ll use here.\n\n### Unsupervised learning\nUseful if no test data is readily available, and if it is possible to derive some kind of cost function from the desired behavior. \nThe cost function tells the neural network how much it is off the target. \nThe network then can adjust its parameters on the fly while working on the real data.\n\n### Reinforced learning\nThe ‘carrot and stick’ method. Can be used if the neural network generates continuous action. \nFollow the carrot in front of your nose! If you go the wrong way - ouch. \nOver time, the network learns to prefer the right kind of action and to avoid the wrong one.\n\nOk, now we know a bit about the nature of artificial neural networks, \nbut what exactly are they made of? What do we see if we open the cover and peek inside?\n\n\n## Neurons: The building blocks of neural networks\n\n\nThe very basic ingredient of any artificial neural network is the artificial neuron. \nThey are not only named after their biological counterparts but also are modeled after the behavior of the neurons in our brain.\n\n## Biology vs technology\nJust like a biological neuron has dendrites to receive signals, a cell body to process them, \nand an axon to send signals out to other neurons, the artificial neuron has a number of input channels, \na processing stage, and one output that can fan out to multiple other artificial neurons.\n![](https://appliedgo.net/media/perceptron/neuron.png)\n\n## The perceptron\n\nThe most basic form of an activation function is a simple binary function that has only two possible results.\n\n![](https://appliedgo.net/media/perceptron/heaviside.png)\n\nDespite looking so simple, the function has a quite elaborate name: [The Heaviside Step function](https://en.wikipedia.org/wiki/Heaviside_step_function). \nThis function returns 1 if the input is positive or zero, and 0 for any negative input. \nA neuron whose activation function is a function like this is called a perceptron.\n\n### Can we do something useful with a single perceptron?\n\nIf you think about it, it looks as if the perceptron consumes a lot of information for very little output - just 0 or 1. \nHow could this ever be useful on its own?\n\nThere is indeed a class of problems that a single perceptron can solve. \nConsider the input vector as the coordinates of a point. For a vector with n elements, this point would live in an n-dimensional space. \nTo make life (and the code below) easier, let’s assume a two-dimensional plane. Like a sheet of paper.\n\nFurther consider that we draw a number of random points on this plane, \nand we separate them into two sets by drawing a straight line across the paper:\n\n![](https://appliedgo.net/media/perceptron/pointsandline.png)\n\nThis line divides the points into two sets, one above and one below the line. (The two sets are then called [linearly separable](https://en.wikipedia.org/wiki/Linear_separability).)\n\nA single perceptron, as bare and simple as it might appear, is able to learn where this line is, and when it finished learning, it can tell whether a given point is above or below that line.\n\nImagine that: A single perceptron already can learn how to classify points!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarshneydevansh%2Fperceptron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarshneydevansh%2Fperceptron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarshneydevansh%2Fperceptron/lists"}