Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break out different component functions in Gibbs sampler #10

Closed
TommyJones opened this issue May 23, 2020 · 3 comments
Closed

break out different component functions in Gibbs sampler #10

TommyJones opened this issue May 23, 2020 · 3 comments

Comments

@TommyJones
Copy link
Owner

modularize code. make it less unwieldy. Early performance issues were due to my compiler, not function calls.

@TommyJones TommyJones changed the title make different components functions in Gibbs sampler break out different component functions in Gibbs sampler May 23, 2020
@TommyJones
Copy link
Owner Author

Components include:

  1. Initial data prep
  2. Recalculate probabilities
  3. Sample topics (which would decrease/increase counts and call recalculate probabilities)
  4. Calculate likelihood
  5. Optimize alpha
  6. Aggregate counts after burnin (sum Cd, Ck, Cv across iterations)
  7. Cleanup results for return

The architecture would call each of these functions from a main function. See #11 for a description of how it works once parallelized

@TommyJones
Copy link
Owner Author

Actually, now I think that initial data prep and cleanup results for return could just be part of the main function.

@TommyJones
Copy link
Owner Author

Ended up with recalculate probabilities and sample topics in one function.

Done with 9119b3e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant