This repository contains an two implementations of a perceptron classifier in Python. The perceptron is a simple binary classification algorithm suitable for linearly separable data. This implementation includes functions for training the perceptron weights, plotting the classification results, and evaluating accuracy.
Before running the program, ensure you have Matplotlib installed. You can install Matplotlib using Python's package manager, pip. Here's how you can do it
pip install matplotlib This command will download and install the latest version of Matplotlib and its dependencies from the Python Package Index (PyPI).
Open your CLI and execute the following command conda install matplotlib This command will install Matplotlib and its dependencies from the Anaconda repository.
The Matplotlib version of the single-layer perceptron utilizes Matplotlib, a popular plotting library in Python, to provide graphical representation of the perceptron's behavior. This version offers additional functionalities such as visualizing the training process, plotting decision boundaries, and displaying classification results in a graphical format.
The simple version of the single-layer perceptron is implemented using NumPy, a powerful numerical computing library in Python. This version is designed for use in the console interface and provides basic functionalities such as training the perceptron's weights and making predictions.
To use the perceptron classifier
- Clone the repository to your local machine.
- Run the python script using this command python filename.py
- Modify the script or integrate it into your project as needed.
- Python 3.x
- matplotlib
- numpy
This project is licensed under the MIT License.