Giter Club home page Giter Club logo

Comments (2)

strin avatar strin commented on July 3, 2024

even for binary classification

pamedlda = medlda.OnlineGibbsMedLDA(num_topic=80, labels=2, words=61188)
pamedlda.train_with_gml('../data/binary_train.gml', batchsize=32)
(pred, ind, acc) = pamedlda.infer_with_gml('../data/binary_test.gml', num_sample=10)

acc = 0.56 for 80 topics, while acc = 0.80 for 20 topics.

from bayespa.

strin avatar strin commented on July 3, 2024

added a parameter called "stepsize", which adjust the weights for each datapoint. This parameter is set to be dataset size / batch size in our ICML paper.

a rough explanation for this phenomenon:

Assume that K is large (say 80). after first few mini-batches, the bayesian posterior is going to be multi-modal due to uncertainty (too many parameters compared to data). therefore, for the latent samples of initial mini-batches as well as the variational approximate to be accurate, we'll set J (#latent samples per data point) to be large.

So any of the three following solutions can mitigate the accuracy denegeration:

  • increase J.
  • more sweeps over dataset (more than 1).
  • set stepsize to be large.

Revisiting the binary classification experiment, the solutions lead to the following results:

  • set J = 10, test accuracy = 0.76.
  • set pass = 3, test accuracy = 0.81.
  • set stepsize = 25, test accuracy = 0.81.

The third solution seems to be most computationally efficient one.

from bayespa.

Related Issues (8)

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.