Levi Profile picture
Jun 4 9 tweets 3 min read Twitter logo Read on Twitter
5 activation functions you should know!

🧵

1/9 Image
Yesterday we touched on activation functions, you should read that thread as well:



2/9
Activation Functions are just like any other mathematical function.

It has three elements/steps:

- Input (X-axis)
- Calculation
- Output (Y-axis)

Different activation functions do different math. Let's discuss 5 🔽

3/9
1️⃣ ReLU

ReLU is widely used due to its simplicity and effectiveness.

It returns the input value if it is positive and zero otherwise.

Usually, ReLU is the default activation function.

4/9 Image
2️⃣ Sigmoid

The sigmoid is a smooth S-shaped curve that maps the input to a value between 0 and 1.

Sigmoid can be used for learning complex decision functions since it introduces non-linearity.

It is mainly used for binary classification.

5/9 Image
3️⃣ Tanh

Tanh is similar to the Sigmoid function but maps the input to a value between -1 and 1.

6/9 Image
4️⃣ Leaky ReLU

Leaky ReLU is a variation of the ReLU function.

It introduces a small slope for negative inputs, preventing neurons from becoming completely inactive (zero).

7/9 Image
5️⃣ Softmax

Softmax is primarily used in the output layer for multi-class classification problems.

It transforms the raw outputs of the neural network into a vector of probabilities.

Softmax ensures that the sum of the output probabilities is equal to 1.

8/9 Image
That's it for today.

I hope you've found this thread helpful.

Like/Retweet the first tweet below for support and follow @levikul09 for more Data Science threads.

Thanks 😉

9/9

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Levi

Levi Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @levikul09

Jun 5
Weights and Biases are the engines in Neural Networks.

I will explain how they work.

1/8 Image
When data is flowing between different neurons or layers, it is not just going from A to B.

Different transformations happen to them.

These transformations are described with Weights and Biases.

Let's discuss each 🔽

2/8
1️⃣ Weight

Weights determine how important each factor is in the overall prediction.

This value will determine the influence input data has on the output product.

They work similarly as in weighted means: The input is multiplied by the weights.

3/8 Image
Read 8 tweets
Jun 3
Neural Networks can tackle complex issues with complex calculations.

But today I will make the complex simple for you!

Let's see how Neural Networks work!

1/8 Image
Yesterday we looked at the building blocks of Neural Networks.

Today we will build on this, so if you want to go back to the previous post check here:



2/8
First of all, why do we use Neural Networks?

Sometimes you will face datasets that are too complicated for a simple model like Linear Regression.

Neural Networks however can identify any relationship between the variables.

3/8 Image
Read 8 tweets
Jun 2
Neural Networks can look super complicated.

But they are all made from simple elements.

Let me explain the building blocks of a neural network.

🧵

1/6 Source: https://www.quantam...
Neural networks have two main parts:

- Nodes or Neurons
- Connections between the nodes

Here is a simple example below.

Neural Networks are usually organized in Layers. What are those?

2/6 Image
We can group the different nodes into layers:

- Input nodes are in the input layers

- Output nodes are in the output layers

Between input and output, we have the hidden layers.

3/6 Image
Read 6 tweets
May 30
5 Regression Algorithms you should know

🧵 Image
1️⃣ Linear

Linear regression is the most fundamental and widely used regression algorithm.

It assumes a linear relationship between the variables.

The goal is to find the best-fitting line that minimizes the errors between the predicted and actual values. Image
2️⃣ Polynomial

Polynomial regression allows for nonlinear relationships between variables.

It adds polynomial functions to the line equation, so it can capture more complex patterns in the data. Image
Read 7 tweets
May 29
What is label encoding in Machine Learning?

What are the advantages and disadvantages?

Let's clarify 🔽

1/6
First, we need to understand categorical values.

Categorical data are variables that contain label values rather than
numeric values.

A list of cities can be categorical data.

2/6 Image
Some algorithms can work with categories, but most cannot.

They need numerical data. This is where encoding can help.

Label encoding replaces each value with a number starting from 0.

In this example, the numbers were assigned alphabetically:

3/6 Image
Read 6 tweets
May 28
Finding the balance in ML is hard.

Underfitting & Overfitting can restrict your model.

I will explain what they mean 🧵

1/5 Image
1. You need to study for a test.

But you watch Netflix all day and don't study at all.

What will happen?

You will fail miserably.

Not studying enough for the exam is underfitting.

The model is unable to learn the data.

2/5 Image
2. You have access to previous exams

What do you do?

Study all the answers from previous tests.

What will happen?

You will fail again.

You perfectly memorized previous answers, but cannot answer a new question.

This is overfitting.

3/5 Image
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(