Part 1Introduction
“Neural network” is a concept known for a long time. At the beginning of the two thousandth, while studying at the university, I ran into this curious thing. After reading the non-fiction literature on this topic, I concluded that it was at least “funny” and I had sympathy. And, mainly, because the neural network is the “younger brother” of our human mind.
Until 2019, these gizmos seemed to me nothing more than just funny toys, but amid the renewed huge interest in this topic, I decided to “get a closer look” at them better. I have to say right away that the topic of pattern recognition has never been particularly interesting for me, yes, there is a set of “funny pictures”, you need to define something, or recognize small letters. - So what?!
No, it is much more interesting to work with textual information. After all, cars have always been not particularly strong in the "humanitarian direction." For this purpose, a lot of predicates were blocked and even the whole language and predicate logic appeared, but ... This toolkit was too weak to realize the thinking abilities of the human mind on another "element base".
')
Inspired by the fact that neural networks have already taught to classify information, and not just recognize the images, I decided to touch this outlandish thing again.
I will say right away, those who write that neural networks are “easy” simplify the problem too much. And those who write that "difficult" - exaggerate. But first things first. It is not enough, I think, to simply read some near-scientific sources describing their charms, so I decided to study this “science” on the example of a specific task.
Task
Yes, but the question is, what task to take so that it does not turn out to be too difficult as a training one? I thought and thought and thought up (!) - Body Mass Index (BMI). And what? - The formula is known, it is quite simple and a lot of data can be formed for training. - Solved!
As the first neural network, I decided to take a perceptron - an artificial neuron, at the inputs of which height and weight are fed, and at the output we get the BMI predicted by the neural network.

As a medium for work, I decided to choose MS Excel - it is very convenient to create tables and work with them, and as a development tool - VBA language. The first thing to create is the initialization tab of the neural network - the weighting tab, I called it “Neural Network”. On this tab, weighting factors will be displayed, as well as, they will be saved here in the process of learning the neural network (NN).

The second tab - on which the reference data will be stored. I called it "Learning." Here we will control the learning process of our NA.

Well, the third tab - "Data", here, in fact, will be all the useful action.

Procedures
To work with the NA, we will need the following procedures (they are designed in the form of macro commands with their own hot launch keys):
Ctrl + I (Initialise) - initialization of weights W1 and W2 with random values;
Ctrl + R (pRepare) - preparation of reference data;
Ctrl + T (Teach) - learning NA;
Ctrl + E (Execute) - executes the BMI evaluation of the data set.
Neural network initialization
First, we initialize our weights with random values in the range from 0 to 1 (not inclusive). This makes a simple procedure on VBA.

Formation of reference values
Since the exact formula for calculating the BMI is known, we proceed to the formation of reference data.

The data will be formed on the tab “Data” (I set 100 values). Later we will select part of this data as a training set and copy it to the “Training” tab. The prepare () procedure is responsible for generating data. Now you can go to the tab "Training", but this is in the second part of the article.

The end of the first part.
PS I did not write a long article, so that the information was not too much and the focus of the reader’s attention did not dissipate.