当前位置:网站首页>About LDA model
About LDA model
2022-07-05 12:39:00 【NLP journey】
Recently, I am studying recommendation system , There is a model of argot meaning LDA. Read a lot of blogs , Information , The literature , For a person with a bad background in mathematics, I know a little about what this is . Make a note of , First, induction and summary has always been a better way of learning , I hope it can enlighten the latecomers even a little understanding .
Aside from boring Mathematics , What can this model be used for , I found that many materials and blog introductions are relatively general , After reading it, my mind is full of complex and unintelligible mathematical formulas , Even the purpose of this model is not clear . Here to talk about my own understanding . For computer programs , It is clear from the input intermediate process to the output . The input of this model is some corpus ( This abstract word can be embodied into several documents , For example, a few txt file , Each of these files contains an article )+ Initial parameter setting of the model , The intermediate process is to train through model corpus LDA Parameters of the model , Well trained LDA The model can be applied to a document , Output the probability that this document belongs to a topic . So just like other supervised statistical learning methods ,LDA The model should be trained first , Then use the trained model for analysis and prediction .
Although the above process is not complicated , But the whole model involves a lot of mathematical knowledge , Especially if you don't understand the function of these knowledge clearly, it's easy to make people dizzy . These include Dirichlet+ Multinomial conjugate distribution ,LDA Model process and Gibbs sampling method . Quote LDA Probability graph model :
From this probability diagram , You can imagine such a process , Join a strange writer to write an article , When it writes each word, it must first determine a theme for the word . The determination of this topic is determined by a multinomial distribution ( It can be thought of as a polyhedral dice , Each side of the dice is a theme ), But this multinomial distribution is composed of a Dirichlet Distribution to determine . This is the upper part of the figure , First of all Dirichlet Distribution determines multinomial distribution , Then the topic is determined by the distribution of multiple items Zm,n. There is also such a process when determining words by topic , First, by a Dirichlet Distribution determines a multinomial distribution , Then the word to be written is determined by the distribution of multiple items .
The above is even LDA Model , Next is gibbs abstract ,gibbs In fact, the function of sampling is to train the values of intermediate hidden parameters according to the input corpus . Because this whole LDA In the process , The input includes two Dirichlet Parameters of the distribution alpha,beta And corpus and topic The number of . Based on these inputs gibbs sampling method , Calculate the middle three parameters ( I don't know how to type these letters , Namely Zm,n And two parameters of multinomial distribution )
LDA After training , For new documents , To know its theme distribution , Can be used again gibbs sampling method , Fix , obtain that will do .
The whole blog post does not involve any mathematical derivation , You need to know more about Daniel's special blog http://blog.csdn.net/yangliuy/article/details/8302599, If there is a mistake , Welcome criticism and correction
边栏推荐
- Redis highly available sentinel cluster
- How can labels/legends be added for all chart types in chart. js (chartjs.org)?
- Kotlin流程控制、循环
- GPON other manufacturers' configuration process analysis
- Reinforcement learning - learning notes 3 | strategic learning
- Experimental design - using stack to realize calculator
- Array cyclic shift problem
- Ecplise development environment configuration and simple web project construction
- JDBC -- use JDBC connection to operate MySQL database
- Image hyperspectral experiment: srcnn/fsrcnn
猜你喜欢
Principle of universal gbase high availability synchronization tool in Nanjing University
Understand kotlin from the perspective of an architect
Yum only downloads the RPM package of the software to the specified directory without installing it
Automated test lifecycle
Pytoch monolayer bidirectional_ LSTM implements MNIST and fashionmnist data classification
Pytorch two-layer loop to realize the segmentation of large pictures
C language structure is initialized as a function parameter
The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation
Solve the problem of cache and database double write data consistency
Average lookup length when hash table lookup fails
随机推荐
Making and using the cutting tool of TTF font library
Distributed cache architecture - cache avalanche & penetration & hit rate
Sqoop import and export operation
A new WiFi option for smart home -- the application of simplewifi in wireless smart home
强化学习-学习笔记3 | 策略学习
Kotlin变量
ZABBIX monitors mongodb templates and configuration operations
End to end neural network
II. Data type
Learn JVM garbage collection 02 - a brief introduction to the reference and recycling method area
Using docker for MySQL 8.0 master-slave configuration
Migrate data from Mysql to neo4j database
Resnet+attention project complete code learning
Understand kotlin from the perspective of an architect
Pytoch uses torchnet Classerrormeter in meter
Redis clean cache
Summary of C language learning problems (VS)
ZABBIX agent2 installation
Automated test lifecycle
Learn JVM garbage collection 05 - root node enumeration, security points, and security zones (hotspot)