Tivadar Danka Profile picture
I make math and machine learning accessible to everyone. Mathematician with an INTJ personality. Chaotic good.
30 subscribers
Oct 5 16 tweets 5 min read
In calculus, going from a single variable to millions of variables is hard.

Understanding the three main types of functions helps make sense of multivariable calculus.

Surprisingly, they share a deep connection. Let's see why: Image In general, a function assigns elements of one set to another.

This is too abstract for most engineering applications. Let's zoom in a little! Image
Oct 4 17 tweets 5 min read
The Law of Large Numbers is one of the most frequently misunderstood concepts of probability and statistics.

Just because you lost ten blackjack games in a row, it doesn’t mean that you’ll be more likely to be lucky next time.

What is the law of large numbers, then? Read on: Image The strength of probability theory lies in its ability to translate complex random phenomena into coin tosses, dice rolls, and other simple experiments.

So, let’s stick with coin tossing.

What will the average number of heads be if we toss a coin, say, a thousand times?
Oct 2 14 tweets 5 min read
What is common between the Fourier series and the Cartesian coordinate system?

More than you think: they are (almost) the same.

I'll explain why: Image Let's start with the basics: the inner product.

In the Euclidean plane, it can be calculated using the "magnitude x magnitude x cosine" formula, also known as the geometric definition. Image
Sep 26 12 tweets 4 min read
Differentiation reveals much more than the slope of the tangent plane.

We like to think about it that way, but from a different angle, differentiation is the same as an approximation with a linear function. This allows us to greatly generalize the concept.

Let's see why! Image By definition, the derivative of a function at the point 𝑎 is defined by the limit of the difference quotient, representing the rate of change. Image
Sep 25 14 tweets 5 min read
Understanding graph theory will seriously enhance your engineering skills; you must absolutely be familiar with them.

Here's a graph theory quickstart, in collaboration with @alepiad.

Read on: Image What do the internet, your brain, the entire list of people you’ve ever met, and the city you live in have in common?

These are all radically different concepts, but they share a common trait.

They are all networks that establish relationships between objects. Image
Sep 11 15 tweets 5 min read
Logistic regression is one of the simplest models in machine learning, and one of the most revealing.

It shows how to move from geometric intuition to probabilistic reasoning. Mastering it sets the foundation for everything else.

Let’s dissect it step by step! Image Let’s start with the most basic setup possible: one feature, two classes.

You’re predicting if a student passes or fails based on hours studied.

Your input x is a number, and your output y is either 0 or 1.

Let's build a predictive model! Image
Sep 8 16 tweets 5 min read
Matrix multiplication is not easy to understand.

Even looking at the definition used to make me sweat, let alone trying to comprehend the pattern. Yet, there is a stunningly simple explanation behind it.

Let's pull back the curtain! Image First, the raw definition.

This is how the product of A and B is given. Not the easiest (or most pleasant) to look at.

We are going to unwrap this. Image
Sep 7 18 tweets 6 min read
Behold one of the mightiest tools in mathematics: the camel principle.

I am dead serious. Deep down, this tiny rule is the cog in many methods. Ones that you use every day.

Here is what it is, how it works, and why it is essential: Image First, the story:

The old Arab passes away, leaving half of his fortune to his eldest son, third to his middle son, and ninth to his smallest.

Upon opening the stable, they realize that the old man had 17 camels. Image
Sep 7 18 tweets 5 min read
The way you think about the exponential function is wrong.

Don't think so? I'll convince you. Did you realize that multiplying e by itself π times doesn't make sense?

Here is what's really behind the most important function of all time: Image First things first: terminologies.

The expression aᵇ is read "a raised to the power of b."

(Or a to the b in short.) Image
Sep 5 16 tweets 5 min read
In machine learning, we use the dot product every day.

However, its definition is far from revealing. For instance, what does it have to do with similarity?

There is a beautiful geometric explanation behind: Image By definition, the dot product (or inner product) of two vectors is defined by the sum of coordinate products. Image
Sep 5 34 tweets 9 min read
The single biggest argument about statistics: is probability frequentist or Bayesian?

It's neither, and I'll explain why.

