An open API service indexing awesome lists of open source software.

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.

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