cognoma / machine-learning

Machine learning for Project Cognoma
Other
32 stars 47 forks source link

Get gene coefficients #109

Closed rdvelazquez closed 7 years ago

rdvelazquez commented 7 years ago

Builds on PR #105

@patrick-miller I think your get_model_coefficients function from utils is different enough from my get_gene_coefficients function that it doesn't make sense to try to combine them... agree? Also, as utils.py is your creation, any input on the style/formatting of my function is very welcome and appreciated.

rdvelazquez commented 7 years ago

@dhimmel and @patrick-miller my last commit addresses most of your comments. I just haven't combined the coefficient dataframes for full and combined.

I thought we had removed all the sources of randomness in this notebook to make it reproducible but it this time when I ran the notebook it only selected 50 for n_components for both the full and the expression models whereas previous runs of the notebook selected 100 for the expressions model.

rdvelazquez commented 7 years ago

FYI - I just saw the recent comments on the dot product. The recent commit doesn't address either of those.

rdvelazquez commented 7 years ago

One more update commit coming soon (hopefully). This isn't quite ready for review yet.

rdvelazquez commented 7 years ago

This is now ready to review.

I was able to get rid of the unnecessary pandas dataframes as @patrick-miller suggested and I used the new @ matrix multiplication (new to python 3.5) as @dhimmel suggested. Thank you both for the detailed review!! That type of input is immensely helpful for improving my coding.

I didn't combine the coefficients dataframes for the full and expression models. @dhimmel let me know if this is something you think we should do. There is already quite a lot in the notebook regarding coefficients so I see where you are coming from with not wanting to bog the notebook down with too much code.

rdvelazquez commented 7 years ago

@dhimmel my last commit should address your three comments. I added a blank new line to the end of the utils.py file but I don't see it when I view the file on github... I see it when I view it in jupyter and IDLE.

dhimmel commented 7 years ago

I added a blank new line to the end of the utils.py file but I don't see it when I view the file on github

That's right but the missing newline symbol on GitHub that used to be there is gone.