A simple code to calculate the performance metrics of a binary classifier

1. Code

import numpy as np

def perf_metrics_2X2(yobs, yhat):
"""
Returns the specificity, sensitivity, positive predictive value, and negeative predictive value
of a 2X2 table.

where:
0 = negative case
1 = positive case

Parameters
----------
yobs : array of . . .

February 08, 2018

How to create an alias in Windows Powershell to launch Jupyter and Python

- Why am I doing this?

Running Jupyter and PIP becomes painful if you don't have admin privileges for your computer; A solution to this is to enter the entire path to PIP and/or Jupyter but it can very time consuming and inefficient. A way around this is to create and alias for the terminal to interpret a short command as if you . . .

December 01, 2017

Tuning scikit-learn parameters using optimization instead of random search

The problem

On previous posts I described how to perform non-linear curve fitting in Ptyhon and Julia. At their core non-linear and linear curve fitting (or regression) are optimization problems in which we find the parameters that minimize an objective function. The entire field of mathematical optimization is concerned . . .

November 13, 2017

No content...

Why am I doing this?

This is the second installment on a blog series about how to use Python for Data Analysis at CyVerse. If you are not familiar with CyVerse, please read my previous post.

What you will need

1. An Instance (Virtual Machine) in Atmosphere. Read the previous blog on this series if you don't . . .

July 20, 2017

Why am I doing this?

The current workflow for data analysis and scientific computing in medical imaging requires the storage and processing of tens of millions of voxels per patient. Unfortunately, a personal PC/laptop is inadequate for such tasks.

What is CyVerse?

"OUR MISSION TO DESIGN, DEPLOY, . . .

July 20, 2017

Non Linear regression in Julia is ~10X faster than Python and ~635X faster than Matlab.

Why Julia ?

I gave a talk a couple weeks ago at the Tucson Python MeetUp about how Julia and Python can
be used to analyze medical images. It turns out that for a simple processing task of calculating a T1 map of a lemon Julia is ~10X faster than Python and ~635X faster than Matlab. Besides speed, Julia offers great features:

. . .