Machine learning goes beyond Deep Learning and Neural Networks

Sometimes a simpler technique might give you better results and be easier to understand

A very versatile algorithm is the Decision Forest
🌴🌲🌳?

What is it and how does it work?
Let me tell you..

[7 min]

1/10🧵
Before understanding a Forest, let's start by what's a Tree

Imagine you have a table of data of characteristics of Felines. With features like size, weight, color, habitat and a column with the labels like lion, tiger, house cat, lynx and so on.

2/10🧵
With some time, you could write a code based on if/else statements that could, for each a row in the table, decide which feline it is

This is exactly what a Decision Tree does
During its training it creates the if/elses

en.wikipedia.org/wiki/Decision_…

3/10🧵
These if/else statements can vary a lot based on which features are used so completely different trees are possible and with good results

Instead of deciding which one is the best, why not use multiple of them and decide the correct prediction based on all their results?

4/10🧵
Using multiple Decision Trees in a model, or just a group of predictors to get a better aggregate predictor is called an Ensemble method.

More specifically for Decision Trees, there are some well known methods:
• Random Forest
• Gradient-boosted Trees
• CART

5/10🧵
These 🌳 based Ensemble methods have some benefits

• Explainability. You can understand all the decisions (if/else's) they are making
• Work directly on numerical and categorical data without any preprocess
• No need to worry with layers and architectures as in NN

6/10🧵
TensorFlow now also has a Decision Forest as part of the framework

The main advantage is that, being part of the framework, your models interact with all the other tooling available like TF Serving and TFX for example.

This video explains better:

7/10🧵
For even more information about TensorFlow Decision Forests, @random_forest and @mat_gb wrote this great blot post with more in depth information.

blog.tensorflow.org/2021/05/introd…

8/10🧵
If you want to try it right now (or maybe use some "weekend study time"), this beginner's notebook tensorflow.org/decision_fores…

Can get you started!

9/10🧵
Machine Learning is more than Neural Networks and understanding more tools and algorithms can make your life easier

Decision Trees are easier to understand and in some cases better than NN!

If you liked this thread, please share and let more people learn from it!

10//10🧵

• • •

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

Keep Current with Luiz GUStavo 💉💉⏳

Luiz GUStavo 💉💉⏳ 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 @gusthema

30 May
I've been trying the new TensorFlow Decision Forest (TF-DF) library today and it's very good!

Not only the ease of use but also all the available metadata, documentation and integrations you get!

Let me show you some of the cool things I've learned so far...

[5 min]

1/11🧵
TensorFlow Decision Forests have implemented 3 algorithms:

• CART
• Random Forest
• Gradient Boosted Trees

You can get this list with tfdf.keras.get_all_models()

All of them enable Classification, Regression and Ranking Tasks

2/11🧵
CART or Classification and Regression Trees is a simple decision tree. 🌳

The process divides the dataset in two parts
The first is used to grow the tree while the second is used to prune the tree

This is a good basic algorithm to learn and understand Decision Trees

3/11🧵 Image
Read 11 tweets
28 May
#GoogleIO2021 was last week and it's a lot of content to read/watch!

I'll post summaries of all the ML talks and help you be up to date

Let's start with my talk with @kempy about how #TFHub and how people are using it on the real world



[5 min]

1/7🧵
Having access to high quality models enables developers to solve their problems!

This makes ML more accessible to everyone and helps the society with it, like:

• Defend forests from illegal hunting
• Studying & protecting whales
• Blocking spam
• Helping farmers

2/7🧵
TensorFlow Hub has models for all the ML domains such as Image, Text, Audio and Video

For image, this tutorial can get you started with Transfer Learning. It does some cool tricks with the data and the final model is ready for on-device deployment

tensorflow.org/hub/tutorials/…

3/7🧵
Read 7 tweets
18 May
Today it's my 6 year Google anniversary!

I started as an android developer 📱🤖 and today I'm an ML developer 🧠🤖

I learned a lot of technical stuff (A LOT!), but there's much more than that.

Let me tell you some of the things I learned...

1/11🧵
Being the big fish 🐳 on a small pound is cool, but you may run out of air.

Starting at this job meant becoming a tiny fish 🐠 in a big pound!

And here is where the growth opportunities are!

2/11🧵
Working with smarter people than you is sometimes very hard for your ego!
There's a lot of impostor syndrome in the beginning.

But that's a big chance to learn what these smarter people do that you can adapt and grow as bigger fish 🦈.

3/11🧵
Read 12 tweets
6 Apr
Sometimes you need to build a Machine Learning model that cannot be expressed with the Sequential API

For these moments, when you need a more complex model, with multiple inputs and outputs or with residual connections, that's when you need the Functional API!

[2.46 min]

1/8🧵
The Functional API is more flexible than the Sequential API.

The easiest way to understand is to visualize the same model created using the Sequential and Functional API

2/8🧵
You can think of the Functional API as a way to create a Directed Acyclic Graph (DAG) of layers while the Sequential API can only create a stack of layers.

Functional is also known as Symbolic or Declarative API

3/8🧵
Read 9 tweets
5 Apr
This week, let's talk about model building a little.

In the TensorFlow world, the simplest way of building a model is with a Sequential model.

But what is it and how to do it?

[4 minutes]

1/9🧵
First, let's go over some basics.

The goal here is to build a Neural Network, or in other words, create a set of neurons, distributed in layers and connected by weights.

Each Layer applies some computation on the values or tensors it receives.

2/9🧵
The simplest way to create this NN is to just do a plain stack of layers where each layer has exactly one input and one output.

This is exactly what a Sequential model does

3/9🧵
Read 9 tweets
3 Apr
Today is my birthday!

As my gift to you, I created this thread with all my NLP posts of this week to give you some technical content for your weekend!

[2 minutes]

1/11🧵
Let's start by What is NLP?



2/11🧵
"What is a Text Embedding?"



3/11🧵
Read 12 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

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

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(