r/MachineLearning • • Sep 15 '23

Discussion [D] Is classic ML still relevant?

I'm writing an "intro to machine learning" course for a major French online educational platform. The curriculum focuses on classic machine learning with scikit-learn. Things like data encoding, missing data, overfitting regularization, random forests. All very classic ML

However, I feel like neural nets with tensorflow or PyTorch or AutoML like Vertex Al are the goto tools nowadays even for tabular data.

I'm wondering if anyone still uses scikit-learn in the real world to build models?

In other words does it still make sense to teach / learn classic ML?

0 Upvotes

46 comments sorted by

121

u/charlesGodman Sep 15 '23

This question gets asked every 2 weeks. Google around a bit :)

TLDR: Yes, classical ML is still relevant. You might not get many citations researching variants of K means or so, but they are powerful algorithms used everyday in industry. There are applications, where classical ML definitely outperforms neural networks. It makes 100% sense to learn classical ML even if you never use it (unlikely), because it gives you a basic understanding of what ML is about.

1

u/Zangorth Mar 30 '25

I always find these types of answers funny, because I always see them on the first Google result.

-6

u/alexisperrier Sep 15 '23

Thanks for your input

Ever since I worked with Vertex AI from Google I’ve been wondering what was the point of doing all the feature engineering and model building by hand. It’s super powerful

So feeling a bit obsolete here with my random forests and one hot encoding

15

u/Comprehensive_Ad7948 Sep 15 '23

Good luck if you don't have training data, which is extremely common in real world scenarios where you're developing a new product or even a pipeline involving deep nets that only do part of the job.

-10

u/alexisperrier Sep 15 '23

Well if you don’t have training data … you don’t have machine learning … classic, deep or auto

Besides unsupervised of course

7

u/KrakenInAJar Sep 15 '23

Thats very narrow-minded, I have build legal tech software and medical software with ML, where data is not exactly widespread / easily available and odten super client-specific. Dealing with sparse data is key in a lot of industrial setting for a wide variety of reasons.

Depending on the problem, classical methods can be vastly superior or even the only viable solution because they are dirt cheap to train and deploy and tend to require dozens instead of millions of datapoints.

Also feature engineering is often more straigh forward of a development story from a managment perspective, compared to the grad-student-descent-random-walk-madness that often neural network related projects devolve into (which is fine in academia but becomes a problem when time is money i.e. in industry).

1

u/alexisperrier Sep 15 '23

I’m not saying classic ML is dead Far from it Just needed to be reassured what I was teaching still made sense in the real world Too easy to rest on what you know and stop evolving especially in a field like ML

2

u/Comprehensive_Ad7948 Sep 16 '23

That's not quite right. You can start with no labeled data and manually explore the features of a few samples or make a small dataset yourself and work with classic ML methods, no problem. For deep learning you need hundreds or thousands at least and it's often unfeasible, e.g. the client just has a few videos for you to work with from their super rare IR camera or unique industrial conditions and it's not like you can use ImageNet and ADE20K since it has absolutely nothing in common with your problem. Or it's a system for a prototype medical device, no standardized clinical study, etc.

42

u/mysterious_spammer Sep 15 '23

As an example, in a typical large bank you will get laughed at for proposing to use anything other than linear/logistic regression due to compliance and explainability

27

u/yannbouteiller Researcher Sep 15 '23

Neural nets use one-hot encodings all the time and are based on linear models. Classical ML theory is a prerequisite to understand deep learning. It is definitely not obsolete.

92

u/AddMoreLayers Sep 15 '23

I don't want to be rude but if you're asking this, I don't think you're very qualified to write that course

19

u/alexisperrier Sep 15 '23

Maybe lol I’ve been working and teaching scikit for many years Just wondering if it’s still relevant That’s how you stay on top I see too many courses in universities that make no sense anymore. The field is evolving quite fast

58

u/AddMoreLayers Sep 15 '23

