Skip to content

Question about gamma in scale_ELBOW #25

@felix-yuxiang

Description

@felix-yuxiang

Hi, I am trying to apply this to the Pancancer dataset (Sequencing-based gene expression) from the ICGC portal but the result was no good. The data points entangle with each other from donors with different cancers.

As I went through your code, I noticed

    logpzc = -0.5*torch.sum(gamma*torch.sum(math.log(2*math.pi) + \
                                           torch.log(var_c) + \
                                           torch.exp(logvar_expand)/var_c + \
                                           (mu_expand-mu_c)**2/var_c, dim=1), dim=1)
   
    # log p(c)
    logpc = torch.sum(gamma*torch.log(pi), 1)

    # log q(z|x) or q entropy    
    qentropy = -0.5*torch.sum(1+logvar+math.log(2*math.pi), 1)

    # log q(c|x)
    logqcx = torch.sum(gamma*torch.log(gamma), 1)

and I know gamma=q(c|x)=p(c|z). Could you show me how to go from here to logpc and logpcx? I would not use gamma in either case though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions