## Monday, May 8, 2017

### Hail Seaborn!

The [seaborn](https://seaborn.pydata.org/) heatmap perhaps is the best visualization of the correlations in a data set.

Much better than [Axes.matshow](https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.matshow.html)():

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
[Learn more about bidirectional Unicode characters](https://github.co/hiddenchars)

|     |     |
| --- | --- |
|  | importseabornassns |
|  |  |
|  | defplot_corr(data, sz=10): |
|  |   corr=data.corr() |
|  |   fig, ax=plt.subplots(figsize=(sz,sz)) \# Sample figsize in inches |
|  |   sns.heatmap(corr, |
|  |   xticklabels=corr.columns.values, |
|  |   yticklabels=corr.columns.values, ax=ax) |
|  |  |
|  | defplot_corr2(df,size=10): |
|  |   corr=df.corr() |
|  |   fig, ax=plt.subplots(figsize=(size, size)) |
|  |   ax.matshow(corr) |
|  |   plt.xticks(range(len(corr.columns)), corr.columns); |
|  |   plt.yticks(range(len(corr.columns)), corr.columns); |

[view raw](https://gist.github.com/medhavib/64523c5a1403c66081138204515c9fdc/raw/6e48eb870f5e49d18bb69d082d0d42594f8d1b89/plot_corr.py) [plot_corr.py](https://gist.github.com/medhavib/64523c5a1403c66081138204515c9fdc#file-plot_corr-py)

## About Tukeys

Tukeys provides consulting and software services to companies in healthcare and communications that are dealing with technical or scaling challenges. Please reach out to me on LinkedIn.

An interesting quote from John Tukey, who was an American mathematician (1915-2000) -

> _An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem._

Today maths and statistics form the basis of how software is developed and used around us.

## Featured Post

### [Random Forest Analysis of U.S. National Epidemiological Survey on Alcohol and Related Conditions (NESARC) data](/content/2017/01/random-forest-analysis-of-us-national.html)

In 2001/2002, the National Institute on Alcohol Abuse and Alcoholism (NIAAA) conducted the National Epidemiologic Survey on Alcohol and Re...
