{"id":19098459,"url":"https://github.com/winkjs/wink-perceptron","last_synced_at":"2025-04-30T15:26:02.211Z","repository":{"id":47969152,"uuid":"138187426","full_name":"winkjs/wink-perceptron","owner":"winkjs","description":"Multi-class classifier","archived":false,"fork":false,"pushed_at":"2023-02-28T00:24:16.000Z","size":1552,"stargazers_count":13,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T17:23:06.449Z","etag":null,"topics":["averaged-perceptron","hactoberfest","machine-learning","multi-class-perceptron","perceptron"],"latest_commit_sha":null,"homepage":"http://winkjs.org/wink-perceptron/","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/winkjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-21T15:15:02.000Z","updated_at":"2023-09-11T19:04:27.000Z","dependencies_parsed_at":"2023-01-23T19:30:34.837Z","dependency_job_id":null,"html_url":"https://github.com/winkjs/wink-perceptron","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-perceptron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-perceptron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-perceptron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-perceptron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winkjs","download_url":"https://codeload.github.com/winkjs/wink-perceptron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249517968,"owners_count":21284868,"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":["averaged-perceptron","hactoberfest","machine-learning","multi-class-perceptron","perceptron"],"created_at":"2024-11-09T03:45:58.073Z","updated_at":"2025-04-18T16:32:23.240Z","avatar_url":"https://github.com/winkjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wink-perceptron\n\nMulti-class averaged perceptron\n\n### [![Build Status](https://api.travis-ci.org/winkjs/wink-perceptron.svg?branch=master)](https://travis-ci.org/winkjs/wink-perceptron) [![Coverage Status](https://coveralls.io/repos/github/winkjs/wink-perceptron/badge.svg?branch=master)](https://coveralls.io/github/winkjs/wink-perceptron?branch=master) [![Inline docs](http://inch-ci.org/github/winkjs/wink-perceptron.svg?branch=master)](http://inch-ci.org/github/winkjs/wink-perceptron) [![dependencies Status](https://david-dm.org/winkjs/wink-perceptron/status.svg)](https://david-dm.org/winkjs/wink-perceptron) [![devDependencies Status](https://david-dm.org/winkjs/wink-perceptron/dev-status.svg)](https://david-dm.org/winkjs/wink-perceptron?type=dev) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/winkjs/Lobby)\n\n[\u003cimg align=\"right\" src=\"https://decisively.github.io/wink-logos/logo-title.png\" width=\"100px\" \u003e](http://winkjs.org/)\n\nWink Perceptron is a fast and effective way to learn linearly separable patterns from either dense or sparse data. Its averaging function results in better generalization compared to the vanilla implementation of perceptron.\n\n### Installation\n\nUse [npm](https://www.npmjs.com/package/wink-perceptron) to install:\n\n    npm install wink-perceptron --save\n\n### Getting Started\nHere is an example of predicting type of iris plant from the [Iris Data Set](https://archive.ics.uci.edu/ml/datasets/iris).\n\n```javascript\n// Load training data — the Iris Data Set obtained from\n// UCI Machine Learning Repository; it has been converted\n// into JSON format.\n// You may need to update the path in the \"require\" statement\n// according to your working directory.\nconst trainingExamples = require( 'wink-perceptron/sample-data/iris-train.json' );\n// Initialize a test data sample.\nconst testData = {\n  setosa: { sepalLength: 4.9, sepalWidth: 3, petalLength: 1.4, petalWidth: 0.2 },\n  versicolor: { sepalLength: 6.4, sepalWidth: 3.2, petalLength: 4.5, petalWidth: 1.5 },\n  virginica: { sepalLength: 7.2, sepalWidth: 3.6, petalLength: 6.1, petalWidth: 2.5 }\n};\n\n// Load wink perceptron.\nvar winkPerceptron = require( 'wink-perceptron' );\n// Instantiate wink perceptron.\nvar perceptron = winkPerceptron();\n// Define configurtaion.\nperceptron.defineConfig( { shuffleData: true, maxIterations: 21 } );\n// Learn from training data.\nperceptron.learn( trainingExamples );\n\n// Attempt prediction for each iris plant type.\nconsole.log( perceptron.predict( testData.setosa ) );\n// -\u003e Iris-setosa\nconsole.log( perceptron.predict( testData.versicolor ) );\n// -\u003e Iris-versicolor\nconsole.log( perceptron.predict( testData.virginica ) );\n// -\u003e Iris-virginica\n```\nTry [experimenting with this example on Runkit](https://npm.runkit.com/wink-perceptron) in the browser.\n\n### Documentation\nCheck out the [perceptron API documentation](http://winkjs.org/wink-perceptron/) to learn more.\n\n### Need Help?\n\nIf you spot a bug and the same has not yet been reported, raise a new [issue](https://github.com/winkjs/wink-perceptron/issues) or consider fixing it and sending a pull request.\n\n### About wink\n[Wink](http://winkjs.org/) is a family of open source packages for **Statistical Analysis**, **Natural Language Processing** and **Machine Learning** in NodeJS. The code is **thoroughly documented** for easy human comprehension and has a **test coverage of ~100%** for reliability to build production grade solutions.\n\n### Copyright \u0026 License\n\n**wink-perceptron** is copyright 2017-18 [GRAYPE Systems Private Limited](http://graype.in/).\n\nIt is licensed under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinkjs%2Fwink-perceptron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinkjs%2Fwink-perceptron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinkjs%2Fwink-perceptron/lists"}