Frank Portman
http://fportman.com/
Recent content on Frank Portman
Hugo  gohugo.io
enus
Wed, 12 Sep 2018 20:12:55 0700

Software
http://fportman.com/software/
Wed, 12 Sep 2018 20:12:55 0700
http://fportman.com/software/
bayesAB Github: https://github.com/FrankPortman/bayesAB/ Website: https://frankportman.github.io/bayesAB/
bayesAB is an R package which provides a suite of functions to conduct and interpret the results of an A/B test in a Bayesian way. The package is meant to be used at all steps of the process  from choosing a prior, to interpreting final results, and then calculating lifts based on certain thresholds. bayesAB currently supports 8 common probability distributions. Currently used for inference at: Uber, Netflix, Microsoft, Blizzard, and others.

Home
http://fportman.com/home/
Wed, 12 Sep 2018 20:03:55 0700
http://fportman.com/home/
First a skier, second a Statistician + Machine Learning Engineer. Currently doing Machine Learning @Twitter Cortex. Previously working on competitive intelligence @Uber and selfdriving @UberATG. I also write code that others use.

On the German Tank / Taxicab Problem
http://fportman.com/blog/onthegermantank/taxicabproblem/
Wed, 30 Nov 2016 19:23:00 0800
http://fportman.com/blog/onthegermantank/taxicabproblem/
As a Statistician it naturally follows that getting the chance to use Statistics at work is surprisingly rare. That means that when I can actually use probability distributions and random variables to solve a real world problem I get very excited.
Recently, I had an opportunity to apply the 'Taxicab Problem' to something that came up at work. Given that I work for a ridesharing platform and I was quite literally counting "taxis" (or at least cars meant to drive others around), this was doubly exquisite.

bayesAB 0.7.0 + A Primer on Priors
http://fportman.com/blog/bayesab0.7.0aprimeronpriors/
Tue, 11 Oct 2016 16:51:03 0400
http://fportman.com/blog/bayesab0.7.0aprimeronpriors/
bayesAB 0.7.0 Quick announcement that my package for Bayesian AB Testing, bayesAB, has been updated to 0.7.0 on CRAN. Some improvements on the backend as well a few tweaks for a more fluid UX/API. Some links:
bayesAB Github Repo CRAN Page Now, on to the good stuff.
Why should we care about priors? Most questions I've gotten since I released bayesAB have been along the lines of:
Why/how is Bayesian AB testing better than Frequentist hypothesis AB testing?

bayesAB: A New R Package for Bayesian AB Testing
http://fportman.com/blog/bayesabanewrpackageforbayesianabtesting/
Mon, 03 Oct 2016 19:35:52 0700
http://fportman.com/blog/bayesabanewrpackageforbayesianabtesting/
This is a port of the bayesAB vignette. Check the full vignette here. Check it out on Github here. Newer version has since been released.
Most A/B test approaches are centered around frequentist hypothesis tests used to come up with a point estimate (probability of rejecting the null) of a hardtointerpret value. Oftentimes, the statistician or data scientist laying down the groundwork for the A/B test will have to do a power test to determine sample size and then interface with a Product Manager or Marketing Exec in order to relay the results.

A Graphical Extension of Twitter's Anomaly Detection Package
http://fportman.com/blog/agraphicalextensionoftwittersanomalydetectionpackage/
Sat, 02 Jan 2016 12:40:43 0800
http://fportman.com/blog/agraphicalextensionoftwittersanomalydetectionpackage/
My New Year's resolution is to make more than one blog post in 2016. I'm halfway to my minimum goal as of January 2nd so things are looking good.
Background Twitter released a new R package earlier this year named AnomalyDetection (link to Github). The Github goes into a bit more detail, but at a highlevel it uses a Seasonal Hybrid ESD (SHESD) which is built upon the Generalized ESD (Extreme Studentized Deviate Test)  a test for outliers.

