leonjessen / keras_tensorflow_demo

Demonstration of using Keras to run a simple deep feed forward artificial neural network using Tensorflow as backbone in R
8 stars 3 forks source link

consider featuring this on tensorflow.rstudio.com? #1

Open jjallaire opened 7 years ago

jjallaire commented 7 years ago

Hi there, we are hoping to add a bunch of motivating examples like this one to the https://tensorflow.rstudio.com site. Any interest in adapting this example for that site? I think what you have is excellent, maybe just remove the bits about installation (as we can presume people on the site find that out elsewhere) and perhaps add a paragraph or two of "motivation" at the beginning.

We want to have a Gallery on the site where we feature non-trivial examples of interest to the R community (i.e. not the toy dogs vs. cats computer vision example!). This would be a great contribution, let me know if you are interested!

leonjessen commented 7 years ago

@jjallaire, I would be more than happy to adapt this example for your RStudio site. Please let me know how to proceed?

jjallaire commented 7 years ago

Excellent!!!!

How about if you create a git repo that contains the example as an R Markdown document (since our blog uses blogdown this will pretty much just work as a blog post). If you give me access to that repo then we can iterate on the post together.

Before we get started though one thing I should ask up front is whether this is a use case where you think deep learning has the potential to improve on existing/traditional methods of classification? If you think it really doesn't have this kind of potential (rather than just being a nice way of demoing something more interesting to R users than MNIST digits!) then I don't think we should publish it on the blog. I say this because there is a lot of legitimate skepticism about DL methods among statisticians, and I don't want to trot something out as an example where DL isn't obviously improving things.

Assuming we get past that threshold, the only thing I'd say your example needs is a bit more motivation at the beginning (e.g. what is a peptide and why would you want to classify it, etc.). Once we marry that to what you already have we can iterate on finer points of language.

But first, do let me know if you think this example qualifies as an interesting/compelling application of DL before we flesh it out further.

leonjessen commented 7 years ago

Great to hear @jjallaire !

As briefly as possible, I am a researcher in the Immunoinformatics and Machine Learning group at DTU Bioinformatics. We study the activation of the human immune system using machine learning methods. I made this Keras/TensorFlow for R demonstration for a Data Science talk I will be giving at the department. The majority of the department is using python, but I want to show them what R has to offer - Which imho is a lot!

The group I am in is world leading in predicting a specific molecular interaction, which serves as a bottle neck for immune activation in infectious diseases and cancer immunotherapy. My Professor has dedicated has entire career to investigating this system and has found that machine learning - moreover, neural networks are ideal for modelling the system. Due to the high degree of non-linearity in molecular interactions, conventional linear modelling fails.

This particular immune activation is a three-component system, where we currently have a near perfect model for predicting two of the components. I will be using Deep Learning to attempt to incorporate the final component of the system (which until recently, we have not have had the data to train a model). Now that we have the data, I will investigate deep learning architectures and hyper parameters and interface the new data with the existing model and if all goes well, we will leap the field of cancer immunotherapy a great deal forth in the coming years.

Let me know, if you find this application interesting and if we can proceed based on my (not so short) description?

jjallaire commented 7 years ago

Yes, that sounds great! Let's start with what you have here and then bridge that into the specific example by describing how classifying peptides fits into the broader picture.

If you start a git repo with the Rmd and give me commit access we can iterate on it together.

jjallaire commented 7 years ago

BTW for exploring different hyper-parameters see the tfruns package: https://tensorflow.rstudio.com/tools/tfruns/articles/overview.html

This will also soon be integrated with CloudML hyperparameter tuning: https://rstudio.github.io/cloudml/articles/guides-tuning.html

leonjessen commented 7 years ago

That looks very very nice @jjallaire - Awesome! I will create a git repo grant you access. Looking forward to collaborate.

leonjessen commented 6 years ago

I have now updated the example with a section on motivation and removed the installation guide as suggested. I think I may have added too many details - Take a look and let me know what you think @jjallaire ?

jjallaire commented 6 years ago

Great, thanks! I will take a pass and give you a PR for what I think the ideal level of details would be. I noticed the use of <summary> to hide some details. For the most part I'd prefer that we keep these expanded as it's kind of "free" from a readers standpoint to skip quickly over a code block or plot. Perhaps though in the case of extended narrative the <summary> is valuable. I'll take a pass and give you a PR.

jjallaire commented 6 years ago

Quickly scanning the article I think we can address your concern about too much details by providing a condensed motivation at the top and then including the more detailed backround at the end of the post (with a prominent internal link for those that want to review that first). I'll make this concrete in my PR.