Hemp seed oil’s anti inflammatory properties help to reduce pain. A few studies have shown that hemp seed oil helps the immune system, reduces inflammation and increases the antioxidant levels in the body, therefore reducing disease. They also note that hemp seed oil can help alleviate the symptoms of arthritis, rheumatoid arthritis, fibromyalgia, irritable bowel syndrome, psoriasis, inflammation of blood … Read More

## Using generators in Python to train machine learning models

If you want to train a machine learning model on a large dataset such as ImageNet, especially if you want to use GPUs, you’ll need to think about how you can stay within your GPU or CPU’s memory limits. Generators are a great way of doing this in Python. What is a generator? A generator is a function that behaves … Read More

## LSTMs for Time Series in PyTorch

I can’t believe how long it took me to get an LSTM to work in PyTorch! There are many ways it can fail. Sometimes you get a network that predicts values way too close to zero. In this post, we’re going to walk through implementing an LSTM for time series prediction in PyTorch. We’re going to use pytorch’s nn module … Read More

## Generating Autoregressive data for experiments

In this post, we will go through how to generate autoregressive data in Python, which is useful for debugging models for sequential prediction like recurrent neural networks. When you’re building a machine learning model, it’s often helpful to check that it works on simple problems before moving on to complicated ones. I’ve found this is especially useful for debugging neural … Read More

## Machine Learning resource: Chris Albon’s Code Snippets and Flashcards

I was looking for code to implement early stopping in Keras today and came across Chris Albon’s website. You may know Chris as a host of Partially Derivative, a podcast about data science. Chris has posted many snippets of commented recipe-like code to do simple things on his website. These range from ways to preprocess images, text and dates such … Read More

## What makes Numpy Arrays Fast: Memory and Strides

How is Numpy so fast? In this post we find out how Numpy’s ndarray is stored and how it is usually manipulated by Numpy functions using strides. Getting to know the ndarray A NumPy ndarray is a N-dimensional array. You can create one like this:

1 |
X = np.array([[0,1,2],[3,4,5]], dtype='int16') |

These arrays are homogenous arrays of fixed-sized items. That is, all the items in … Read More

## MSE as Maximum Likelihood

MSE is a commonly used error metric. But is it principly justified? In this post we show that minimising the mean-squared error (MSE) is not just something vaguely intuitive, but emerges from maximising the likelihood on a linear Gaussian model. Defining the terms Linear Gaussian Model Assume the data is described by the linear model , where . Assume is … Read More

## Maximum Likelihood as minimising KL Divergence

Sometimes you come across connections that are simple and beautiful. Here’s one of them! What the terms mean Maximum likelihood is a common approach to estimating parameters of a model. An example of model parameters could be the coefficients in a linear regression model , where is Gaussian noise (i.e. it’s random). Here we choose parameter values that maximise the … Read More

## RNNs as State-space Systems

It’s fantastic how you can often use concepts from one field to investigate ideas in another area and improve your understanding of both areas. That’s one of the things I enjoy most. We’ve just started studying state-space models in 3F2 Systems and Control (a third-year Engineering course at Cambridge). It’s reminded me strongly of recurrent neural networks (RNNs). Look at … Read More

## Effective Deep Learning Resources: A Shortlist

A lot of people ask me how to get started with deep learning. In this post I’ve listed a few resources I recommend for getting started. I’ve only chosen a few because I’ve found precise recommendations to be more helpful. Let me know if you have any comments or suggestions! Prelude: If you’re new to machine learning Deep learning is … Read More

- Page 1 of 2
- 1
- 2