当前位置:网站首页>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 :
边栏推荐
- Idea practical shortcut key novice must see
- Hongke | uses jesd204 serial interface to bridge analog and digital worlds at high speed
- Phishing mail disposal
- Huawei switch ce12808 import and export configuration file
- Raw advanced socket experiment
- pairs和ipairs的区别
- Navicat for Oracle Cannot create oci environment
- NLP-分词
- Thinking about MySQL taking shell through OS shell
- Complex floating point division of vivado IP core floating point
猜你喜欢
Arrays & object & System & Math & random & Packaging
Floating point addition and subtraction method of vivado IP core floating point
Hongke white paper | how to use TSN time sensitive network technology to build a digital factory in industry 4.0?
day04_数组
Tcp/ip 五层参考模型以及对应的典型设备以及ipv6
day15_泛型
Sequence list and linked list
On defect description style
Merkletree builds QT implementation UI
Design and simulation code of 4-bit subtracter based on FPGA
随机推荐
5、 Wireless communication network
Hongke shares | testing and verifying complex FPGA design (2) -- how to perform global oriented simulation in IP core
TCP socket communication experiment
Complex floating point multiplication of vivado IP core floating point
6、 Network interconnection and Internet
LDAP简述及统一认证说明
Design of IIR filter based on FPGA
网络工具中的“瑞士军刀”-nc
20个hacker神器
Online multiplayer chat room based on UDP communication
【面试题】2022年最新软件测试面试题(400道)【附带答案】持续更新...
MySQL 事物四种隔离级别分析
Hongke share | bring you a comprehensive understanding of "can bus error" (II) -- can error types
Ultra low cost DDoS attacks are coming. See how WAF protects Jedi
5G控制面协议之N2接口
Explain the difference between FIR filter and IIR filter in detail
Tcp/ip 五层参考模型以及对应的典型设备以及ipv6
软件包设置成——>YUM源
网站被挂马的解决方案
偏向锁、轻量级锁测试工具类级相关命令