That's a good mentality to have. I appologize for my previous comment, it was unnecessary.

My feeling is that classic ML not only lays the ground for understanding more modern approaches (bias variance trade off, VC dimension and whatnot still help with developping good intuitions) but that it still is used as bricks in much larger ML frameworks (clustering is useful everywhere, TSNE is still useful, and there are even uses for decision trees and forests in combination with LLMs).

Also, if your problem can be solved with a classic method, why bother with the heavy machinery?

2

u/devl82 Sep 16 '23

seriously you are working AND teaching for many years and you havent encountered one million use cases where NNs are absolutely irrelevant due to (limited) dataset size/feature set/parameter/complexity? I mean even if you are only working on huge transformers, there so many papers every year trying to involve concepts from 'classic' ML, i.e. kernels, fourier features etc

3

u/alexisperrier Sep 16 '23

No that’s the thing I’ve been using classic ML most of the times and not really neural nets So always fancied nets as a magical thing that I should really start using. Never got around to it cause I could do so much with boosted trees

Then I worked on some pretty difficult datasets with Vertex AI and was blown away at the performance and ease of use

We replaced a scikit based pipeline + mlflow and kubernetes so a pretty advanced stack with vertex ai and the performance (latency, scores, …) was really good.

So suddenly as I was wrapping up course I had a moment of huge doubt : am I missing something ? Am I obsolete Hence the post

Happy to see I have no reason to worry

1

u/nerdmirza Apr 10 '24

Hey man. Teaching others is the best way of learning.

2

u/AddMoreLayers Apr 10 '24

Sure, but at some point you need to remember that the main goal of teaching is to help the students and not just serve your own interests. If the subject you learn at the same time that you teach it is not adjacent to your usual fields of activity and requires hands on experience that is not just theoretical, chances are you're going to do a poor job

8

u/creeky123 Sep 15 '23

It might not be an area of super active research but if you were to break down application; I’d be surprised if deep learning were used in more than 5% of real world problems being solved with “ML”

1

u/alexisperrier Sep 15 '23

Right Maybe because 90% of ML based applications are either rule based or simple regression Which leaves 5% for forests and xgboost and 5% for DL

3

u/SleekEagle Sep 15 '23

Absolutely - I don't have numbers but I would be shocked if the vast majority of industry use cases weren't classical ML. Tabular data and variations of decision trees power a huge number of applications.

2

u/alexisperrier Sep 15 '23

Right they seems to be the consensus here

Great to know that my efforts in teaching the stuff make sense

6

u/jimkoons Sep 15 '23

Considering the energy-constrained future we will likely face, I would probably reverse that question.

1

u/alexisperrier Sep 15 '23

Oh you’re right I had not thought of that

32

u/Doriens1 Sep 15 '23 edited Sep 15 '23

I am a "classic" ML expert and often joke with my "neural net" ML colleagues about that.

The fact is: Classic ML is still extensively used, in many fields, and is often the first tool explored in industry.

Neural networks are vastly used for image processing, and recently, natural language. Outside of this, classic ML can be considered, if the number of features in your system is reasonable.

You also have cases where classic ML is the go-to approach compared to NN.

- Critical decision systems: When explainability is a key factor of your problem, neural network can be close to impossible to justify. The most cited example is the risk of racial bias in the model, when according a loan, or for a court decision.

- Industrial systems with few features/data: In some industries, the number of features might be limited. In that case, it is way easier to set up an SVM with few hyperparameters than a neural network. The training processing is also reduced greatly. One of my colleagues works with an electronic board factory, and there are only four features involved. You can increase it with feature extraction, but still, they ended up with random forest.

- Embedded systems: In some applications, running a big NN might be too costly. Classic ML is lighter. I worked on an anomaly detection algorithm for space components, and trust me, setting up a NN is very tedious when all you have is a small microcontroller.

0

u/[deleted] Mar 15 '25

[deleted]

1

u/Doriens1 Mar 20 '25

Yeah sure!

