Image for post
Image for post
Photo by GregMontani on Pixabay

Machine Learning

Introduction to the Regression Tree Model without formulas, equations, and scientific statements

This article is meant to explain the regression tree machine learning model without any buzzwords and scientific expressions, so you don’t need any pre-requisite knowledge or a Computer Science/Math degree to understand it.

As one of the most commonly used machine learning models, a decision tree is usually used for classification purposes. However, it can also be used to predict continuous numeric values. In this article, I am going to introduce a specific type of decision tree s— the regression tree. …


Image for post
Image for post
Photo by Chief22880 on Pixabay

We should write meeting summaries regardless

Yes, I’ll be started to share some self-improvement and professional working environment advice since now. If you are one of the followers of mine or have ever seen my articles before, you might be surprised why I’m starting to share knowledge in these topics given that I am a technical guy?

I am a data solution architect, data engineer and machine learning engineer. So, my day-to-day responsibilities are usually providing suggestions and implementing solutions, which seems that writing a meeting summary should not be part of my job. …


Image for post
Image for post
Photo by Alexas_Fotos on Pixabay

Python Closure — A Pythonic technique you must know

I was such a programmer who likes recursive functions very much before, simply because it is very cool and can be used to show off my programming skills and intelligence. However, in most of the circumstances, recursive functions have very high complexity that we should avoid using.

One of the much better solutions is to use Dynamic Planning when possible, which is probably the best way to solve a problem that can be divided into sub-problems. One of my previous articles has illustrated the power of Dynamic Planning.

However, in this article, I’m going to introduce another technique in Python that can be utilised as an alternative to the recursive function. It won’t outperform Dynamic Planning, but much easier in term of thinking. In other words, we may sometimes be struggling to make Dynamic Planning works because of the abstraction of the ideas, but it will be much easier to use closure. …


Image for post
Image for post
Photo by Shutterbug75 on Pixabay

Step by step tutorial from a raw dataset to a bar chart race video

Recently, a very fancy type of data visualisation ignited in various platforms such as YouTube. As long as there are some “entities” with a single measure that changes over time, this type of visualisation can be perfect to illustrate the dynamic ranking between these entities.

That is the Bar Chart Race. It is usually can be seen as a video. The video below is generated by myself using a single Python function. Have a look at it, then you will know what I’m talking about.

Do you believe the above video is generated using a single Python function with a few lines of code? …


Image for post
Image for post
Photo by fajarbudi86 on Pixabay

Dynamic Planning in Python for optimising Election Promotion

Disclamation: The 2020 US Election is merely used as background in this article. This story meant to show you such a way of thinking in computer programming. I am NEITHER expressing my viewpoints of politics NOR persuading with any ideas. All the data used in this article is made up from assumption, which does not necessarily reflect the truth in anyway.

Well, at the time I am writing this article, Joe Biden has secured the victory already. I am neither an American nor living in the US, so I won’t comment on this politically, though I think most of the people who are reading my articles might support Biden. How do I know? …


Image for post
Image for post
Photo by Free-Photos on Pixabay

Hands-on Tutorials

An Introduction of Python library — sandman2

As the most common architecture of any Web or Mobile applications, database + backend API + frontend is very typical and classic. While different applications will definitely have their own front-end design, the backend API is usually very similar. That is, they must be able to access the data in the database. In other words, the major responsibility of the backend API is acting as a middleware to receive the requests from the front-end and retrieve the database based on the requests, and then return the results to the front-end so that the users can consume.

Of course, for most of the applications, the backend API also needs a certain level of customising, especially the security requirement such as JWT and so on. However, when there is not too much security concern, there is a way to “generate” your backend API that can access your database without even coding. …


Image for post
Image for post
Photo by narciso1 on Pixabay

Generating fancy masked word cloud images using stylecloud

When someone says that we need to extract main topics from an article, would you come out the NLP (Natural Language Process) algorithms, Deep Learning with RNN, etc? Well, these are correct answers, but sometimes might be overkilled for a simple problem.

You may or may not heard of the word cloud. I would say that in some use cases, it is quite sufficient, fancy and quick solution to presenting the main topics of an article, or just a piece of text. Basically, it can do the following things:

  • Extracting the keywords of an article
  • Visualising the keywords based on the number of…


Image for post
Image for post
Photo by Free-Photos on Pixabay

Machine Learning

Let the algorithm guessing the sex of a person

Naive Bayes is one of the most classification algorithms in the classic machine learning area. It is completely based on the famous Bayes Theorem in Probability.

Don’t be scared by the words “machine learning” or “algorithm”. In this article, I’ll introduce how the Naive Bayes Classification works as a machine learning algorithm.

I always try my best to explain machine learning algorithms in plain words without any scientific expressions in this “Everyone Can Understand Machine Learning” series. However, I would expect you to have at least basic probability knowledge to understand this one. …


Image for post
Image for post
Photo by pasja1000 on Pixabay

When to use “pass”? Are there any alternatives?

For anyone like me switched to Python programming language from other languages, it is quite common to find that Python has some statements that are very unique. The “pass” statement is one of them, which you rarely can find such a thing in other programming languages. I have been using Java, C, C#, JavaScript, Objective-C, Swift, Scala and so on, none of them has the “pass” statement.

In fact, the “pass” statement is a very simple expression in Python. In this article, I’m going to introduce the several different aspects of this unique statement including its usage, the scenarios that need to use it, the benefit of using it, the reason that Python needs it and finally the potential alternatives. …


Image for post
Image for post
Photo by Lalmch on Pixabay

Why computers use the binary number system?

It is well known that binary numbers are the basis of the classic computer world that is built by John von Neumann. Yes, when I say the classic computer, it is the device you’re using at the moment unless you’re working as a researcher in the quantum computing area.

What are the considerations between the two different number systems? And why binary is used but not decimal? It is not difficult but important as the basic knowledge of computer science. In this article, I’ll share some considerations about decimal and binary number systems.

The Decimal Number System

Image for post
Image for post
Photo by geralt on Pixabay

I still remember when I was a kid, the teacher starts to teach us some numbers larger than 10. When she mentioned 11, I wrote down “101” on my paper and thought that would be correct. Unlike “ten” and “one” that is different from “eleven” in English, in my mother tongue, the pronunciation of 10 followed by the pronunciation of 1 is exactly how to say 11. …

About

Christopher Tao

Machine Learning Engineer@AEMO | Cloud Solution Architect | Data Engineer | Data Scientist | PhD of Computer Science

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