https://github.com/palaszontko/python-binary-perceptron-classifier
https://github.com/palaszontko/python-binary-perceptron-classifier
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/palaszontko/python-binary-perceptron-classifier
- Owner: Palaszontko
- Created: 2025-03-23T12:55:30.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2025-03-23T20:42:33.000Z (about 1 month ago)
- Last Synced: 2025-03-23T21:30:07.414Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Perceptron Classifier
Python implementation of a binary classifier using single-layer perceptron with delta rule learning.
**Features**
- Δelta rule weight updates
- Automatic threshold adjustment
- Interactive prediction mode
- Class-specific accuracy reports
- Continuous learning option**Usage**
1. CSV format: feature1;feature2;...;class
2. Exactly 2 unique class tags required
3. Run: python perceptron.py**Data Requirements**
- Training/test files: data/trainData.csv, data/testData.csv
- Example row: 6.8;3.2;5.9;2.3;ClassA**Key Parameters**
- Learning rate (alpha): 0.1 (hardcoded)
- Random weights/threshold: [-5,5] range**Output**
Accuracy: 92.5%
Accuracy for ClassA: 95.2%
Accuracy for ClassB: 89.3%**Interactive Commands**
- Test samples: 0.8;1.5 format
- Exit: exit
- Retrain: y after imperfect results