Blog Archives

Different ways to get memory consumption or lessons learned from “memory_profiler“

July 24, 2013
By
Different ways to get memory consumption or lessons learned from “memory_profiler“

As part of the development of memory_profiler I've tried several ways to get memory usage of a program from within Python. In this post I'll describe the different alternatives I've tested. The psutil library psutil is a python library that provides an...

Read more »

Numerical optimizers for Logistic Regression

May 19, 2013
By
Numerical optimizers for Logistic Regression

Following a challenge proposed by Gael to my group I compared several implementations of Logistic Regression. The task was to implement a Logistic Regression model using standard optimization tools from scipy.optimize and compare them against state of ...

Read more »

Logistic Ordinal Regression

May 1, 2013
By
Logistic Ordinal Regression

TL;DR: I've implemented a logistic ordinal regression or proportional odds model. Here is the Python code The logistic ordinal regression model, also known as the proportional odds was introduced in the early 80s by McCullagh [1, 2] and is a generali...

Read more »

Isotonic Regression

April 15, 2013
By
Isotonic Regression

My latest contribution for scikit-learn is an implementation of the isotonic regression model that I coded with Nelle Varoquaux and Alexandre Gramfort. This model finds the best least squares fit to a set of points, given the constraint that the f...

Read more »

Householder matrices

March 29, 2013
By
Householder matrices

Householder matrices are square matrices of the form $$ P = I - \beta v v^T$$ where $\beta$ is a scalar and $v$ is a vector. It has the useful property that for suitable chosen $v$ and $\beta$ it makes the product $P x$ to zero out all of the coordinat...

Read more »

Loss Functions for Ordinal regression

February 26, 2013
By
Loss Functions for Ordinal regression

Note: this post contains a fair amount of LaTeX, if you don't visualize the math correctly come to its original location In machine learning it is common to formulate the classification task as a minimization problem over a given loss function. Given...

Read more »

Memory plots with memory_profiler

January 3, 2013
By
Memory plots with memory_profiler

Besides performing a line-by-line analysis of memory consumption, memory_profiler exposes some functions that allow to retrieve the memory consumption of a function in real-time, allowing e.g. to visualize the memory consumption of a given function ove...

Read more »

Singular Value Decomposition in SciPy

December 7, 2012
By
Singular Value Decomposition in SciPy

SciPy contains two methods to compute the singular value decomposition (SVD) of a matrix: scipy.linalg.svd and scipy.sparse.linalg.svds. In this post I'll compare both methods for the task of computing the full SVD of a large dense matrix. The first me...

Read more »

Learning to rank with scikit-learn: the pairwise transform

October 22, 2012
By
Learning to rank with scikit-learn: the pairwise transform

This tutorial introduces the concept of pairwise preference used in most ranking problems. I'll use scikit-learn and for learning and matplotlib for visualization. In the ranking setting, training data consists of lists of items with some order specifi...

Read more »

line-by-line memory usage of a Python program

April 24, 2012
By

My newest project is a Python library for monitoring memory consumption of arbitrary process, and one of its most useful features is the line-by-line analysis of memory usage for Python code. I wrote a basic prototype six months ago after being surpris...

Read more »


Subscribe

Email:

  Subscribe