- Piovesan, D., et al., (2024) "CAFA-evaluator: A Python Tool for Benchmarking Ontological Classification Methods" Bioinformatics Advances, Volume 4, Issue 1. [Open Access]
- 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., et al., (2022) "Deep learning models for predicting RNA degradation via dual crowdsourcing" Nat Mach Intell 4, 1174–1184 (2022). [Abstract] [pre-print]
- Cheeseman, T., et al., (2021) "Advanced image recognition: a fully automated, high-accuracy photo-identification matching system for humpback whales", Mammalian Biology
This file contains 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
#!/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"] |
This file contains 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
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 file contains 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
'''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/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Regularized Tree Ensemble | |
@author: [email protected] | |
@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 |
This file contains 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
def removeLink(content): | |
urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', content) | |
for i in range(0, len(urls)): | |
content = content.replace(urls[i], '') | |
return content |
This file contains 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
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) |
##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
This file contains 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
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) ) |
NewerOlder