当前位置:网站首页>Loss function -- cross entropy loss function
Loss function -- cross entropy loss function
2022-07-29 06:46:00 【yc_ ZZ】
Understand the cross entropy loss function
One 、 Definition
All algorithms in machine learning need to maximize or minimize a function , This function is called “ Objective function ”. among , We usually minimize a class of functions , be called “ Loss function ”. It can be based on the predicted results , Measure the prediction ability of the model .
Loss functions can be roughly divided into two categories : Loss function of classification problem and Loss function of regression problem
Two 、 Cross entropy loss function :
Knowledge preparation :
entropy : Indicates the degree of uncertainty of a system , Or a systematic The level of confusion
1、 Information entropy : Introduce entropy into information theory , Name it “ Information entropy ”

Formula application :
The information entropy here means The level of confusion Or is it uncertainty 

2、 KL The divergence ( Relative entropy ):
KL The divergence : Is an asymmetric measure of the difference between two probability distributions .
Popular parlance is used to measure the distance between two different distributions of the same random variable 

Formula application :
The formula is distorted :

Cross entropy :
Cross entropy is mainly used to measure the same random variable X Of Forecast distribution Q And the real distribution P Between disparity 
The cross entropy obtained here means the difference between the real label and the real label , The smaller the better. 
Conclusion :

It can be seen from the picture that , If it's not the real label , Its label P(X)=0 So the result of calculation has nothing to do with it
1、 The more accurate the prediction , The smaller the cross entropy
2、 The cross entropy is only related to the predicted probability value of the real label
So we can simplify the cross entropy formula :
Two classification cross entropy formula :
Why use cross entropy instead of KL The divergence ?
Softmax The formula
1、 Convert numbers into probabilities
2、 A sharp tool for data normalization 

Sigmoid
1、Sigmoid The function is also called Logistic function
2、 The value range is (0,1)
3、 Common functions of Neural Networks
4、 Often used as a secondary classification 
Common cross entropy loss function types

Cross entropy loss function :

The specific process :
边栏推荐
- 为什么5G N2接口控制面使用SCTP协议?
- 网站被挂马的解决方案
- Hongke | uses jesd204 serial interface to bridge analog and digital worlds at high speed
- Hongke will share the EtherCAT demo for you and teach you how to quickly transition from other protocols to EtherCAT industrial bus
- What if the 80443 port of the website server has been maliciously attacked?
- day16-集合上
- FPGA - odd even frequency division and decimal frequency division code routine
- 9、 Networking technology
- 20个hacker神器
- day03_1_流程控制
猜你喜欢

Sequence list and linked list

Navicat for Oracle Cannot create oci environment

Design of IIR filter based on FPGA

将源码包转换为rpm包

Hongke shares | how to test and verify complex FPGA designs (1) -- entity or block oriented simulation

Circular linked list and bidirectional linked list

循环神经网络RNN

Thinking about MySQL taking shell through OS shell

会话推荐中的价格偏好和兴趣偏好共同建模-论文泛读

OpenResty的核心与cosocket
随机推荐
NeuralCF-神经协同过滤网络
Best example of amortized cost
9、 Networking technology
Floating point multiplication and division of vivado IP core floating point
Arrays&Object&System&Math&Random&包装类
Navicat for Oracle Cannot create oci environment
What if the 80443 port of the website server has been maliciously attacked?
Instant 新日期类的使用 API
AbstractQueuedSynchronizer(AQS)之 ReentrantLock 源码浅读
SDN拓扑发现原理
The performance and viewing methods of websites attacked by DDoS
After the EtherCAT master station is disconnected, how to ensure that the target system is not affected by the fault?
Introduction to OSPF theory
Hongke share | FPGA implementation of pass through and store and forward switching delay
Ram block memory generator of vivado IP core
Solve the error that the simulation output is STX under the frequency division module Modelsim
Understand the great changes of network security in five years
On defect description style
day03_2_作业
Hongke case | PAC: an integrated control solution integrating SoftPLC control logic, HMI and other service functions