Clicky

Centrally Distributed from c++ to fixed-income markets, and everything in between

Rotating Variadic Template Metaprogramming

png

Happy Halloween! If anyone is looking for a well-presented C++ core concept video, at msdn, Stephen T. Lavavej, has a series of videos which are highly recommended.

I’m sure many of us have heard how the compiler is Turing complete. In Stephen’s 8th video, he showed us how to manipulate template parameters to sort an int array of arbitrary length during compile time using variadic template metaprogramming. Mind = Blown.

Okay, this TMP isn’t rotating, but I thought I get my hands dirty by implementing the rotate algorithm from STL’s algorithm library. Rotate takes a list and shuffles all the elements forward by one, with the element at the front of the list being pushed to the back.

Read More

Interpreting Coefficients of Logistic Regressions

png

Giggles: Key + Wii = Kiwi; Math!

Dug out this relatively old notebook from a while ago when I was learning about logistic regression. We all know that the coefficients of a linear regression relates to the response variable linearly, but the answer to how the logistic regression coefficients related was not as clear.

If you’re also wondering the same thing, I’ve worked through a practical example using Kaggle’s Titanic dataset and validated it against Sklearn’s logistic regression library.

Read More

Kaggle Titanic Competition Walkthrough

jpeg

Welcome to my first, and rather long post on data analysis. Recently retook Andrew Ng’s machine learning course on Coursera, which I highly recommend as an intro course, and Harvard’s CS109 Data Science that’s filled with practical python examples and tutorials, so I thought I’d apply what I’ve learned with some real-life data sets.

Kaggle’s Titanic competition is part of their “getting started” competition for budding data scientists. The forum is well populated with many sample solutions and pointers, so I’d thought I’d whipping up a classifier and see how I fare on the Titanic journey.

Introduction and Conclusion (tl;dr)

Given the elaborative post, thought it’d be a good idea to post my thoughts at the very top for the less patient.

The web version of this notebook might be a bit hard to digest, if you’d like to try running each of the python cell blocks and to play around with the data, click here for a copy.

I’ll skip the introduction to what Titanis is about, as for the competition, this notebook took me about 3 weekends to complete, given the limited number of training size, so throwing away training rows wasn’t optimal. Like any data science project, I started by exloring every raw feature that was given, trying to connect the high level relationships with what I know about ship wrecks. Once I felt comfortable with the data set, a majority of my time was impute missing values by cleaning and engineering new features. Without referring to external resources, there’s quite a bit of creativity that’s needed to come up with differentiating factors.

The way I wanted to construct this post is to give a narrative of my analysis by starting with some introductory exploration then making incremental conclusions. Everything is written in python with Jupyter notebook, so it’s easy to clone my repo and fiddle around with the data yourself, so let’s get started!

Read More

Rice Lake Aerial Video

Hi there! Welcome to the first post. Decided to migrate my site away from Wordpress after several security loopsholes that gave me some trouble. As of this posting, I’d like to thank github for hosting and jekyll for powering my blog.

Going to reshare some of my previous aerial videos I took a while back just to get some content started. Have a look if you haven’t seen it, hopefully there’s more to come!

Rice Lake Aerial

Read More