Random digits and Benford's law

Marton Trencseni - Sat 29 May 2021 • Tagged with statistics

The post explores the distribution of digits of random and non-random numbers from receipts, verifying Benford's law of first digit distribution.

Early stopping

Continue reading

Tricks vs implementation in coding interviews

Marton Trencseni - Sat 22 May 2021 • Tagged with hiring, interviewing

Thinking up tricky solutions in 3-5 minutes is not a requirement in a work setting. Usually, there are days or weeks for that. But implementing an idea, once the idea is there, should be straightforward for a good programmer.

Daily Coding Problem

Continue reading

10 ways to iterate from 0 to 1 with deciles

Marton Trencseni - Fri 14 May 2021 • Tagged with mlflow, tracking

What's the best way to iteratore from 0 to 1 in steps of 0.1 in Python, and what are the potential pitfalls?

Iterating from 0 to 1 in steps of 0.1

Continue reading

Sometimes brute forcing just works

Marton Trencseni - Thu 06 May 2021 • Tagged with python

I describe a real world use-case where a simple, brute force search based solution worked really well, making more sophisticated Machine Learning unnecessary.

Sample receipt

Continue reading

Building intuition for p-values and statistical significance

Marton Trencseni - Sun 25 April 2021 • Tagged with ab-testing

This is the transcript of a talk I did on experimentation and A/B testing to give the audience an intuitive understanding of p-values and statistical significance.

Coin flip

Continue reading

Random numbers, the natural logarithm and higher dimensional simplexes

Marton Trencseni - Sat 17 April 2021 • Tagged with bayesian, ab-test

The base $e$ of the natural logarithm shows up in an unexpected place. Let's derive why!

Simplex

Continue reading

Classification accuracy of quantized Autoencoders with Pytorch and MNIST

Marton Trencseni - Fri 09 April 2021 • Tagged with python, pytorch, cnn, torchvision, mnist, autoencoder

I measure how the classification accuracy of quantized Autoencoder neural network varies with encoding bits on MNIST digits.

Classifier accuracy on quantized Autoencoder output after quantization

Continue reading

Investigating information storage in quantized Autoencoders with Pytorch and MNIST

Marton Trencseni - Sun 04 April 2021 • Tagged with python, pytorch, cnn, torchvision, mnist, autoencoder

I investigate how much information an Autoencoder neural network encodes for MNIST digits.

Pytorch Autoencoder loss with encoding dimension and quantization bits

Continue reading

Building a Pytorch Autoencoder for MNIST digits

Marton Trencseni - Thu 18 March 2021 • Tagged with pytorch, autoencoder, mnist

I build an Autoencoder network to categorize MNIST digits in Pytorch.

Conversion difference vs N

Continue reading

The best parts of Invent and Wander: the Collected Writings of Jeff Bezos

Marton Trencseni - Sat 06 March 2021 • Tagged with business, experimentation, book, amazon, management

These are the best parts from the book "Invent and Wander: the Collected Writings of Jeff Bezos". The book is a collection of the annual Amazon shareholder letters that Jeff Bezos has been sending out since 1997, and speeches he has given over time.

Jeff Bezos Invent and Wander

Continue reading

Training a Pytorch Wasserstein MNIST GAN on Google Colab

Marton Trencseni - Wed 03 March 2021 • Tagged with python, pytorch, torchvision, mnist, gan

I train a Pytorch Wasserstein MNIST GAN on Google Colab to beautiful MNIST digits.

Wasserstein GAN Generated MNIST digits

Continue reading

Training a Pytorch Classic MNIST GAN on Google Colab

Marton Trencseni - Tue 02 March 2021 • Tagged with python, pytorch, torchvision, mnist, gan

I train a Pytorch Classic MNIST GAN on Google Colab to generate MNIST digits.

Classic GAN Generated MNIST digits

Continue reading

How I manage notifications to keep myself uninterrupted

Marton Trencseni - Mon 22 February 2021 • Tagged with personal, interruptions, notifications

I love using apps, email, social networking and messaging. But I want to do use them on my own time. So many years ago I decided to not let my phone interrupt me.

My phone's lock screen

Continue reading

Training a Pytorch Lightning MNIST GAN on Google Colab

Marton Trencseni - Sat 20 February 2021 • Tagged with python, pytorch, gan, mnist, google-colab

I explore MNIST digits generated by a Generative Adversarial Network trained on Google Colab using Pytorch Lightning.

Softmax GAN after 5 epoch, 100 samples.

Continue reading

Automatic MLFlow logging for Pytorch

Marton Trencseni - Sun 24 January 2021 • Tagged with mlflow, tracking

I explore the automatic logging capabilities of MLFlow for Pytorch.

MLFlow Pytorch loss example.

Continue reading

Automatic MLFlow logging for Scikit Learn

Marton Trencseni - Fri 15 January 2021 • Tagged with mlflow, tracking

I explore the automatic logging capabilities of MLFlow for Scikit Learn. In the process I found a bug in MLFlow, reported it and wrote a pull request to fix it.

MLFlow scatter plot.

Continue reading

Getting Started with MLFlow

Marton Trencseni - Sun 10 January 2021 • Tagged with mlflow, tracking

For the last few months I’ve been using MFlow in production, specifically its Tracking component. MLFlow is an open source project for lifecycle tracking and serving of ML models, coming out of Databricks. MLFlow is model agnostic, so you can use with SKLearn, XGBoost, Pytorch, Tensorflow, FBProphet, anything.

MLFlow overview

Continue reading

Making statistics lie for the 2020 Presidential election

Marton Trencseni - Thu 17 December 2020 • Tagged with ab-testing, trump, politics

After the 2020 US presidential election, the Trump campaign filed over 50 lawsuits and attacked the integrity of the elections by claiming there was voter fraud. One of the last lawsuits was filed in the Supreme Court of the United States by the state of Texas. Here I look at the statistical claims made in this lawsuit that were supposed to show irregularities in the Georgia vote.

Trump vs Biden

Continue reading

Comparing conversion at control and treatment sites

Marton Trencseni - Thu 03 December 2020 • Tagged with ab-testing

In real-life, non-digital situations, it's often not feasible to run true A/B tests. In such cases, we can compare before and after rollout conversions at a treatment site, while using a similar control site to measure and correct for seasonality. The post discusses how to compute increasingly correct p-values and bayesian probabilities in such scenarios.

Monte Carlo simulated control lifts

Continue reading

Unevenness at the edges

Marton Trencseni - Fri 30 October 2020 • Tagged with stats, data

Sometimes we look at the top performers in a field and see obviously uneven representations of groups (gender, ethnicity, etc). There a multitude of factors that can lead to it, such as unfair bias in access to opportunities. Here I will show one unintuitive mathematical effect that can contribute to such unevenness in the case of normal distributions.

Continue reading