Skip to content

A Python implementation of the Perceptron algorithm tested on on a generated dataset that is linearly separable.

Notifications You must be signed in to change notification settings

BigB021/Perceptron-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Perceptron Implementation

This project contains a Python implementation of the Perceptron algorithm, a fundamental algorithm for supervised learning in the field of Machine Learning. It includes a class definition for the Perceptron and a script for testing the implementation on a generated dataset that is linearly separable.

Table of Contents

  1. About the Project
  2. Getting Started
  • Prerequisites
  • Installation
  1. Usage
  2. Contributing
  3. License
  4. Contact
  5. Acknowledgments

About The Project

The Perceptron algorithm is a type of linear classifier, i.e., it attempts to classify given inputs into two distinct classes by finding a suitable linear boundary between them. The implementation provided in this project showcases the algorithm's ability to learn this boundary and make predictions on new data.

This project is structured into two main parts:

Perceptron: A Python class that encapsulates the Perceptron algorithm's learning process and prediction mechanism. generate_data: A utility function for generating a synthetic, linearly separable dataset for testing the Perceptron.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

This project requires a Python environment (Python 3.6 or newer) and the installation of certain Python packages listed below:

numpy matplotlib

Installation

Clone the repo

git clone https://github.com/your_username_/Perceptron-Project.git Install Python packages

pip install numpy matplotlib

Usage

To test the Perceptron implementation with the generated dataset, run the script from the command line:

python main_scriptt.py This will generate a dataset, train the Perceptron model, and display a plot showing the classified points along with the decision boundary.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Fork the Project Create your Feature Branch (git checkout -b feature/AmazingFeature) Commit your Changes (git commit -m 'Add some AmazingFeature') Push to the Branch (git push origin feature/AmazingFeature) Open a Pull Request

License

Distributed under the MIT License.

Contact

Youssef Aitbouddroub - youssefaitbouddroub@gmail.com

Project Link

About

A Python implementation of the Perceptron algorithm tested on on a generated dataset that is linearly separable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages