Shewhart control charts
PRO-Analyst +AI
for Windows, Mac, Linux

Register of Russian software (entry No. 18857 dated 09/05/2023)

Purchase software

Machine learning (ML). Training mathematical models with an algorithm Neural networks regression and classification methods

Button [Training and applying a mathematical model using neural networks (regression and classification).]

Neural networks are a type of machine learning/deep learning algorithm that mimics the functioning of the human brain. They consist of multiple layers of neurons that connect to each other and interact with each other through an activation function. Neural networks use input layers (data as input), hidden layers (contain artificial neurons that process the data), and output layers (which generate output from the processed data). Neural network algorithm falls under the category of supervised learning algorithms and is used to predict both continuous (regression) and categorical (classification) output variables. This feature of our software makes machine learning technology accessible to a wide range of users.

You can download an example of a structured spreadsheet file for creating a mathematical model and prediction by a Neural Network algorithm for regression analysis: XLSX and for classification XLSX .

Structured data from table files can be used for import: Excel workbook (*.xlsx); Excel binary workbook (*.xlsb); OpenDocument Spreadsheet (*.ods).

Where is it used?

Data analysis using the neural network method can be used:

  • as an effective (cost, time, resources) alternative" Planning experiments "to search for optimal modes of input parameters;
  • for preliminary or alternative assessment of output parameters when measurement procedures for such parameters are carried out by expensive and/or time-consuming tests;
  • for expert decision support systems (DSS), when decisions are associated with the risk of human errors.
Data Model Files

Our software can use trained neural network mathematical models for the scikit-learn library, created on other computers and saved in files (*.sav).

Neural networks by regression method for continuous quantities (measurements) at the input and output
Window for jumping to machine learning (ML) functions

Figure 1. Window for accessing machine learning (ML) functions. A list of drop-down menus is displayed when you hover the mouse over the main menu item.

A tooltip is displayed when you hover the mouse over the button to go to the functions of neural networks (regression and classification).

Figure 2. Machine learning (ML) functions window. A tooltip is displayed when you hover the mouse over the button to go to the functions of neural networks (regression and classification).

A drop-down tooltip appears when you hover your mouse over the button to go to the control panel for neural network algorithms (regression)

Figure 3. Window for transition to functions for managing machine learning algorithms using neural network methods (regression and classification). A drop-down tooltip appears when you hover your mouse over the button to go to the control panel for neural network algorithms (regression).

Window of the function for controlling the machine learning algorithm using the neural network method (regression). The variable to be predicted is selected. The default values ​​are set: the number of hidden layers and the number of neurons in each hidden layer, the number of iterations (epochs).

Figure 4. Window of the function for controlling the machine learning algorithm using the neural network method (regression). The variable to be predicted is selected. The default values ​​are set: the number of hidden layers and the number of neurons in each hidden layer, the number of iterations (epochs). The checkbox is checked to save the model in the appropriate application folder (SCCPython\resources\Model_AI). The characteristics and accuracy indicators of the trained mathematical model are displayed above the neural network diagram. The plotting area displays the “Neural network diagram, Actual vs. Predicted values” graph.

Window of the function for controlling the machine learning algorithm using the neural network method (regression). By clicking with the mouse cursor, a drop-down list with a selection of graphs for evaluating the neural network model opens.

Figure 5. Window of the function for controlling the machine learning algorithm using the neural network method (regression). The values ​​of the fields for the number of hidden layers and neurons in each hidden layer of the neural network have been changed.

Window of the function for controlling the machine learning algorithm using the neural network method (regression). A drop-down list with types of mathematical model evaluation graphs is opened.

Figure 6. Window of the function for controlling the machine learning algorithm using the neural network method (regression). A drop-down list with types of mathematical model evaluation graphs is opened.

Window of the function for controlling the machine learning algorithm using the neural network method (regression). The plotting area displays a graph [Current vs. Predicted values] for the test data set.

Figure 7. Window of the function for controlling the machine learning algorithm using the neural network method (regression). The plot area displays the "Actual vs. Predicted Values" graph for the test data set.

Window of the control function for the application of the mathematical model of the neural network (regression). The graph is scaled along the X axis to display fewer points (from 140 to 196) using the [Scale] tool below the graph.

Figure 8. Window of the function for controlling the application of the mathematical model of the neural network (regression). The plot area displays the "Actual vs. Predicted Values" graph for the test data set. The graph is scaled on the X axis to show fewer points (from 140 to 196) using the Zoom tool below the graph.

The function of loading a file with a saved mathematical model of a neural network (regression) and applying it to your data for prediction is similar to the function described on the page Decision trees (regression) .

If your imported data contains one or more explanatory variable columns with categorical values, such as [male, female], an automatic One-Hot Encoding procedure will be performed to convert the data into new numeric coded columns [0, 1]. The hot encoded data will be saved in the original [xlsx] file in a new sheet.

Reasons why the accuracy of a mathematical model using the Neural Network (regression) method can give low accuracy
  1. Limited amount of data: If you have a limited amount of data to train a model, the neural network may not have enough information to create an accurate model. Large and varied data is often needed to train a neural network with high accuracy.
  2. Inappropriate Network Architecture: Selecting a suitable neural network architecture is very important. If the chosen neural network architecture is not suitable for a specific data set or regression problem, it may result in poor model accuracy. It is necessary to experiment with different types of layers, number of hidden units, and network structure to achieve better results.
  3. Not enough training: Training a neural network can be a complex process, requiring a sufficient number of epochs and careful tuning of hyperparameters. If the model is not trained for enough epochs or with incorrectly selected hyperparameters, it can result in low model accuracy.
  4. Overfitting: A neural network may experience overfitting problem if the training set is too small and the model has too many parameters. This can lead to poor generalization ability of the model and low accuracy on new data. When retraining, it is recommended to use regularization methods, such as reducing the learning rate or introducing restrictions on the norm of weights.
  5. Incorrect data preprocessing: Incorrect data preprocessing, such as scaling, normalization, or outlier handling, can significantly impact the accuracy of a neural network model. It is necessary to carefully analyze and prepare the data before training the model.
  6. Imbalanced data: If your data set contains an uneven number of examples of different values ​​of the target variable, this can lead to poor model accuracy. In such cases, example weighting techniques can be applied.
  7. Problems with data sampling: If the data is randomly or incorrectly selected, it can lead to low model accuracy. It is important to carefully select the data so that it is representative of the regression problem.
Neural networks by classification method for continuous quantities (measurements) as input and categorical data (classes) as output

Example 1. Based on the results of the patient’s clinical tests, it is necessary to make a decision on his diagnosis, for example, sick/not sick.

Example 2. It is necessary to draw a conclusion about the belonging of an object or event to a specific class (type) based on the results of measurements of many of its characteristics (properties).

Window of the function for managing training and evaluation of the mathematical model of a neural network (classification).

Figure 9. Window of the function for managing training and evaluation of the mathematical model of a neural network (classification). A drop-down tooltip is displayed when you hover the mouse over the button to go to the control panel for neural network algorithms using the classification method.

Window of the function for managing training and evaluation of the mathematical model of a neural network (classification). The predicted categorical variable (class variable) is selected. The default values ​​are set: the number of hidden layers and the number of neurons in each hidden layer, the number of iterations (epochs).

Figure 10. Window of the function for managing training and evaluation of the mathematical model of a neural network (classification). The predicted categorical variable (class variable) is selected. The default values ​​are set: the number of hidden layers and the number of neurons in each hidden layer, the number of iterations (epochs). The checkbox is checked to save the model in the appropriate application folder (SCCPython\resources\Model_AI). The characteristics and accuracy indicators of the trained mathematical model are displayed above the neural network diagram. A drop-down list with graphs for evaluating the mathematical model is opened. The plotting area displays the “Neural network diagram, Actual vs. Predicted values” graph.

Window of the function for managing training and evaluation of a mathematical model of a neural network (classification) with graphs of [confusion matrix]

Figure 11. Window of the function for managing the training and evaluation of the mathematical model of the neural network (classification) with graphs of the “confusion matrix”.

The function of loading a file with a saved mathematical model of a neural network (classification) and applying it to your data for prediction is similar to the function described on the page Decision trees (classification) .

If your imported data contains one or more explanatory variable columns with categorical values, such as [male, female], an automatic One-Hot Encoding procedure will be performed to convert the data into new numeric coded columns [0, 1]. The hot encoded data will be saved in the original [xlsx] file in a new sheet.

Reasons why the accuracy of a mathematical model using the Neural Network method (classification) can give low accuracy
  1. Insufficient data: If the model is trained on a small amount of data, it may result in low accuracy. The more data available for training, the more accurate the model can be.
  2. Wrong Neural Network Architecture: Choosing a suitable neural network architecture is important. Failure to match the architecture to the data or classification task can affect the accuracy of the model.
  3. Incorrectly chosen hyperparameters: Neural networks have many hyperparameters that need to be properly tuned. Wrong choice of hyperparameters can lead to low model accuracy.
  4. Using Incorrect Features: Selecting correct and relevant features is also important. Using inappropriate or irrelevant features may reduce classification accuracy.
  5. Incorrect data preprocessing: Incorrect data preprocessing can affect the accuracy of the neural network model. This may include incorrect scaling, normalization, or handling of outliers.
  6. Wrong choice of loss function: The loss function of a neural network must be suitable for a particular classification task. Choosing the wrong loss function can affect the accuracy of the model.