Skip to content

Instantly share code, notes, and snippets.

View walterreade's full-sized avatar

Walter Reade walterreade

View GitHub Profile

Walter Reade Publications

Peer Reviewed

  • Patton, P. T., et al., (2023). A deep learning approach to photo–identification demonstrates high performance on two dozen cetacean species. Methods in Ecology and Evolution, 00, 1– 15. [Open Access]
  • Wayment-Steele, H.K., Kladwang, W., Watkins, A.M. et al. "Deep learning models for predicting RNA degradation via dual crowdsourcing" Nat Mach Intell 4, 1174–1184 (2022). [Abstract] [pre-print]
  • Cheeseman, T., Southerland, K., Park, J. et al., "Advanced image recognition: a fully automated, high-accuracy photo-identification matching system for humpback whales", Mammalian Biology (2021) [Abstract]
  • Bratholm, L.A, et al., "A community-powered search of machine learning strategy space to find NMR property prediction models," PLOS ONE, July 20, 2021,
@walterreade
walterreade / YeoJohnson.py
Created June 9, 2017 14:52 — forked from mesgarpour/YeoJohnson.py
Yeo-Johnson Transformation
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import warnings
import numpy as np
import pandas as pd
import sys
__author__ = "Mohsen Mesgarpour"
__copyright__ = "Copyright 2016, https://github.com/mesgarpour"
__credits__ = ["Mohsen Mesgarpour"]
@walterreade
walterreade / elastic_transform.py
Created July 6, 2016 13:52 — forked from fmder/elastic_transform.py
Elastic transformation of an image in Python
import numpy
from scipy.ndimage.interpolation import map_coordinates
from scipy.ndimage.filters import gaussian_filter
def elastic_transform(image, alpha, sigma, random_state=None):
"""Elastic deformation of images as described in [Simard2003]_.
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for
Convolutional Neural Networks applied to Visual Document Analysis", in
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
"""
Regularized Tree Ensemble
@author: gert.jacobusse@rogatio.nl
@license: FreeBSD
Originally posted:
https://www.kaggle.com/c/bnp-paribas-cardif-claims-management/forums/t/20207/why-every-good-script-is-using-extratreeclassifier-one-way-or-the-other/115621
tag = 'h1'
text 'This is a headline'
sentence = '<{0}>{1}</{0}>'.format(tag, text)
person = {'name': 'Jenn', 'age': 23}
sentence = 'My name is {0[name]} and I am {0[age]} years old.'.format(person)
# can do the same for attributes, e.g., {0.name}, or list {0[0]}
# You can just unpack a dictionary!
sentence = 'My name is {name} and I am {age} years old.'.format(**person)
@walterreade
walterreade / readme.md
Created April 15, 2016 10:41 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

from scipy import exp, log
from scipy.special import gammaln
def prob_unique(N, r):
""" If you have a set of N things to choose from, and take r samples,
the probability that all r samples are unique.
http://www.johndcook.com/blog/2016/01/30/general-birthday-problem
"""
return exp( gammaln(N+1) - gammaln(N-r+1) - r*log(N) )