This is an excellent tutorial on neural networks that does a good job of explaining not only how they work but why they work as well. The python code is very easy to follow.
There is code for a very simple example and a more advanced one.
https://iamtrask.github.io/2015/07/12/basic-python-network/
see also:
http://denson-data-science.blogspot.com/2015/09/neural-network-step-by-step.html
Showing posts with label tutorials. Show all posts
Showing posts with label tutorials. Show all posts
Friday, September 4, 2015
Tuesday, August 25, 2015
3 Wrong Ways to Store a Password (And 5 code samples doing it right)
Mainly for web development but useful in other contexts as well.
http://adambard.com/blog/3-wrong-ways-to-store-a-password/
http://adambard.com/blog/3-wrong-ways-to-store-a-password/
Choosing Colormaps
From the matplotlib documentation:
http://matplotlib.org/users/colormaps.html
More info from IBM:
http://www.research.ibm.com/people/l/lloydt/color/color.HTM
The idea behind choosing a good colormap is to find a good representation in 3D colorspace for your data set. The best colormap for any given data set depends on many things including:
- Whether representing form or metric data
- Your knowledge of the data set (e.g., is there a critical value from which the other values deviate?)
- If there is an intuitive color scheme for the parameter you are plotting
- If there is a standard in the field the audience may be expecting
For many applications, a perceptual colormap is the best choice — one in which equal steps in data are perceived as equal steps in the color space. Researchers have found that the human brain perceives changes in the lightness parameter as changes in the data much better than, for example, changes in hue. Therefore, colormaps which have monotonically increasing lightness through the colormap will be better interpreted by the viewer.
http://matplotlib.org/users/colormaps.html
More info from IBM:
http://www.research.ibm.com/people/l/lloydt/color/color.HTM
FastML: a great resource for machine learning
There are many useful articles at this site. It is useful for everyone from novice to advanced:
http://fastml.com/
http://fastml.com/
Contrast Limited Adaptive Histogram Equalization (CLAHE)
CLAHE is a useful tool for preprocessing images (or video) for computer vision/pattern recognition tasks. It more or less helps you "see" areas of the image that are in shadows.
There are many available implementations of this but I like the one in open CV:
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_equalization/py_histogram_equalization.html
Note: it is usually better to convert images to HSV colorspace first.
Additional info:
http://fiji.sc/wiki/index.php/Enhance_Local_Contrast_(CLAHE)
There are many available implementations of this but I like the one in open CV:
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_equalization/py_histogram_equalization.html
Note: it is usually better to convert images to HSV colorspace first.
![]() |
| Before |
![]() |
| After |
Additional info:
http://fiji.sc/wiki/index.php/Enhance_Local_Contrast_(CLAHE)
Tuesday, April 7, 2015
nolearn and lasagne tutorial
This short notebook is meant to help you getting started with nolearn and lasagne in order to train a neural net and make a submission to the Otto Group Product Classification Challenge.
http://nbviewer.ipython.org/github/ottogroup/kaggle/blob/master/Otto_Group_Competition.ipynb
Thursday, January 8, 2015
Quantifying Uncertainty: Modern Computational Representation of Probability and Applications
This is a link to a pdf file containing a tutorial on modeling uncertainty:
http://www.wire.tu-bs.de/forschung/talks/06_Opatija.pdf
Many descriptions (especially of future events) contain
elements, which are uncertain and not precisely known.
- For example future rainfall, or discharge from a river.
- More generally, action from surrounding environment.
- The system itself may contain only incompletely known
- parameters, processes or fields (not possible or too
- costly to measure)
- There may be small, unresolved scales in the model,
- they act as a kind of background noise.
All these introduce some uncertainty in the model.
- Uncertainty may be aleatoric, which means random and not reducible, or
- epistemic, which means due to incomplete knowledge.
Useful Pandas Features
A tutorial on 10 useful Pandas features:
http://manishamde.github.io/blog/2013/03/07/pandas-and-python-top-10/
Thursday, December 4, 2014
Visualizing decision trees in scikit-learn
For single decision trees:
http://scikit-learn.org/dev/modules/tree.html
http://stackoverflow.com/questions/10570042/visualizing-a-decision-tree-example-from-scikit-learn
Hints on how to do it for a Random Forest or Extra Tree classifier:
http://stackoverflow.com/questions/17057139/how-to-find-key-trees-features-from-a-trained-random-forest
http://stackoverflow.com/questions/17362576/random-forest-implementation-in-python
http://scikit-learn.org/dev/modules/tree.html
http://stackoverflow.com/questions/10570042/visualizing-a-decision-tree-example-from-scikit-learn
Hints on how to do it for a Random Forest or Extra Tree classifier:
http://stackoverflow.com/questions/17057139/how-to-find-key-trees-features-from-a-trained-random-forest
http://stackoverflow.com/questions/17362576/random-forest-implementation-in-python
Monday, September 29, 2014
Corner Detector
Detecting corners is often a good first step in computer vision. If you can match corners from two images you are well on your way to figuring out how they fit together for example.
Corner detection is an approach used within computer vision systems to extract certain kinds of features and infer the contents of an image. Corner detection is frequently used in motion detection, image registration, video tracking, image mosaicing, panorama stitching, 3D modelling and object recognition. Corner detection overlaps with the topic of interest point detection.
http://en.wikipedia.org/wiki/Corner_detection
Lecture slide decks:
http://www.cse.psu.edu/~rcollins/CSE486/lecture06.pdf
http://courses.cs.washington.edu/courses/cse577/05sp/notes/harris.pdf
Tutorials:
Python/OpenCV
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_feature2d/py_features_harris/py_features_harris.html
YouTube video:
https://www.youtube.com/watch?v=vkWdzWeRfC4
Matlab code:
http://www.mathworks.com/matlabcentral/fileexchange/9272-harris-corner-detector
Corner detection is an approach used within computer vision systems to extract certain kinds of features and infer the contents of an image. Corner detection is frequently used in motion detection, image registration, video tracking, image mosaicing, panorama stitching, 3D modelling and object recognition. Corner detection overlaps with the topic of interest point detection.
http://en.wikipedia.org/wiki/Corner_detection
Lecture slide decks:
http://www.cse.psu.edu/~rcollins/CSE486/lecture06.pdf
http://courses.cs.washington.edu/courses/cse577/05sp/notes/harris.pdf
Tutorials:
Python/OpenCV
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_feature2d/py_features_harris/py_features_harris.html
YouTube video:
https://www.youtube.com/watch?v=vkWdzWeRfC4
Matlab code:
http://www.mathworks.com/matlabcentral/fileexchange/9272-harris-corner-detector
Deep Learning
Deep Learning is a new area of Machine Learning research, which has been introduced with the objective of moving Machine Learning closer to one of its original goals: Artificial Intelligence.
Website of organization dedicated to all things deep learning:
http://deeplearning.net/
Multiple tutorials and a wealth of other info:
http://deeplearning.net/tutorial/intro.html
Peer review paper:
Theoretical results suggest that in order to learn the kind of complicated functions that can represent high- level abstractions (e.g. in vision, language, and other AI-level tasks), one may need deep architectures. Deep architectures are composed of multiple levels of non-linear operations, such as in neural nets with many hidden layers or in complicated propositional formulae re-using many sub-formulae. Searching the parameter space of deep architectures is a difficult task, but learning algorithms such as those for Deep Belief Networks have recently been proposed to tackle this problem with notable success, beating the state-of-the-art in certain areas. This paper discusses the motivations and principles regarding learning algorithms for deep architectures, in particular those exploiting as building blocks unsupervised learning of single-layer models such as Restricted Boltzmann Machines, used to construct deeper models such as Deep Belief Networks.
http://www.iro.umontreal.ca/~bengioy/papers/ftml.pdf
Deep learning implementations in many languages:
http://deeplearning.net/software_links/
Website of organization dedicated to all things deep learning:
http://deeplearning.net/
Multiple tutorials and a wealth of other info:
http://deeplearning.net/tutorial/intro.html
Peer review paper:
Theoretical results suggest that in order to learn the kind of complicated functions that can represent high- level abstractions (e.g. in vision, language, and other AI-level tasks), one may need deep architectures. Deep architectures are composed of multiple levels of non-linear operations, such as in neural nets with many hidden layers or in complicated propositional formulae re-using many sub-formulae. Searching the parameter space of deep architectures is a difficult task, but learning algorithms such as those for Deep Belief Networks have recently been proposed to tackle this problem with notable success, beating the state-of-the-art in certain areas. This paper discusses the motivations and principles regarding learning algorithms for deep architectures, in particular those exploiting as building blocks unsupervised learning of single-layer models such as Restricted Boltzmann Machines, used to construct deeper models such as Deep Belief Networks.
http://www.iro.umontreal.ca/~bengioy/papers/ftml.pdf
Deep learning implementations in many languages:
http://deeplearning.net/software_links/
Multi-scale Oriented Patches (MOPS)
MOPS is a useful tool for many computer vision and related applications. They key is that it gives you a way to generate features that are (mostly) invariant to rotation and scale to use as input for machine learning/artificial intelligence algorithms.
http://www.cs.bath.ac.uk/brown/mops/mops.html
Technical report from Microsoft Research:
http://research.microsoft.com/pubs/70120/tr-2004-133.pdf
Nice slide deck on MOPS:
http://www.csie.ntu.edu.tw/~cyy/courses/vfx/08spring/lectures/handouts/lec06_feature2_4up.pdf
Example app from Microsoft Research:
http://research.microsoft.com/en-us/um/redmond/groups/ivm/PhotoTours/
http://www.cs.bath.ac.uk/brown/mops/mops.html
Technical report from Microsoft Research:
http://research.microsoft.com/pubs/70120/tr-2004-133.pdf
Nice slide deck on MOPS:
http://www.csie.ntu.edu.tw/~cyy/courses/vfx/08spring/lectures/handouts/lec06_feature2_4up.pdf
Example app from Microsoft Research:
http://research.microsoft.com/en-us/um/redmond/groups/ivm/PhotoTours/
Friday, September 19, 2014
Curve fitting with Pyevolve
This is a very nice tutorial for genetic algorithms. It uses pyevolve but the tutorial part is useful even if you are using a different language/implementation for GA.
A Coder's Musings: Curve fitting with Pyevolve
A Coder's Musings: Curve fitting with Pyevolve
Genetic Algorithms tutorial
Great tutorial and introduction to genetic algorithms. There are java applets that you can play with to see how GA's work.
These pages introduce some fundamentals of genetic algorithms. Pages are intended to be used for learning about genetic algorithms without any previous knowledge from this area. Only some knowledge of computer programming is assumed. You can find here several interactive Java applets demonstrating work of genetic algorithms.
As the area of genetic algorithms is very wide, it is not possible to cover everything in these pages. But you should get some idea, what the genetic algorithms are and what they could be useful for. Do not expect any sophisticated mathematics theories here.
Main page - Introduction to Genetic Algorithms - Tutorial with Interactive Java Applets
These pages introduce some fundamentals of genetic algorithms. Pages are intended to be used for learning about genetic algorithms without any previous knowledge from this area. Only some knowledge of computer programming is assumed. You can find here several interactive Java applets demonstrating work of genetic algorithms.
As the area of genetic algorithms is very wide, it is not possible to cover everything in these pages. But you should get some idea, what the genetic algorithms are and what they could be useful for. Do not expect any sophisticated mathematics theories here.
Main page - Introduction to Genetic Algorithms - Tutorial with Interactive Java Applets
Random Forest Tutorial
This is slide deck from a lecture. It is a good introduction to RDF's with advantages and disadvantages compared with other methods.
www.dabi.temple.edu/~hbling/8590.002/Montillo_RandomForests_4-2-2009.pdf
www.dabi.temple.edu/~hbling/8590.002/Montillo_RandomForests_4-2-2009.pdf
Basic Neural Network Tutorial : C++ Implementation and Source Code
This tutorial is in two parts, one is the theory of ANN and the other part is a C++ implementation with hints on how to modify it efficiently. If you are new to neural networks and you are a C++ programmer this is a great place to start.
Basic Neural Network Tutorial – Theory | Taking Initiative
Basic Neural Network Tutorial : C++ Implementation and Source Code | Taking Initiative
Basic Neural Network Tutorial – Theory | Taking Initiative
Basic Neural Network Tutorial : C++ Implementation and Source Code | Taking Initiative
Wednesday, September 17, 2014
Theoretical Machine Learning
Introductory lecture notes from a class taught by Professor Rob Schapire who is a leader in the field. This is a good place to start for a beginner in machine learning.
www.cs.princeton.edu/courses/archive/spr08/cos511/scribe_notes/0204.pdf
www.cs.princeton.edu/courses/archive/spr08/cos511/scribe_notes/0204.pdf
Decision Forests for Computer Vision and Medical Image Analysis book from Microsoft Research
This is the best resource I have found for understanding and using decision tree based machine learning algorithms. It is very thorough on both theory and practical use with comparisons with other algorithms such as SVM's and AdaBoost.
There are also a bunch of supplemental materials available for free including a very nice PowerPoint with great explanations. The supplemental materials include C++ and C# code.
Decision Forests - Microsoft Research
There are also a bunch of supplemental materials available for free including a very nice PowerPoint with great explanations. The supplemental materials include C++ and C# code.
Decision Forests - Microsoft Research
Decision Forests for Classification, Regression, Density Estimation, Manifold Learning and Semi-Supervised Learning
This technical report from Microsoft Research is an A-Z tutorial on how decision tree machine learning algorithms work. It includes in depth explanations of random forests, extra tree classifiers, random ferns and other variations for both classification and regression.
It is in report format and compares decision forests to other types of machine learning algorithms such as SVM. Some simple toy problems give the basics and some real life applications such as body position recognition and medical image are included.
There is also an accompanying PowerPoint with some nice animations.
http://research.microsoft.com/pubs/155552/decisionForests_MSR_TR_2011_114.pdf is not available
It is in report format and compares decision forests to other types of machine learning algorithms such as SVM. Some simple toy problems give the basics and some real life applications such as body position recognition and medical image are included.
There is also an accompanying PowerPoint with some nice animations.
http://research.microsoft.com/pubs/155552/decisionForests_MSR_TR_2011_114.pdf is not available
Alternatives to support vector machines in neuroimaging ensembles of decision trees for classification and information mapping with predictive models
This is a nice tutorial for using random decision forests for classifying medical images. There is a comparison with some other methods, especially SVM's.
http://web.stanford.edu/~richiard/slides/PRNI2013Tutorial_export.pdf is not available
http://web.stanford.edu/~richiard/slides/PRNI2013Tutorial_export.pdf is not available
Subscribe to:
Posts (Atom)

