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.
- About the Project
- Getting Started
- Prerequisites
- Installation
- Usage
- Contributing
- License
- Contact
- Acknowledgments
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.
To get a local copy up and running follow these simple steps.
This project requires a Python environment (Python 3.6 or newer) and the installation of certain Python packages listed below:
numpy matplotlib
Clone the repo
git clone https://github.com/your_username_/Perceptron-Project.git Install Python packages
pip install numpy matplotlib
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.
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
Distributed under the MIT License.
Youssef Aitbouddroub - youssefaitbouddroub@gmail.com