greenelab / tybalt

Training and evaluating a variational autoencoder for pan-cancer gene expression data
BSD 3-Clause "New" or "Revised" License
162 stars 62 forks source link

Something wrong in extracting weights? #144

Closed tjiagoM closed 5 years ago

tjiagoM commented 5 years ago

In extract_tybalt_weights.ipynb notebook, you defined a function output_high_weight_genes.

At a certain point you have these 2 lines: hw_pos_df = pd.DataFrame(encoding_df[encoding_df > encoding_df.std() * thresh]) hw_neg_df = pd.DataFrame(encoding_df[encoding_df < -encoding_df.std() * thresh])

It seems like you are trying to get the most extreme values away from the mean, but you don't really have the mean here. Shouldn't it be something like this? hw_pos_df = pd.DataFrame(encoding_df[encoding_df > encoding_df.mean() + encoding_df.std() * thresh]) hw_neg_df = pd.DataFrame(encoding_df[encoding_df < encoding_df.mean() - encoding_df.std() * thresh])

gwaybio commented 5 years ago

ah, thanks for pointing this out @tjiagoM - I will take a look

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gwaybio commented 5 years ago

Going to address today! Finally getting to this