• ### Using Breaks To Get More Deep Work Done

January 27, 2018

It’s a great thing to constantly have goals that require prolonged periods of deep concentration. This is something I always look forward to. Deep work gives us a sense of great accomplishment when we’re finished, as well as having expanded our expertise on the domains we’ve tackled during the process.

But of course, many of us don’t buy into the “delayed gratification” thing perhaps due to biological and historical reasonsSadly, many of us never liked school in the past, and would be happy to never go back to school again. . Nature, by default, always follows the path of lowest energy and/or least resistance.

• ### How Are Bubbles Formed?

January 8, 2018

I’ve always thought of a bubble as a compounded result of residual greed when the optimism of the many are perpetually validated.

This reminds me of what Warren Buffett tells us to do when we see compelling evidence of an impending bubble:

“Be fearful when others are greedy, and greedy when others are fearful.” – Warren Buffett

But only a few have the discipline to do this, because everyone can easily forget about the principle when they’re constantly seduced by social proofs of getting rich by everyone they know, everywhere they look.

• ### On Change vs. Being Who You Are

August 20, 2017

One of the things I’ve more understood lately was the concept of adapting how I behave to the context I was in. I’m aware that I’ve been doing this, but I was also constantly questioning it.

I’ve been wondering if I might be betraying myself, or perhaps this is psychologically unhealthy in the long term, to act against my familiar behavioural inclinations.

• ### Machine Learning: Entropy and Classification

April 2, 2017

## A Simple Classification Example

Let’s say we have a dataset with categorical features $P$, $Q$, $R$, and a binary target variable $Z$:

id Feature $P$ Feature $Q$ Feature $R$ Target Variable $Z$
1 a c e $G$
2 b d e $G$
3 b d f $H$
4 a d e $G$
5 a c f $H$
6 b d f $H$

The goal is to find the feature that best predicts the value of $Z$.

• ### MySQL: Columns as Ordered Week Dates

March 8, 2016

Let’s say you have data containing some metrics and their values across an ordered set of dates in a week. Since most screens are longer horizontally than vertically, it’s sometimes better to present data where one metric lies in a row and the dates lie in columns, rather than the usual way around.

The usual way we show tables is like this:

date Visitors Orders Revenue Metric4 etc.
2016-02-28 1423 19 900
2016-02-29 1534 38 2037
2016-03-01 2645 57 5612

Because most screens are in landscape mode and because we read from left to right, there are times when it makes sense to pivot the table as follows:

metric 2016-02-28 2016-02-29 2016-03-01
Visitors 1423 1534 2645
Orders 19 38 57
Revenue 900 2037 5612
Metric4
Metric5
etc.

This may not be “tidy data” as defined by Hadley Wickham in his excellent paper, but pivoting as such results in easier navigation/scrolling when you have more metrics than dates.

• ### Deriving the Normal Equation

November 22, 2015

Consider a linear model

where

is a matrix of real numbers with $m$ as the number of samples (or rows), and $n$ is the number of features (or columns),

is a matrix (also called a vector) of coefficients $\theta_i$, and

is a matrix of target variables $y_i$ per ith sample.

• ### A Beginner's Guide on Using Data to Assess Business Performance

September 1, 2015

Running an online business that’s growing slower than projected is never an ideal scenario. What can tremendously help diagnose the problem is to have data and know how to gain insights from it. It is only through the collection and analysis of data where you can free yourself from guesswork, start validating assumptions, and gain insights on how you should be operating your business.