This is a collection of stand-alone Python examples of machine learning algorithms. Run a specific recipe to see usage and result. Feel free to contribute an example (recipe should be less than 200 lines, including usage).
-
Epsilon greedy (recipes/MAB/greedy.py)
Sutton, Richard S., Barto, Andrew G. "Reinforcement Learning: An Introduction", MIT Press, Cambridge, MA (1998).
-
Softmax (recipes/MAB/softmax.py)
Luce, R. Duncan. (1963). "Detection and recognition". In Luce, R. Duncan, Bush, Robert. R. & Galanter, Eugene (Eds.), "Handbook of mathematical psychology" (Vol. 1), New York: Wiley.
-
Thompson sampling (recipes/MAB/thompson.py)
Thompson, William R. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3–4):285–294, 1933. DOI: 10.2307/2332286
-
Upper Confidence Bound (recipes/MAB/ucb.py)
Lai, T.L and Robbins, Herbert, "Asymptotically efficient adaptive allocation rules", Advances in Applied Mathematics 6:1, (1985) DOI: 10.1016/0196-8858(85)90002-8
-
Adaptive Resonance Theory (recipes/ANN/art.py)
Grossberg, Stephen (1987). Competitive learning: From interactive activation to adaptive resonance, Cognitive Science, 11, 23-63.
-
Multi-Layer Perceptron (recipes/ANN/mlp.py)
Rumelhart, David E., Hinton, Geoffrey E. and Williams, Ronald J. "Learning Internal Representations by Error Propagation". Rumelhart, David E., McClelland, James L., and the PDP research group. (editors), Parallel distributed processing: Explorations in the microstructure of cognition, Volume 1: Foundation. MIT Press, 1986.
-
Perceptron (recipes/ANN/perceptron.py)
Rosenblatt, Frank (1958), "The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain", Cornell Aeronautical Laboratory, Psychological Review, v65, No. 6, pp. 386–408. DOI:10.1037/h0042519
-
Self Organizing Map (recipes/ANN/som.py)
References: Kohonen, Teuvo. Self-Organization and Associative Memory. Springer, Berlin, 1984.