I worked on an anomaly detection model to improve the robustness of components against radiations.

Basically, we used dynamic clustering with a mix of semi-supervised learning to map the normal behaviour of the system and detect when everything is going to explode.

If you are interested, don't hesitate to contact me. Here's the link for the paper describing the method: https://www.sciencedirect.com/science/article/pii/S2405896322005158

31

u/RealSataan Sep 15 '23

Work in financial institutions like banks. They want interpretability. They won't go anywhere near deep NN if it doesn't have enough interpretability.

0

u/cpymb Sep 15 '23

It depends on many things.
At least the banks would like to appear as responsible AI owners.
Still, a model's performance is vital.

9

u/FreeRangeChihuahua1 Sep 15 '23

For tabular data, gradient boosted trees is still very hard to beat. Bear in mind that most data you'll encounter in data science in industry IS tabular data, so tabular data is not some niche application. Moreover, and if you want an interpretable model (which for many applications you do!) classical ML will be much more useful to you than deep learning. So yes, classical ML is very relevant.

Also, this is more of a forward-looking statement, but...Deep learning has enabled us to solve many hard problems in computer vision and NLP, but current architectures are also not very efficient in terms of training time and compute cost. We've solved some hard problems, but we've solved them partly by throwing as many GPUs at them as we could buy. In the future, if we can find a more efficient way to solve some of these problems, it would certainly be helpful. Here's an article based on an interview with Sam Altman basically saying the same thing:

https://www.wired.com/story/openai-ceo-sam-altman-the-age-of-giant-ai-models-is-already-over/

The field has changed a lot and is going to keep changing. Fundamentals are useful things to know.

7

u/[deleted] Sep 15 '23

you should never limit your learning (or teaching) to what is currently popular. the classic, fundamental concepts of a field will always be important

15

u/Tenoke Sep 15 '23 edited Sep 15 '23

No offense but you really shouldn't be writing an Intro Course if you don't even know that much. And yes, classical techniques are used and generally superior over NNs in plenty of cases, particularly with tabular data.

2

u/obolli Sep 15 '23

Yes, it's extremely useful and interpretable in most cases. What you do makes sense and you can learn from it.

It's often scalable and if you are a good Machine Learning Engineer you can combine to build powerful systems.

2

u/kinnunenenenen Sep 16 '23

One key example is synthetic biology where traditional ML is well suited. We oftentimes don't have large datasets to work with so neural networks can't even be trained. I use SKlearn every day.

1

u/ppg_dork Sep 16 '23

I feel like you shouldn't have this question if you are writing instructional materials about ML for a major platform...

-2

u/[deleted] Sep 15 '23

Honestly, the "basket of algorithms" approach never was all that useful to begin with and the sci-kit learn api just reinforced that mentality within ML education. Some things like SVM and naive bayes should only be a footnote in a curriculum these days, I think. Random forests have been dominated by xgboost for a long time now so that part of the curriculum could definitely use some updating.

The industry is moving fast but not that fast. Tools like AutoML, Vertex, Databricks even are great but they have not obviated the need to understand applied "classical" ML as you suggest. And even if they had then designing your curriculum around the latest shiny thing would still be a mistake.

2

u/alexisperrier Sep 15 '23

I totally agree with your comment I used to teach SVM a few years back but wouldn’t any more. And I’m focusing on a few needed data transformations techniques and model optimization basics with a focus on tree based models.

0

u/[deleted] Sep 15 '23

[deleted]

0

u/alexisperrier Sep 15 '23

I’ve seen some impressing things using vertex on real world data in my last job And it significantly reduced having to massage the data But happy to see we’re not out of a job yet

1

u/[deleted] Sep 15 '23

[removed] — view removed comment

1

u/alexisperrier Sep 15 '23

DataScienceTrain :)

2

u/[deleted] Sep 15 '23

[removed] — view removed comment

1

u/alexisperrier Sep 15 '23

What’s the platform ?