Visualization of the learning algorithm for a single perceptron type neuron.
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.
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.
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.
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.
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.
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.
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.
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