Skip to content
# puzzlr

## data science

# Tag: R

# Understanding Kadane’s Solution to the Maximum Subarray Problem

There is something called the maximum subarray problem, and it goes something like this.You are given an array of numbers: something like 3,5,-2,-1,5,3,1,-4,-6,5. Your job is to come up with the sub...
Read More
# Should you always use the median?

Pretend you wish to get an idea of the average value of your dataset. You’ve got a few choices available to you, of which the most common three are the mean, median and mode.You might argue that...
Read More
# Integrating JavaScript and d3.js into R Notebooks

Recently the team over at RStudio released R Notebooks.R Notebooks are really interesting. Here’s some reasons why: You can write code in several different languages in one document (including...
Read More
# Three simple matrix decompositions in R

In the confusing world of matrix decompositions, three of the most useful are , (the Cholesky decomposition) and .Here’s some R code to explore these useful beasts. 1. A = LUPresent in every te...
Read More
# Write your own logistic regression function in R

Ever wondered how logistic regression really works?You’re not alone. It’s confusing.This post drills down into the mechanics of logistic regression. We’ll go through the mathematic...
Read More
# Linear Regression in R

As humans, we’re drawn to cause and effect. Even when it’s wrong of us to do so.When it gets hot, it’s not necessarily because of global warming. An increase in homeless people wil...
Read More