Meaning of deep learning models and parameters

Overview

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.

Prerequisite knowledge

--Knowledge of functions in mathematics -$ y = ax + b $ represents a straight line -$ y = ax ^ 2 + bx + c $ represents a parabola

How AI can be done

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.

Actual example

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.

image.png

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 $.)

image.png

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 $.

What are models and parameters?

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.

Importance of determining a model

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.)

image.png

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.

Conclusion

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.

Supplement

Actually, I don't think there is much correlation between grip strength and ball flight distance.

Recommended Posts

Meaning of deep learning models and parameters
Deep learning 1 Practice of deep learning
A memorandum of studying and implementing deep learning
Parallel learning of deep learning by Keras and Kubernetes
Count the number of parameters in the deep learning model
Deep running 2 Tuning of deep learning
DNN (Deep Learning) Library: Comparison of chainer and TensorFlow (1)
Deep reinforcement learning 2 Implementation of reinforcement learning
Collection and automation of erotic images using deep learning
[Deep Learning from scratch] Implementation of Momentum method and AdaGrad method
Examination of Forecasting Method Using Deep Learning and Wavelet Transform-Part 2-
Classify CIFAR-10 image datasets using various models of deep learning
Significance of machine learning and mini-batch learning
Organize machine learning and deep learning platforms
Deep Learning
Othello-From the tic-tac-toe of "Implementation Deep Learning" (3)
Introduction to Deep Learning ~ Convolution and Pooling ~
Try deep learning of genomics with Kipoi
Visualize the effects of deep learning / regularization
Sentiment analysis of tweets with deep learning
Learning record of reading "Deep Learning from scratch"
Othello-From the tic-tac-toe of "Implementation Deep Learning" (2)
Graph of the history of the number of layers of deep learning and the change in accuracy
Examination of exchange rate forecasting method using deep learning and wavelet transform
The story of doing deep learning with TPU
Chainer and deep learning learned by function approximation
[For beginners of artificial intelligence] Machine learning / Deep Learning Programming Learning path and reference books
Numerai Tournament-Fusion of Traditional Quants and Machine Learning-
Organize the meaning of methods, classes and objects
Deep Learning Memorandum
[Learning memo] Deep Learning from scratch ~ Implementation of Dropout ~
Start Deep learning
Basic understanding of stereo depth estimation (Deep Learning)
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
Extend and inflate your own Deep Learning dataset
Build a python environment to learn the theory and implementation of deep learning
Python Deep Learning
Introduction to Deep Learning ~ Localization and Loss Function ~
Deep learning × Python
Implementation of Deep Learning model for image recognition
Deep learning learned by implementation (segmentation) ~ Implementation of SegNet ~
About shallow and deep copies of Python / Ruby
Overview and useful features of scikit-learn that can also be used for deep learning
Python vs Ruby "Deep Learning from scratch" Chapter 1 Graph of sin and cos functions
Deep Learning of object detection 7 papers to read and point summary [Road to Efficient Det]
Mayungo's Python Learning Note: List of stories and links
I installed and used the Deep Learning library Chainer
"Deep Learning from scratch 2" Self-study memo (No. 21) Chapters 3 and 4
Deep learning image analysis starting with Kaggle and Keras
About testing in the implementation of machine learning models
Application of Deep Learning 2 made from scratch Spam filter
Techniques for understanding the basis of deep learning decisions
Othello ~ From the tic-tac-toe of "Implementation Deep Learning" (4) [End]
Extract music features with Deep Learning and predict tags
Overview of generalized linear models and implementation in Python
Artificial intelligence, machine learning, deep learning to implement and understand
Cats are already tired of loose fluffy deep learning
DEEP PROBABILISTIC PROGRAMMING --- "Deep Learning + Bayes" Library --- Introduction of Edward
[TF] How to save and load Tensorflow learning parameters
First Deep Learning ~ Struggle ~
Python: Deep Learning Practices