What is a recursion?

According to wikipedia a recursion is defined as:

“…a method of solving a problem where the solution depends on solutions to smaller instances of the same problem”

Let’s try to understand this statement using an example and then draw some conclusions.

The philosophy behind recursion:

Let’s look at a problem like calculating 5! (factorial). In order to find out the result of 5! we need to calculate:

 5! = 5 *4 *3 *2 *1

Equally we can say that:

5! = 5 *4! = 5 *4 *3 *2 *1

It seems that our factorial problem boils down to a “problem where the solution depends…

The aim of this article is to give you an intuition and understanding of closures. We will be looking at what closures are, how they work, look the prequisite knowledge in order to understand closures and a practical example.

Before we get into any of it I want you to think about a question.

How can we write a function that outputs:

1. An addition between two numbers a & b

2. A count of how many times the function has run

What is a Closure?

Explained in a very non philosophical way:

“A closure is a function plus an extended scope that contains…

The aim of this article is to help you build an intuition about what a confusion matrix is, how it works and why is important.

What is confusion matrix?

It is a matrix containing information about the accuracy of predictions for a model and it is widely used in Machine Learning classification problems.

Why do we need a confusion matrix in the first place?

The reason we look at confusion matrices in order to asses accuracy is due to class imbalances. What is that you ask ? …

Cristian Badoiu

Passionate about DataScience

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