This article describes models and parameters for those who are new to deep learning.
The purpose is to help readers understand what a model is, what a parameter is, and why AI can be created with these two.
--Knowledge of functions in mathematics -$ y = ax + b $ represents a straight line -$ y = ax ^ 2 + bx + c $ represents a parabola
In AI development such as deep learning, AI always requires ** input and output **. For example, in the case of image recognition AI, the input is the image to be recognized and the output is the name of the recognized animal.
You can create AI by finding the relational expression between y and x, that is, $ f (x) $ such that $ y = f (x) $ when the input is x and the output is y.
I will show you the procedure to actually make AI with simple data. Look at the table
Grip strength[kg] | Ball flight distance[m] |
---|---|
35 | 71 |
45 | 92 |
38 | 76 |
15 | 31 |
10 | 19 |
20 | 39 |
This table shows the flight distance y [m] that a person with grip strength x [kg] flies when throwing the ball. This is graphed with the x-axis as the grip strength and the y-axis as the flight distance of the ball.
Looking at the arrangement of these points, I think that the relationship between grip strength and the flight distance of the ball can be expressed by a straight line. The mathematical expression for a straight line is $ y = ax + b $.
This time, the x-axis is the grip strength [kg] and the y-axis is the ball flight distance [m], so if x is the grip strength [kg] and y is the ball flight distance [m], the relationship $ y = ax + b $ holds. Can be predicted from this figure.
Then find a and b. Originally, it is calculated by a method such as the least squares method, but it is difficult, so I will not talk about it here.
If a = 2 and b = 0 this time, the straight line will almost overlap all the points as shown in the figure below. (The dotted line in the figure below is $ y = 2x + 0 $.)
This straight line ** y = 2x + 0 ** can be used to predict the distance at which the ball can be thrown by people with different grip strengths. For example, a person with a grip strength of 50 [kg] will be able to throw a ball about 100 [m] from $ y = 2 x 50 = 100 $.
In the example shown above, we expected the relationship between x and y to be $ y = ax + b $. At this time, the form itself of $ y = ax + b $ is called a model, and characters other than x and y such as a and b are called parameters.
For example, in the above example, if the model is $ y = ax ^ 5 + bx ^ 4 + cx ^ 3 + dx ^ 2 + ex + f $, it will be as shown in the figure below. (Parameters a to f were obtained by Excel.)
It passes over all the points, but this model doesn't seem to properly represent the relationship between grip strength and ball distance. If you don't design a proper model like this, the accuracy of AI will drop significantly.
Actual data is difficult to graph and the models are complicated and difficult to understand. However, even if you look at the code of the pioneer, it will be easier to get into your head if you read it while understanding that you are actually doing something like this.
Actually, I don't think there is much correlation between grip strength and ball flight distance.
Recommended Posts