Skip to content

Commit

Permalink
Merge pull request #1022 from Shantnu-singh/Shantnu-singh-perceptron
Browse files Browse the repository at this point in the history
Added Perceptron Network
  • Loading branch information
invigorzz313 authored Jul 30, 2024
2 parents a2f5022 + 1fb5b11 commit f11fcec
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 0 deletions.
156 changes: 156 additions & 0 deletions Perceptron From Scratch/perceptron.ipynb

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions Perceptron From Scratch/readmd.md
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.

0 comments on commit f11fcec

Please sign in to comment.