https://github.com/oslint/perceptron-algorythm-java
This project implements a Perceptron, which is a fundamental algorithm used in machine learning for binary classification tasks. The Perceptron learns from a set of training data and adjusts its weights to classify new data points.
https://github.com/oslint/perceptron-algorythm-java
java java-perceptron perceptron perceptron-algorithm perceptron-java perceptron-learning-algorithm
Last synced: 5 months ago
JSON representation
This project implements a Perceptron, which is a fundamental algorithm used in machine learning for binary classification tasks. The Perceptron learns from a set of training data and adjusts its weights to classify new data points.
- Host: GitHub
- URL: https://github.com/oslint/perceptron-algorythm-java
- Owner: OsLint
- Created: 2024-03-20T09:44:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-28T08:31:01.000Z (about 1 year ago)
- Last Synced: 2024-12-05T23:09:34.945Z (7 months ago)
- Topics: java, java-perceptron, perceptron, perceptron-algorithm, perceptron-java, perceptron-learning-algorithm
- Language: Java
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 🧠 Perceptron Implementation
This project implements a Perceptron, which is a fundamental algorithm used in machine learning for binary classification tasks. The Perceptron learns from a set of training data and adjusts its weights to classify new data points.
It was made for the NAI (tools of AI) class at Pjait.#### 📋 Perceptron Class
- **Functionality**: The `Perceptron` class provides methods for training the Perceptron using training data, adjusting weights, classifying vectors, and testing the Perceptron's accuracy.
- **Training**: The `trainPerceptron()` method iteratively adjusts weights until the Perceptron is trained for the given training data.
- **Classification**: The `classifyVector()` method predicts the class of a data vector based on learned weights.
- **Testing**: The `testPerceptronForListOfData()` method evaluates the Perceptron's accuracy on a test dataset.#### 🚀 Main Class
- **Initialization**: The `Main` class initializes the Perceptron with training data and trains it.
- **Testing**: It then tests the trained Perceptron on a test dataset and prints the number of correctly classified examples and the experiment's accuracy.
- **User Input**: The `getVectorInput()` method allows users to input their own data vectors and see the predicted class label.#### 📁 Project Structure
- `Perceptron.java`: Contains the implementation of the Perceptron algorithm.
- `Main.java`: Entry point of the application, responsible for initializing, training, testing, and user interaction.
- `DataReader.java`: Utility class for reading data from files.
- `Data.java`: Class representing individual data instances.
- `DataInput.java`: Utility class for user input.#### 🛠️ Dependencies
- Java 8 or higher