This module is a basic implementation of Random Ferns that allows users to define their own weak learners (the tests performed at each node).
These examples train on three spiral (without noise) and predict the whole plane. They try 4 different weak learners: axis aligned, linear, conic and parabolas.
python example_ferns.py
Using one single fern:
Using 50 ferns, with soft or hard decision boundaries:
These examples train on two circles and predict the center of the bottom right quadrant (predicting the center of the image would be too easy!). They try 4 different weak learners: axis aligned, linear, conic and parabolas.
python example_ferns_regression.py
Using one single fern:
Using 50 ferns:
[1] M. Ozuysal, P. Fua and V. Lepetit, "Fast Keypoint Recognition in Ten Lines of Code",
Conference on Computer Vision and Pattern Recognition, Minneapolis, MI, June 2007.
http://cvlab.epfl.ch/software/ferns
[2] https://github.com/rened/RandomFerns.jl (Note that R. Donner uses averaging for regression)