Skip to content

Commit

Permalink
Merge pull request deepchem#2637 from arunppsg/tutorial
Browse files Browse the repository at this point in the history
Fixes to tutorial section
  • Loading branch information
rbharath authored Aug 29, 2021
2 parents 7c42ebb + 15a1cf1 commit 8b73e2e
Show file tree
Hide file tree
Showing 37 changed files with 114 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"id": "tTuYGOlnh117"
},
"source": [
"# Tutorial Part 9: Advanced Model Training\n",
"# Advanced Model Training\n",
"\n",
"In the tutorials so far we have followed a simple procedure for training models: load a dataset, create a model, call `fit()`, evaluate it, and call ourselves done. That's fine for an example, but in real machine learning projects the process is usually more complicated. In this tutorial we will look at a more realistic workflow for training a model.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/09_Advanced_Model_Training.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Advanced_Model_Training.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial 3: An Introduction To MoleculeNet\n",
"# An Introduction To MoleculeNet\n",
"\n",
"One of the most powerful features of DeepChem is that it comes \"batteries included\" with datasets to use. The DeepChem developer community maintains the MoleculeNet [1] suite of datasets which maintains a large collection of different scientific datasets for use in machine learning applications. The original MoleculeNet suite had 17 datasets mostly focused on molecular properties. Over the last several years, MoleculeNet has evolved into a broader collection of scientific datasets to facilitate the broad use and development of scientific machine learning tools.\n",
"\n",
Expand All @@ -18,7 +18,7 @@
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/03_An_Introduction_To_MoleculeNet.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/An_Introduction_To_MoleculeNet.ipynb)\n",
"\n",
"\n",
"## Setup\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 28. Calculating Atomic Contributions for Molecules Based on a Graph Convolutional QSAR Model\n",
"# Calculating Atomic Contributions for Molecules Based on a Graph Convolutional QSAR Model\n",
"\n",
"In an earlier tutorial we introduced the concept of model interpretability: understanding why a model produced the result it did. In this tutorial we will learn about atomic contributions, a useful tool for interpreting models that operate on molecules.\n",
"\n",
Expand All @@ -14,13 +14,13 @@
"\n",
"Mariia Matveieva, Pavel Polishchuk. Institute of Molecular and Translational Medicine, Palacky University, Olomouc, Czech Republic.\n",
"\n",
"<img src=\"atomic_contributions_tutorial_data/index.png\">\n",
"<img src=\"assets/atomic_contributions_tutorial_data/index.png\">\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/28_Atomic_Contributions_for_Molecules.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Atomic_Contributions_for_Molecules.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down Expand Up @@ -80,7 +80,7 @@
"from rdkit.Chem.Draw import SimilarityMaps\n",
"import tensorflow as tf\n",
"\n",
"DATASET_FILE ='atomic_contributions_tutorial_data/logBB.sdf'\n",
"DATASET_FILE ='assets/atomic_contributions_tutorial_data/logBB.sdf'\n",
"# Create RDKit mol objects, since we will need them later.\n",
"mols = [m for m in Chem.SDMolSupplier(DATASET_FILE) if m is not None ]\n",
"loader = dc.data.SDFLoader(tasks=[\"logBB_class\"], \n",
Expand Down Expand Up @@ -152,7 +152,7 @@
}
],
"source": [
"TEST_DATASET_FILE = 'atomic_contributions_tutorial_data/logBB_test_.sdf'\n",
"TEST_DATASET_FILE = 'assets/atomic_contributions_tutorial_data/logBB_test_.sdf'\n",
"loader = dc.data.SDFLoader(tasks=[\"p_np\"], sanitize=True,\n",
" featurizer=dc.feat.ConvMolFeaturizer())\n",
"test_dataset = loader.create_dataset(TEST_DATASET_FILE, shard_size=2000)\n",
Expand Down Expand Up @@ -619,7 +619,7 @@
"metadata": {},
"outputs": [],
"source": [
"DATASET_FILE ='atomic_contributions_tutorial_data/Tetrahymena_pyriformis_Work_set_OCHEM.sdf'\n",
"DATASET_FILE ='assets/atomic_contributions_tutorial_data/Tetrahymena_pyriformis_Work_set_OCHEM.sdf'\n",
"# create RDKit mol objects, we will need them later\n",
"mols = [m for m in Chem.SDMolSupplier(DATASET_FILE) if m is not None ]\n",
"loader = dc.data.SDFLoader(tasks=[\"IGC50\"], \n",
Expand Down Expand Up @@ -683,7 +683,7 @@
}
],
"source": [
"TEST_DATASET_FILE = 'atomic_contributions_tutorial_data/Tetrahymena_pyriformis_Test_set_OCHEM.sdf'\n",
"TEST_DATASET_FILE = 'assets/atomic_contributions_tutorial_data/Tetrahymena_pyriformis_Test_set_OCHEM.sdf'\n",
"loader = dc.data.SDFLoader(tasks=[\"IGC50\"], sanitize= True,\n",
" featurizer=dc.feat.ConvMolFeaturizer())\n",
"test_dataset = loader.create_dataset(TEST_DATASET_FILE, shard_size=2000)\n",
Expand Down Expand Up @@ -973,7 +973,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -987,7 +987,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"id": "gG-V_KZzqSSr"
},
"source": [
"# Tutorial Part 14: Conditional Generative Adversarial Network\n",
"# Conditional Generative Adversarial Network\n",
"\n",
"A Generative Adversarial Network (GAN) is a type of generative model. It consists of two parts called the \"generator\" and the \"discriminator\". The generator takes random values as input and transforms them into an output that (hopefully) resembles the training data. The discriminator takes a set of samples as input and tries to distinguish the real training samples from the ones created by the generator. Both of them are trained together. The discriminator tries to get better and better at telling real from false data, while the generator tries to get better and better at fooling the discriminator.\n",
"\n",
Expand All @@ -17,7 +17,7 @@
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/14_Conditional_Generative_Adversarial_Networks.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Conditional_Generative_Adversarial_Networks.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial Part 5: Creating Models with TensorFlow and PyTorch\n",
"# Creating Models with TensorFlow and PyTorch\n",
"\n",
"In the tutorials so far, we have used standard models provided by DeepChem. This is fine for many applications, but sooner or later you will want to create an entirely new model with an architecture you define yourself. DeepChem provides integration with both TensorFlow (Keras) and PyTorch, so you can use it with models from either of these frameworks.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/05_Creating_Models_with_TensorFlow_and_PyTorch.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Creating_Models_with_TensorFlow_and_PyTorch.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"id": "6MNHvkiBl55x"
},
"source": [
"# Tutorial Part 10: Creating a High Fidelity Dataset from Experimental Data\n",
"# Creating a High Fidelity Dataset from Experimental Data\n",
"\n",
"In this tutorial, we will look at what is involved in creating a new Dataset from experimental data. As we will see, the mechanics of creating the Dataset object is only a small part of the process. Most real datasets need significant cleanup and QA before they are suitable for training models.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/10_Creating_a_high_fidelity_model_from_experimental_data.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Creating_a_high_fidelity_model_from_experimental_data.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "Rqb9ef8F2UJW"
},
"source": [
"# Tutorial Part 21: Exploring Quantum Chemistry with GDB1k"
"# Exploring Quantum Chemistry with GDB1k"
]
},
{
Expand All @@ -24,7 +24,7 @@
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/21_Exploring_Quantum_Chemistry_with_GDB1k.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Exploring_Quantum_Chemistry_with_GDB1k.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"id": "tTuYGOlnh117"
},
"source": [
"# Tutorial Part 7: Going Deeper On Molecular Featurizations\n",
"# Going Deeper On Molecular Featurizations\n",
"\n",
"One of the most important steps of doing machine learning on molecular data is transforming the data into a form amenable to the application of learning algorithms. This process is broadly called \"featurization\" and involves turning a molecule into a vector or tensor of some sort. There are a number of different ways of doing that, and the choice of featurization is often dependent on the problem at hand. We have already seen two such methods: molecular fingerprints, and `ConvMol` objects for use with graph convolutions. In this tutorial we will look at some of the others.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/07_Going_Deeper_on_Molecular_Featurizations.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Going_Deeper_on_Molecular_Featurizations.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "e4cc07ed",
"metadata": {},
"source": [
"# Tutorial 31: Introduction To Material Science\n",
"# Introduction To Material Science\n",
"\n",
"## Table of Contents:\n",
"* [Introduction](#introduction)\n",
Expand All @@ -25,7 +25,7 @@
"\n",
"This tutorial can also be used in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/31_Introduction_To_Material_Science.ipynb)"
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Introduction_To_Material_Science.ipynb)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"colab_type": "text"
},
"source": [
"# Tutorial Part 21: Introduction to Bioinformatics\n",
"# Introduction to Bioinformatics\n",
"\n",
"So far in this tutorial, we've primarily worked on the problems of cheminformatics. We've been interested in seeing how we can use the techniques of machine learning to make predictions about the properties of molecules. In this tutorial, we're going to shift a bit and see how we can use classical computer science techniques and machine learning to tackle problems in bioinformatics.\n",
"\n",
Expand All @@ -42,7 +42,7 @@
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/21_Introduction_to_Bioinformatics.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Introduction_to_Bioinformatics.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
"id": "ubFUlqz8cj1L"
},
"source": [
"# Tutorial Part 6: Introduction to Graph Convolutions\n",
"# Introduction to Graph Convolutions\n",
"\n",
"In this tutorial we will learn more about \"graph convolutions.\" These are one of the most powerful deep learning tools for working with molecular data. The reason for this is that molecules can be naturally viewed as graphs.\n",
"\n",
"![Molecular Graph](https://github.com/deepchem/deepchem/blob/master/examples/tutorials/basic_graphs.gif?raw=1)\n",
"![Molecular Graph](https://github.com/deepchem/deepchem/blob/master/examples/tutorials/assets/basic_graphs.gif?raw=1)\n",
"\n",
"Note how standard chemical diagrams of the sort we're used to from high school lend themselves naturally to visualizing molecules as graphs. In the remainder of this tutorial, we'll dig into this relationship in significantly more detail. This will let us get a deeper understanding of how these systems work.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/06_Introduction_to_Graph_Convolutions.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Introduction_to_Graph_Convolutions.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"id": "cB0MgPvpkP1g"
},
"source": [
"# Tutorial Part 24: Introduction to Model Interpretability"
"# Introduction to Model Interpretability"
]
},
{
Expand All @@ -23,15 +23,15 @@
"\n",
"[LIME](https://homes.cs.washington.edu/~marcotcr/blog/lime/) is a tool which can help with this problem. It uses local perturbations of feature space to determine feature importance. In this tutorial, you'll learn how to use LIME alongside DeepChem to interpret what it is our models are learning. \n",
"\n",
"![Selection_110.png](https://github.com/deepchem/deepchem/blob/master/examples/tutorials/lime_dog.png?raw=1)\n",
"![Selection_110.png](https://github.com/deepchem/deepchem/blob/master/examples/tutorials/assets/lime_dog.png?raw=1)\n",
"\n",
"So if this tool can work in human understandable ways for images can it work on molecules? In this tutorial you will learn how to use LIME for model interpretability for any of our fixed-length featurization models.\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence are designed to be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/24_Introduction_to_Model_Interpretability.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Introduction_to_Model_Interpretability.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial Part 19: Screening Zinc For HIV Inhibition"
"# Screening Zinc For HIV Inhibition"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"id": "hzpae9-r2aoK"
},
"source": [
"# Tutorial Part 16: Learning Unsupervised Embeddings for Molecules\n",
"# Learning Unsupervised Embeddings for Molecules\n",
"\n",
"In this tutorial, we will use a `SeqToSeq` model to generate fingerprints for classifying molecules. This is based on the following paper, although some of the implementation details are different: Xu et al., \"Seq2seq Fingerprint: An Unsupervised Deep Molecular Embedding for Drug Discovery\" (https://doi.org/10.1145/3107411.3107424).\n",
"\n",
"## Colab\n",
"\n",
"This tutorial and the rest in this sequence can be done in Google colab. If you'd like to open this notebook in colab, you can use the following link.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/16_Learning_Unsupervised_Embeddings_for_Molecules.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepchem/deepchem/blob/master/examples/tutorials/Learning_Unsupervised_Embeddings_for_Molecules.ipynb)\n",
"\n",
"## Setup\n",
"\n",
Expand Down
Loading

0 comments on commit 8b73e2e

Please sign in to comment.