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

theta linkage and init beta #1

Open
wants to merge 9 commits into
base: dtm
Choose a base branch
from
Open

theta linkage and init beta #1

wants to merge 9 commits into from

Conversation

elibol
Copy link

@elibol elibol commented Jul 24, 2015

For discussion of implementation

@elibol
Copy link
Author

elibol commented Jul 24, 2015

The init beta part is clear.
I've renamed doc_id to doc_indexes (this makes it a bit easier to follow, given the old name of patient_id is doc_id).

@finaledoshivelez
Copy link

Makes sense to me.

# Need confirmation on whether double transpose below
# results in desired behavior.
if self.param_set['use_init_beta']:
self.psi = np.array(map(lambda x: pi_to_psi(x.T).T, self.param_set['init_beta']))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@finaledoshivelez modified assignment to psi. Results:
dtm_from_lda

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see that it's doing better with the initialization! Let's chat
about this with Matt and Scott tomorrow (maybe leave a longer run going to
see whether LDA ever catches up if given another 50 or so iterations --
hopefully not)

On Tue, Jul 28, 2015 at 10:52 AM, Melih Elibol [email protected]
wrote:

In pgmult/lda.py
#1 (comment):

@@ -391,9 +413,20 @@ def init(self, data, timestamps, K, alpha_theta):
def initialize_parameters(self):
self.sigmasq_states = 0.1 # TODO make this learned, init from hypers

  •    mean_psi = compute_uniform_mean_psi(self.V)[0][None,:,None]
    

- self.psi = np.tile(mean_psi, (self.T, 1, self.K))

  •    # finale: added this to the initialization (must already be
    
  •    # correct size, do that in the top level file or as another
    
  •    # function in the top level file), not here
    
  •    #
    
  •    # Melih: pi_to_psi expects rows to be normalized
    
  •    # and only takes arrays of size <= 2.
    
  •    # Need confirmation on whether double transpose below
    
  •    # results in desired behavior.
    
  •    if self.param_set['use_init_beta']:
    
  •        self.psi = np.array(map(lambda x: pi_to_psi(x.T).T, self.param_set['init_beta']))
    

@finaledoshivelez https://github.com/finaledoshivelez modified
assignment to psi. Results:
[image: dtm_from_lda]
https://cloud.githubusercontent.com/assets/1884921/8934613/804e7dd6-3516-11e5-98cf-ad91933d8467.png


Reply to this email directly or view it on GitHub
https://github.com/dtak/pgmult/pull/1/files#r35656341.

use setuptools for development linking.
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

Successfully merging this pull request may close these issues.

2 participants