Posts Tagged ‘ Pragmatic Data Science ’

Step-Debugging magrittr/dplyr Pipelines in R with wrapr and replyr

March 6, 2017
By

In this screencast we demonstrate how to easily and effectively step-debug magrittr/dplyr pipelines in R using wrapr and replyr. Some of the big issues in trying to debug magrittr/dplyr pipelines include: Pipelines being large expressions that are hard to line-step into. Visibility of intermediate results. Localizing operations (in time and code position) in the presence … Continue reading Step-Debugging magrittr/dplyr Pipelines in R with wrapr and replyr

Read more »

vtreat: prepare data

March 3, 2017
By
vtreat: prepare data

This article is on preparing data for modeling in R using vtreat. Our example Suppose we wish to work with some data. Our example task is to train a classification model for credit approval using the ranger implementation of the random forests method. We will take our data from John Ross Quinlan's re-processed "credit approval" … Continue reading vtreat: prepare data

Read more »

The Zero Bug

February 21, 2017
By
The Zero Bug

I am going to write about an insidious statistical, data analysis, and presentation fallacy I call “the zero bug” and the habits you need to cultivate to avoid it. The zero bug Here is the zero bug in a nutshell: common data aggregation tools often can not “count to zero” from examples, and this causes … Continue reading The Zero Bug

Read more »

A Theory of Nested Cross Simulation

January 2, 2017
By
A Theory of Nested Cross Simulation

[Reader’s Note. Some of our articles are applied and some of our articles are more theoretical. The following article is more theoretical, and requires fairly formal notation to even work through. However, it should be of interest as it touches on some of the fine points of cross-validation that are quite hard to perceive or … Continue reading A Theory of Nested Cross Simulation

Read more »

Data Preparation, Long Form and tl;dr Form

December 26, 2016
By
Data Preparation, Long Form and tl;dr Form

Data preparation and cleaning are some of the most important steps of predictive analytic and data science tasks. They are laborious, where most of the errors are made, your last line of defense against a wild data, and hold the biggest opportunities for outcome improvement. No matter how much time you spend on them, they … Continue reading Data Preparation, Long Form and tl;dr Form

Read more »

A Simple Example of Using replyr::gapply

December 19, 2016
By
A Simple Example of Using replyr::gapply

It’s a common situation to have data from multiple processes in a “long” data format, for example a table with columns measurement and process_that_produced_measurement. It’s also natural to split that data apart to analyze or transform it, per-process — and then to bring the results of that data processing together, for comparison. Such a work … Continue reading A Simple Example of Using replyr::gapply

Read more »

A Simple Example of Using replyr::gapply

December 19, 2016
By
A Simple Example of Using replyr::gapply

It’s a common situation to have data from multiple processes in a “long” data format, for example a table with columns measurement and process_that_produced_measurement. It’s also natural to split that data apart to analyze or transform it, per-process — and then to bring the results of that data processing together, for comparison. Such a work … Continue reading A Simple Example of Using replyr::gapply

Read more »

The case for index-free data manipulation

December 10, 2016
By
The case for index-free data manipulation

Statisticians and data scientists want a neat world where data is arranged in a table such that every row is an observation or instance, and every column is a variable or measurement. Getting to this state of “ready to model format” (often called a denormalized form by relational algebra types) often requires quite a bit … Continue reading The case for index-free data manipulation

Read more »

Using replyr::let to Parameterize dplyr Expressions

December 7, 2016
By
Using replyr::let to Parameterize dplyr Expressions

Imagine that in the course of your analysis, you regularly require summaries of numerical values. For some applications you want the mean of that quantity, plus/minus a standard deviation; for other applications you want the median, and perhaps an interval around the median based on the interquartile range (IQR). In either case, you may want … Continue reading Using replyr::let to Parameterize dplyr Expressions

Read more »

Be careful evaluating model predictions

December 3, 2016
By
Be careful evaluating model predictions

One thing I teach is: when evaluating the performance of regression models you should not use correlation as your score. This is because correlation tells you if a re-scaling of your result is useful, but you want to know if the result in your hand is in fact useful. For example: the Mars Climate Orbiter … Continue reading Be careful evaluating model predictions

Read more »


Subscribe

Email:

  Subscribe