I recently started looking at concurrent programming in C++ and decided to design my own future class as an exercise. Throughout several iterations of the design, I learned a lot about why C++ futures are designed the way they are. A future represents a later-known value. Values are usually computed eagerly. In the code below, the value f is co... Read more 15 Jun 2021 - 20 minute read
Introduction Consider the optimization problem \[\begin{aligned} \inf_{x \in E} &\quad f(x) \\ \text{subject to} &\quad g(x) \leq 0, \end{aligned}\] where the function \(g: \mathbb{R}^n \to \mathbb{R^p}\) defines \(p\) constraints. Constraints can also be built into the set \(E \subseteq \mathbb{R}^n\). The Lagrangian The Lagrangian... Read more 16 Aug 2020 - 14 minute read
Suppose I train two binary classifiers on some data, and after examining the score distributions of each, I see the results below. Which score distribution is better? (And by extension, which classifier is better?) A naive answer is that the bimodal distribution on the right is better because it “discriminates... Read more 29 Sep 2019 - 6 minute read
In this post, I walk through implementing a basic feed forward deep neural network in Python from scratch. See Introduction to neural networks for an overview of neural networks. The post is organized as follows: Predictive modeling overview Training DNNs Stochastic gradient descent Forward propagation Back propaga... Read more 17 Sep 2019 - 19 minute read
In this post, I walk through some basics of neural networks. I assume the reader is already familar with some basic ML concepts such as logistic regression, linear regression, and classifier decision boundaries. Single neuron Neural networks are made up of neurons. A single neuron in a neural network takes inputs \(x_1, x_2, \ldots, x_p\), ap... Read more 11 Aug 2019 - 7 minute read