Code Monkey home page Code Monkey logo

Comments (4)

hammadshaikhha avatar hammadshaikhha commented on August 27, 2024

@DaveRockt Thanks for raising the issue, I just noticed this. Could you be a bit more specific and compare the formula I have with the one in wikipedia?

I will review my LDA notebook in the meantime and see if I can spot a mistake.

from data-science-and-machine-learning-from-scratch.

DaveRockt avatar DaveRockt commented on August 27, 2024

Thank you for your answer and sorry for not being specific:

In the formula on Wikipedia, I cannot find what you call 'denom1'. In the meantime, however, I found out that after normalising, I get the same result as you.

However, I have another question:

In your code in the 'Main part of LDA algorithm' under 'Add in current word back into count matrixes', you use 'init_topic_assign'. Does this make sense? Shouldn't you use the new assigned topic?

Thank you for this project by the way, it really helped me to understand LDA better.

Best,
David

from data-science-and-machine-learning-from-scratch.

hammadshaikhha avatar hammadshaikhha commented on August 27, 2024

Hi David,

Sorry for the late reply, I skimmed over the code and you may be right. I think one way to check would be to use a python library and run LDA on the same data set and see whether the results match. Could you work on doing that?

If there is indeed a mistake in the code, feel free to fix it and do a pull request.

from data-science-and-machine-learning-from-scratch.

DaveRockt avatar DaveRockt commented on August 27, 2024

from data-science-and-machine-learning-from-scratch.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.