🌓

Dynamic program vs integer program: which one is better for knapsack problem?

The field of optimization encompasses many different fields of models and algorithms. You can classify the field base on many different critierias: Linear vs nonlinear, convex vs non-convex, continuous vs discrete, etc. Often times, one problem could be solved with multiple different approaches, and this is where different underlying solution philosohpies meet each other, which I find very interesting. In this article, we are going to dive deeper into the difference between dynamic programming and integer programming with the interesting and well-studied problem of knapsack problem.

Backpack

Read More

Another way to better organize Pandas code

Pandas is a powerful tool for data analysis. Writing in Pandas is a lot of fun because it enables you to do data manipulation with velocity. While working magic on a Jupyter notebook with Pandas can make you feel like a data wizard, sometimes it comes at the cost of code readability and modularity. If the code will be in production eventually (and it will be), it might be a good practice to start cleaning up your code after the exploration phase.

Read More

How to efficiently loop through Pandas DataFrame

If working with data is part of your daily job, you will likely run into situations where you realize you have to loop through a Pandas Dataframe and process each row. I recently find myself in this situation where I need to loop through each row of a large DataFrame, do some complex computation to each row, and recreate a new DataFrame base on the computation results. Savvy data scientists know immediately that this is one of the bad situations to be in, as looping through pandas DataFrame can be cumbersome and time consuming.

Read More

Build your own blog with Hexo

At this day and age, building a web blog yourself almost seems like an outdated thing to do. Most people can get by with using Wordpress or Wix, which does most of the blog-buildin...

Read More

Welcome

Welcome to my tech blog!

I will post interesting finds about different tech-related-things here regularly
(hopefully).

Read More