Data Science, Optimization, Programming

Double Helix — Photo by Daniil Kuželev on Unsplash

If you have heard of systematic trading or algorithmic trading, then you must know that optimization of strategy is among one of the most important factors that dictate whether the strategy would even break even. And the worst part is: optimization is very computationally heavy. …


Data Science, Programming, Pandas, Efficiency

Photo by Chris Ried on Unsplash

Python, arguably the coolest programming language these days (thanks for Machine Learning and Data Science), is not very well known for its efficiency when compared with one of the best programming language — C. An example of this would be conditional logics. When developing machine learning models, it is quite…


Photo by Claudio Schwarz on Unsplash

Programming

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into how to unpack iterables.

You don't need indices.

Say you have a tuple ("a", "b", "c").

If you want to assign the first element to a


Photo by David Carboni on Unsplash

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into generators.

Introduction

A generator is a subclass of a iterable.

To understand how generators work, we will need to first revise how iterables…


Photo by Max Duzij on Unsplash

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into how to flatten lists.

Situation

We have all dealt with lists of lists or even worse: lists of nested lists.

Theoretically, we can…


Photo by Mika Baumeister on Unsplash

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into checking joins in Pandas.

Situation

When we work with a collection of datasets in Python, knowing how to join the tables together is…


Photo by Chris Ried on Unsplash

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into variable comparisons.

Situation

You have variables x, y, z, and you have also got a constant c that you would like to check…


Photo by Hitesh Choudhary on Unsplash

Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into boolean evaluation.

Situation

Let’s say we have a variable x and we would like to do something if a certain condition is met…


Photo by Shane Aldendorff on Unsplash

A common machine learning modelling process goes by (1) weight initialization, (2) forward propagation, (3) loss (or cost) computation, (4) backpropagation, and (5) weight update using optimization algorithms. …


Image by Free-Photos from Pixabay

THOUGHTS AND THEORY

Google has recently released a new approach — Random Feature Attention — to replace softmax attention mechanisms in transformers for achieving similar or better performance with significant improvement in time and space complexity.

In this blog, we will look into the background of transformers, what is an attention mechanism, and…

Louis Chan

Learn from your own mistakes today makes you a better person tomorrow.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store