Last active
February 28, 2017 22:49
-
-
Save LeeKamentsky/b9718b711034bcb0a3ef6241c4c18bf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# AQLM - Machine Learning\n", | |
| "This notebook teaches some of the basics for using machine learning as part of image analysis. We will go over two areas:\n", | |
| "\n", | |
| "- Pixel-based machine learning: use machine learning to classify pixels, for instance as background, cell or nucleus.\n", | |
| "- Phenotype classification: classify cells or other objects by their appearance, for instance, by stages of mitosis\n", | |
| "\n", | |
| "Both of these are classification problems. A typical approach to classification goes something like this:\n", | |
| "\n", | |
| "- Identify quantitative features that might be used for classification\n", | |
| "- Do feature reduction to address issues of redundancy and to find descriptors that have some degree of independence from each other\n", | |
| "- Pick a machine learning implementation of a classifier\n", | |
| "- Train it on known examples\n", | |
| "- Apply the trained classifier to your data" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stderr", | |
| "output_type": "stream", | |
| "text": [ | |
| "/opt/conda/lib/python3.5/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n", | |
| " warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n", | |
| "/opt/conda/lib/python3.5/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n", | |
| " warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "%matplotlib inline\n", | |
| "from pylab import *\n", | |
| "import numpy as np\n", | |
| "import urllib\n", | |
| "import os\n", | |
| "from ipywidgets import interact" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "We will be working with some difficult brightfield images of C. Elegans. The images have adults (which are hermaphrodites), eggs and L1 larvae and it's difficult to tell the texture of adults from that of the eggs. So pragmatically, you will see the types of successes and the pitfalls which is good.\n", | |
| "\n", | |
| "It's worthwhile to note what is happening in the field. The cutting edge technology is \"Convolutional Neural Nets\" and these will overtake other ML methods within the next five years. Currently, they take between an hour and weeks to train, their algorithms only run efficiently on computers with GPUs, and there is no accessible tool for laypeople to use. Nevertheless, in 5 years *everything* in image processing will be done with convolutional neural nets." | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 2, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment