-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1022 from Shantnu-singh/Shantnu-singh-perceptron
Added Perceptron Network
- Loading branch information
Showing
2 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Here is a short README file for your Perceptron implementation: | ||
# Perceptron Implementation | ||
|
||
This repository contains a simple implementation of the Perceptron algorithm for binary classification. The Perceptron is a type of linear classifier that updates its weights and bias based on the errors made on the training data. | ||
|
||
## Requirements | ||
|
||
- numpy | ||
- pandas | ||
- matplotlib | ||
- scikit-learn | ||
|
||
You can install these dependencies using pip: | ||
|
||
```bash | ||
pip install numpy pandas matplotlib scikit-learn | ||
``` | ||
|
||
## Usage | ||
|
||
The `perceptron` class is implemented with methods to fit the model to the training data and make predictions on new data. The dataset used in the example is generated using `make_blobs` from `scikit-learn`. | ||
|
||
## Results | ||
|
||
The accuracy of the model is printed after training and predicting on the test set. Additionally, a plot is generated to visualize the decision boundary learned by the perceptron. | ||
|
||
## How to Use This Repository | ||
|
||
- Clone this repository to your local machine. | ||
|
||
```bash | ||
git clone https://github.com/Niketkumardheeryan/ML-CaPsule/Perceptron From Scratch | ||
``` | ||
- For Python implementations and visualizations: | ||
|
||
1. Ensure you have Jupyter Notebook installed | ||
|
||
```bash | ||
pip install jupyter | ||
``` | ||
2. Navigate to the project directory in your terminal. | ||
3. Open perceptron.ipynb. |