sandbox

This is my current blog where I discuss a variety of computing topics including Linux, vim, python and javascript as well as science and statistics. Many of the posts have accompanying gists, which contain code for the example discussed.

Decision trees in python again, cross-validation

Jun 25, 2015

This is my second post on decision trees using scikit-learn and Python. The first post focused on visualizing the resulting tree. This post will concentrate on using cross-validation methods to choose the parameters used to train the tree. In particular, I'll focus on grid and random search for decision tree parameter settings. If this sounds interesting to you, following along. As always, comments, questions and corrections are welcome below.

PySoundFile and Python 3.4 on Ubuntu 14.04

Jun 16, 2015

In a previous post I went over installing PySoundFile on Ubuntu 14.04 using the default version of Python-- that's version 2.7.6. In this post I'll cover the use of Python 3.4 in a virtual environment-- the goal here, at least in the long run, is to write audio processing (dsp) code in Python that is version 2- and 3-compatible.

Decision trees in python with scikit-learn and pandas

Jun 8, 2015

In this post I will cover decision trees (for classification) in python, using scikit-learn and pandas. The emphasis will be on the basics and understanding the resulting decision tree.

Revisiting the medical tests example with Python and Lea

May 27, 2015

In this post I will use Python, and the probabilistic programming package Lea, to re-analyze an example of Bayes' Theorem covered in an earlier post. The focus will be on translating the by-hand calculations into Python code.

Probabilistic programming with Python and Lea

May 4, 2015

In this post I will cover installation of a probabilistic programming package for Python called Lea and provide some simple examples of using the package to do calculations with joint, conditional and marginal distributions. These examples follow the by-hand calculations done in a previous post.