Everyone talks about big data but getting good data in a big amount is not always easy.

You can do much with small data as long as it is good.

A thread 🧵: Getting the most results with small data
The two notable techniques that can give huge results when working with small data are

◆ Data augmentation
◆ Transfer learning

Let's talk about them. We will use them in the context of images kind datasets but they can also be applied to other datasets such as texts.
1. Data augmentation

Data augmentation is the art of creating artificial (but realistic) data.

Not only does data augmentation expand the dataset,

but it also introduces some diversity in the training set (the reason why data augmentation is a cure for overfitting)
Take an example: Image augmentation

Creating new images might mean:

◆Flipping the existing images
◆Cropping them
◆Changing their color and contrast and
◆Adding the noise to the existing images

Image credit: Alfonso Escalante Image
In most cases, data augmentation will improve the results.

It will only hurt the results if the added data are not realistic or were not needed.

More about data augmentation 👇🧵

2. Transfer learning

There is a popular notion that says that "it's not a good idea to train a deep neural network from scratch" (CC: @aureliengeron, Hands-On ML)

Transfer learning is what makes such a notion a real thing.
Instead of training a neural network from scratch,

you can just borrow some parts of a neural network that is already trained (pre-trained models) and tweak it a little bit based on your problem.
Transfer learning can give great results on small datasets because you are taking advantage of pre-trained models,

but also it can save computation power and time.

More about transfer learning:

Image
The combination of data augmentation and transfer learning plays it well, and you can always try them.

I meant trying because machine learning is experimentation science. There is no single technique/model that is guaranteed to work on all possible problems.
This is the end!

To summarize:

When working with small data, data augmentation and transfer learning can boost the results.

Data augmentation expands the dataset, and transfer learning lets you use the models that someone else trained on the big dataset.
One more thing:

Even if you have enough data to solve a given problem, data augmentation is still worth trying.

Remember: it introduces diversity in the training set, and that is always a good thing. It is a cure for overfitting.
Thanks for reading!

If you have found this thread helpful, share it with anyone who you think would like to learn more about those techniques.

I also appreciate retweets. It is certainly the best way to help the post reach many people.

Follow @Jeande_d for more ML ideas!

• • •

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

Keep Current with Jean de Nyandwi

Jean de Nyandwi 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 @Jeande_d

11 Sep
Popular deep learning architectures:

◆ Densely connected neural networks
◆ Convolutional neural networks
◆ Recurrent neural networks
◆ Transformers

Let's talk about these architectures and their suites of datasets in-depth 🧵
Machine learning is an experimentation science. An algorithm that was invented to process images can turn out to work well on texts too.

The next tweets are about the main neural network architectures and their suites of datasets.
1. Densely connected neural networks

Densely connected networks are made of stacks of layers that go from the input to the output.

Generally, networks are organized into layers. Each carry takes input data, processes it, and gives the output to the next layer.
Read 34 tweets
10 Sep
Neural networks are hard to train. The more they go deeper, the more they are likely to suffer from unstable gradients.

Gradients can either explode or vanish, and either of those can cause the network to give poor results.

A short thread on the neuralnets training issues
The vanishing gradients problem results in the network taking too long to train(learning will be very slow), and the exploding gradients cause the gradients to be very large.
Although those problems are nearly inevitable, the choice of activation function can reduce their effects.

Using ReLU activation in the first layers can help avoid vanishing gradients.

Careful weight initialization can also help, but ReLU is by far the good fix.
Read 4 tweets
6 Sep
Machine learning is the science of teaching the computer to do certain tasks, where instead of hardcoding it, we give it the data that contains what we want to achieve, and its job is to learn from such data to find the patterns that map what we want to achieve and provided data.
These patterns or (learned) rules can be used to make predictions on unseen data.
A machine learning model is nothing other than a mathematical function whose coefficient and intercept hold the best (or learned) values representing the provided data & what we want to achieve.

In ML terms, coefficients are weights, intercepts are biases.
Read 20 tweets
27 Aug
Getting started with machine learning can be hard.

We are fortunate to have many & freely available learning resources, but most of them won't help because they skip the fundamentals or start with moonshots.

This is a thread on learning machine learning & structured resources.
1. Get excited first

The first step to learning a hard topic is to get excited.

Machine learning is a demanding field and it will take time to start understanding concepts & connecting things.
If you find it hard to understand what ML really is,

@lmoroney I/O 19 talk will get you excited. He introduces what machine learning really is from a programming perspective.



This talk never gets old to me.
Read 29 tweets
5 Aug
For many problems, a batch size of 32 works so well.

A batch size mostly affects training time. The larger the batch size, the faster the training.

The smaller, the slower training.
The only issue with the large batch size is that it requires many steps per epoch to reach optimal performance.

And you need to have a large dataset in order to have enough steps per epoch.

With that said, 32 is a good default value to try at first.
Here are 2 great papers that you can use to learn more:

Practical Recommendations for Gradient-Based Training of Deep Architectures: arxiv.org/pdf/1206.5533.…
Read 4 tweets
4 Aug
One of the techniques that have accelerated machine learning on insufficient real-world datasets is data augmentation.

Data augmentation is the art of creating artificial data.

For example, you can take an image, flip it, change color, and now you have a new image. Image
Yes, data augmentation is the art of creating artificial data to expand a given small dataset.

It has shown that it works so well(most of the time), and it remarkably handles overfitting.
Nearly most types of data can be augmented, but I have noticed that it works well in unstructured data(images, video, sound).

So, this thread will focus more on images, sounds, and videos.

For more about structured vs unstructured data 👇

Read 18 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!

:(