Category: Machine Learning

  • Cosine similarity in Python

    Cosine similarity is the normalised dot product between two vectors. I guess it is called “cosine” similarity because the dot product is the product of Euclidean magnitudes of the two vectors and the cosine of the angle between them. If you want, read more about cosine similarity and dot products on Wikipedia. Here is how […]

  • How to do backpropagation in Numpy

    I have adapted an example neural net written in Python to illustrate how the back-propagation algorithm works on a small toy example. My modifications include printing, a learning rate and using the leaky ReLU activation function instead of sigmoid. import numpy as np # seed random numbers to make calculation # deterministic (just a good […]

  • Neural networks on GPUs: cost of DIY vs. Amazon

    I like to dabble with machine learning and specifically neural networks. However, I don’t like to wait for exorbitant amounts of time. Since my laptop does not have a graphics card that is supported by the neural network frameworks I use, I have to wait for a long time while my models git fitted. This […]

  • (Tentative)

    Symbiosen mellem mennesker og AI vil kunne transformere mennesket til en rationel organisme (jvf. Daniel Kahneman som har påvist at mennesket for sig selv ikke er en rationel organisme). Hvordan det? Vores minutiøse adfærd bliver i stigende grad sporet i alle livets væsentlige forhold. Kunstig intelligens bliver bedre og bedre til at skønne om vi […]

  • What kind of Machine Learning person are you?

    You may ask yourself, if I’m a machine learning person then what kind am I? See for yourself in Jason Eisner’s Three Cultures of Machine Learning.

  • PyBrain quickstart and beyond

    After pip install bybrain, the PyBrain the quick start essentially goes as follows: from import buildNetwork from pybrain.structure import TanhLayer from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer # Create a neural network with two inputs, three hidden, and one output net = buildNetwork(2, 3, 1, bias=True, hiddenclass=TanhLayer) # Create a dataset that matches […]