On Lagrange Polynomials
http://fportman.com/blog/onlagrangepolynomials/
Wed, 30 Sep 2015 22:46:57 0700
http://fportman.com/blog/onlagrangepolynomials/
Let's take \(n\) distinct points on the real line:
$$ t_1 Yay. We can now define the Lagrange Polynomials :
$$ p_k(t) := \prod_{\substack{1 \le j \le n \\ j \neq k}}\frac{t  t_j}{t_k  t_j} \; \; \; \mbox{for} \; k = 1, 2, . . ., n $$ Why am I making you look at this beautÃ©? Turns out there's some neat mathematical properties  namely in the subject of polynomial interpolation.

FedEx Owns Memphis
http://fportman.com/blog/fedexownsmemphis/
Sun, 15 Dec 2013 19:19:41 0800
http://fportman.com/blog/fedexownsmemphis/
Look at the intraday distribution of flights and delays for Memphis:
We see a pretty interesting pattern. Turns out the FedEx shipments control most of the flights out of Memphis which gives us this unique shape.
Other airports tend to slowly but surely build up delays over the course of the day as delays cascade onto each other.
In Memphis, FedEx clogs up the airport with its 3 daily shipouts.

Stock Market Predictions with Artificial Neural Networks
http://fportman.com/blog/stockmarketpredictionswithartificialneuralnetworks/
Sat, 20 Apr 2013 19:19:41 0800
http://fportman.com/blog/stockmarketpredictionswithartificialneuralnetworks/
Update 20170926: Please don't email me asking to share the final model with you.
For one of my computational finance classes, I attempted to implement a Machine Learning algorithm in order to predict stock prices, namely S&P 500 Adjusted Close prices. In order to do this, I turned to Artificial Neural Networks (ANN) for a plethora of reasons. ANNs have been known to work well for computationally intensive problems where a user may not have a clear hypothesis of how the inputs should interact.

Fractal Fern
http://fportman.com/blog/fractalfern/
Fri, 05 Apr 2013 19:19:41 0800
http://fportman.com/blog/fractalfern/
Let's plant a Barnsley fern.
library(ggplot2) z < matrix(c(0, 0), nrow = 2) x < c() y < c() for (i in 1:40000) { r < runif(1) if (r < .01) { z < matrix(c(0, 0, 0, .16), nrow = 2, byrow = T) %*% z } else if (r < .86) { z < matrix(c(.85, .04, .04, .85), nrow = 2, byrow = T) %*% z + c(0, 1.6) } else if (r < .

Visualizing McDonald's' Global Expansion
http://fportman.com/blog/visualizingmcdonaldsglobalexpansion/
Tue, 25 Dec 2012 19:19:41 0800
http://fportman.com/blog/visualizingmcdonaldsglobalexpansion/
I was inspired by a few animated gifs that I saw recently so I decided to make one of my own. For this project, I sought out a way to effectively visualize how Mcdonald's expanded throughout the world. To do this, I created a heatmap of the world and using animations I was able to efficiently map out how McDonald's became more popular over time.
The data I am using is from this Wikipedia page.

Visualizing Napoleon's March to Moscow
http://fportman.com/blog/visualizingnapoleonsmarchtomoscow/
Tue, 13 Nov 2012 19:19:41 0800
http://fportman.com/blog/visualizingnapoleonsmarchtomoscow/
For this post, I attempted to reconstruct a famous visualization of Napoleon's March to Moscow. The French Invasion of Russia is considered a major turning point in the Napoleonic Wars. Up until that point, Napoleon's army was vast in size. By the end of his March on Moscow, the French army was reduced to a tiny fraction of its size.
Pictured above is Charles Minard's flow map of Napoleon's march.

License
http://fportman.com/license/
Mon, 01 Jan 0001 00:00:00 +0000
http://fportman.com/license/
The MIT License (MIT)
Copyright © 2018 Frank Portman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: