A Practical Approach to Data Ethics
There is a Golden Rule in life. It’s a maxim that appears in various forms around the world: One should never do that to another which one regards as injurious to one’s own self. As a data scientist, I find this principle of reciprocity very appealing! Treat others’ data... Read more
How Tidyverse Guides R Programmers Through Data Science Workflows
Whenever someone asks me how to get into data science using R, I invariably recommend checking out the tidyverse package. Tidyverse is a great launch pad for a language like R because it offers order and consistency. I studied programming language design as a CS undergrad. At the time,... Read more
Setting Your Hypothesis Test Up For Success
I want to go deep with you on exactly how I work with stakeholders ahead of launching a hypothesis test. This step is crucial to make sure that once a test is done running, we’ll actually be able to analyze it. This includes: A well-defined hypothesis A solid test... Read more
Organizing Your Next Data Science Project to Minimize Headaches
Call it the data scientist’s curse, but every practitioner has had a project that became unmanageable at some point because of poor organizational choices early on. We’ve all been at our desks at 2 a.m. changing values and re-running our scripts for the 80th time in an hour, asking... Read more
Three Popular Clustering Methods and When to Use Each
In the mad rush to find new ways of teasing apart labeled data, we often forget about everything we can do with unsupervised learning. Unsupervised machine learning can be very powerful in its own right, and clustering is by far the most common expression of this group of problems.... Read more
Performance of ranged accesses into arrays: modulo, multiply-shift and masks
Suppose that you wish to access values in an array of size n, but instead of having indexes in [0,n), you have arbitrary non-negative integers. This sort of problems happens when you build a hash table or other array-backed data structure. The naive approach to this problem is to... Read more
Modern processors use many tricks to go faster. They are superscalar which means that they can execute many instructions at once. They are multicore, which means that each CPU is made of several baby processors that are partially independent. And they are vectorized, which means that they have instructions... Read more
Are Vectorized Random Number Generators Actually Useful?
Our processors benefit from “SIMD” instructions. These instructions can operate on several values at once, thus greatly accelerating some algorithms. Earlier, I reported that you can multiply the speed of common (fast) random number generators such as PCG and xorshift128+ by a factor of three or four by vectorizing... Read more
Convert Pandas Categorical Data for SciKit-Learn
As you encounter various data elements you should come across categorical data. Some individuals simply discard this data in their analysis or do not bring it into their models. That is certainly an option, however many times the categorical data represents information that we would typically want to bring in to... Read more
Training with PyTorch on Amazon SageMaker
PyTorch is a flexible open source framework for Deep Learning experimentation. In this post, you will learn how to train PyTorch jobs on Amazon SageMaker. I’ll show you how to: build a custom Docker container for CPU and GPU training, pass parameters to a PyTorch script, save the trained model. As usual, you’ll find my code... Read more