Skip to content

Visualization of the learning algorithm for a single perceptron type neuron.

Notifications You must be signed in to change notification settings

TR0U8L3-gif/flutter_perceptron_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perceptron Simulation

Visualization of the learning algorithm for a single perceptron type neuron.

Project description

The assumption of the project was to build an application that works on all operating systems. I created a mobile application using the Flutter framework and the Dart language.

The application simulates a perceptron, which is one of the basic models in the field of machine learning. The aim of the project is to create a tool that accepts data from a file and trains the perceptron to identify the correct answers based on the provided training data.

Theoretical basis

A perceptron is a simple mathematical model that mimics the action of a single neuron in the brain. It is the basic element of artificial neural networks.

The perceptron consists of inputs and outputs, weights, an activation function, a learning rate, and a threshold. The inputs represent the signals we feed into the perceptron. We assign a weight to each input, which determines how important the signal is to the perceptron. The activation function decides whether the perceptron should forward the signal further in the network or not. The learning rate determines how far the perceptron takes towards optimizing the weights. Bias is the value that is added to the sum of the weighted input signals in the perceptron before passing them to the activation function. Bias allows you to shift the activation threshold, thereby controlling the perceptron's sensitivity to input.

During learning, the perceptron "learns" to adjust the weights of its inputs to respond correctly to the inputs. This process is called supervised learning. During training, we present input examples to the perceptron along with the desired outputs. Based on these results, the perceptron adjusts its weights to better represent the desired behavior.

Learning the perceptron involves iteratively presenting training examples, modifying the weights, and continuously checking how well the perceptron does at predicting outcomes based on new data. This process is repeated many times until the perceptron reaches a satisfactory accuracy in prediction.

Main features of the application:

Loading data:

The application allows the user to load training data from a file. The data can be in text or CSV format, depending on the user's preferences.

Data processing:

After loading the data, the application processes them in order to prepare them for the learning process. This includes splitting the training and test sets, and converting them to the appropriate format for the perceptron.

Perceptron learning:

The app performs perceptron learning based on the provided training data. The learning algorithm adjusts the perceptron weights to minimize prediction error and correctly classify the data.

Testing and evaluation:

After the training process is completed, the application allows testing on test data and evaluating the effectiveness of the perceptron. This may include the calculation of metrics such as accuracy, precision, and recall to assess classification quality.

Visualization of the results:

The application can also provide visualizations of the perceptron training results, such as graphs showing the change in the perceptron weights during training, or graphs presenting the perceptron's effectiveness on test data.

Source code

Models (perceptron, activation function, inputs and outputs): link

Views (start screen, data loading screen, etc): link

Controllers (route management, simulation management): link

Sample perceptron learning data file: link

App appearance:

Main screen:

File example screen:

Loading data:

Separating data:

Selecting activation function:

Selecting learning rate:

Visualization of the results:

About

Visualization of the learning algorithm for a single perceptron type neuron.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages