fann1993814 / llda Goto Github PK
View Code? Open in Web Editor NEWLabeled LDA in Python
Labeled LDA in Python
Are you planning on adding this to pip at some point? Just judging by edit history, it seems like a mostly complete package.
after having studied raw LDA implementation (https://blog.csdn.net/u010551621/article/details/45258573), I figured out the calculation of p_z
might be wrong.
the original version as follow :
denom_a = self.n_m_z[m].sum() + self.K * self.alpha
denom_b = self.n_z_t.sum(axis=1) + V * self.beta
p_z = label * (self.n_z_t[:, t] + self.beta) / denom_b * (self.n_m_z[m] + self.alpha) / denom_a
In llda.py
, the load_corpus
function uses regular expressions to get the doc words, but r'\w+(?:\'\w+)?'
will contain those label word. Is it reasonable to do so?
Hi, in the description you say that
The function "fold" to make new document acquire P(z|new_d).
What does this function "fold" exactly do? For example, I see that "fold" takes in a new document. Does "fold" predict the labels for new documents? Why does "fold" also contain an argument "iteration" if it does only prediction?
Thank you.
None
?A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.