Coder Social home page Coder Social logo

Comments (5)

cbravo93 avatar cbravo93 commented on July 1, 2024

Hi @wkopp !

Here, the second derivative method is not meant to work with less than three points. In the approach we use (based on the central difference, inspired by https://stackoverflow.com/questions/4471993/compute-the-elbow-for-a-curve-automatically-and-mathematically), the first derivative measures the slope of the line between two points in the likelihood curve (the change between two points), the second measures the difference between two consecutive slopes (or the change of the change, the point with the maximum curvature); so you need at least two slopes (or three points). I have added an error message for this.

Thanks for reporting!

C

from cistopic.

wkopp avatar wkopp commented on July 1, 2024

Hi,

would it be possible then to ignore the first and second derivative computation if there are too little numbers of topics? Because, in case the user already knows what number to chose, it requires to nevertheless compute other dummy topic numbers which requires time and resources.

Thank you.

from cistopic.

cbravo93 avatar cbravo93 commented on July 1, 2024

Sure! Just use method='maximum', select='Your number of topics'. Nevertheless, for a proper topic selection I would recommend to run models in a bigger topic space.

Cheers,

C

from cistopic.

wkopp avatar wkopp commented on July 1, 2024

I see. However, what is the purpose of having to specify method="maximum" if a specific topic number is selected anyways. In my opinion, it would be better not to have to specify this argument, because for a user this isn't intuitive and also it is not backward compatible, which would be nice and probably possible in this case.

Another issue with the second derivative computation seems to be that it is used by default with runCGSModels, right? However, from the documentation of the type parameter in the selectModel method, you recommend against using the derivative method with collapsed Gibbs sampling.
So perhaps the selectModel method should be used in runCGSModels and runWarpLDAModels following the respective recommended model selection criteria.

Best,
Wolfgang

from cistopic.

cbravo93 avatar cbravo93 commented on July 1, 2024

Hi!

Sometimes the differences between models are small (in likelihood, or 2nd derivative), so we recommend to select the less complex model. If we only allow the automatic selection, it wouldn't be possible to manually change to other proper models.

selectModel is generally run after running the models (despite they are CGS or WarpLDA), we use derivative as default to agree with the latest WarpLDA estimation. I will add a warning if the models are CGS based.

Cheers!

C

from cistopic.

Related Issues (20)

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.