Deep-dive explanation incoming: Image First, let's look at what probability is.

Probability quantitatively measures the likelihood of events, like rolling six with a die. It's a number between zero and one.

This is independent of interpretation; it’s a rule set in stone. Image
Sep 4 22 tweets 7 min read
You have seen the famous bell curve hundreds of times before.

Contrary to popular belief, this is NOT a probability, but a probability density.

What are densities, and why do we need them? Read on: Image First, let's talk about probability.

The gist is, probability is a function P(A) that takes an event (that is, a set), and returns a real number between 0 and 1.

The event is a subset of the so-called sample space, a set often denoted with the capital Greek omega (Ω). Image
Sep 4 19 tweets 6 min read
Neural networks are stunningly powerful.

This is old news: deep learning is state-of-the-art in many fields, like computer vision and natural language processing. (But not everywhere.)

Why are neural networks so effective? I'll explain: Image First, let's formulate the classical supervised learning task!

Suppose that we have a dataset D, where xₖ is a data point and yₖ is the ground truth. Image
Sep 4 16 tweets 5 min read
Logistic regression is one of the simplest models in machine learning, and one of the most revealing.

It shows how to move from geometric intuition to probabilistic reasoning. Mastering it sets the foundation for everything else.

Let’s dissect it step by step! Image Let’s start with the most basic setup possible: one feature, two classes.

You’re predicting if a student passes or fails based on hours studied.

Your input x is a number, and your output y is either 0 or 1.

Let's build a predictive model! Image
Sep 3 19 tweets 6 min read
The way you think about the exponential function is wrong.

Don't think so? I'll convince you. Did you realize that multiplying e by itself π times doesn't make sense?

Here is what's really behind the most important function of all time: Image First things first: terminologies.

The expression aᵇ is read "a raised to the power of b."

(Or a to the b in short.) Image
Sep 3 15 tweets 5 min read
Graph theory will seriously enhance your engineering skills.

Here's why you must be familiar with graphs: Image What do the internet, your brain, the entire list of people you’ve ever met, and the city you live in have in common?

These are all radically different concepts, but they share a common trait.

They are all networks that establish relationships between objects. Image
Sep 3 17 tweets 6 min read
Matrix multiplication is not easy to understand.

Even looking at the definition used to make me sweat, let alone trying to comprehend the pattern. Yet, there is a stunningly simple explanation behind it.

Let's pull back the curtain! Image First, the raw definition.

This is how the product of A and B is given. Not the easiest (or most pleasant) to look at.

We are going to unwrap this. Image
Sep 1 19 tweets 6 min read
Behold one of the mightiest tools in mathematics: the camel principle.

I am dead serious. Deep down, this tiny rule is the cog in many methods. Ones that you use every day.

Here is what it is, how it works, and why it is essential: Image First, the story:

The old Arab passes away, leaving half of his fortune to his eldest son, third to his middle son, and ninth to his smallest.

Upon opening the stable, they realize that the old man had 17 camels. Image
Aug 23 16 tweets 5 min read
In calculus, going from a single variable to millions of variables is hard.

Understanding the three main types of functions helps make sense of multivariable calculus.

Surprisingly, they share a deep connection. Let's see why: Image In general, a function assigns elements of one set to another.

This is too abstract for most engineering applications. Let's zoom in a little! Image
Aug 22 16 tweets 5 min read
The most important concept in probability and statistics: the expected value

For instance, all the popular loss functions in machine learning, like cross-entropy, are expected values. However, its definition is far from intuitive.

Here is what's behind the scenes: Image It's better to start with an example.

So, let's play a simple game! The rules: I’ll toss a coin, and if it comes up heads, you win $1. However, if it is tails, you lose $2.

Should you even play this game with me? We’ll find out.
Aug 21 24 tweets 8 min read
Adding numbers is more exciting than you think.

For instance, summing the same alternating sequence of 1s and (-1)s can either be zero or one, depending on how we group the terms. What's wrong?

I'll explain. Enter the beautiful world of infinite series: Image Let’s go back to square one: the sum of infinitely many terms is called an infinite series. (Or series in short.)

Infinite series form the foundations of mathematics. Image