Close Menu
    Facebook LinkedIn YouTube WhatsApp X (Twitter) Pinterest
    Trending
    • Scandi-style tiny house combines smart storage and simple layout
    • Our Favorite Apple Watch Has Never Been Less Expensive
    • Vercel says it detected unauthorized access to its internal systems after a hacker using the ShinyHunters handle claimed a breach on BreachForums (Lawrence Abrams/BleepingComputer)
    • Today’s NYT Strands Hints, Answer and Help for April 20 #778
    • KV Cache Is Eating Your VRAM. Here’s How Google Fixed It With TurboQuant.
    • OneOdio Focus A1 Pro review
    • The 11 Best Fans to Buy Before It Gets Hot Again (2026)
    • A look at Dylan Patel’s SemiAnalysis, an AI newsletter and research firm that expects $100M+ in 2026 revenue from subscriptions and AI supply chain research (Abram Brown/The Information)
    Facebook LinkedIn WhatsApp
    Times FeaturedTimes Featured
    Sunday, April 19
    • Home
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    • More
      • AI
      • Robotics
      • Industries
      • Global
    Times FeaturedTimes Featured
    Home»Artificial Intelligence»The Three Ages of Data Science: When to Use Traditional Machine Learning, Deep Learning, or an LLM (Explained with One Example)
    Artificial Intelligence

    The Three Ages of Data Science: When to Use Traditional Machine Learning, Deep Learning, or an LLM (Explained with One Example)

    Editor Times FeaturedBy Editor Times FeaturedNovember 11, 2025No Comments11 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email WhatsApp Copy Link


    of the universe (made by one of the vital iconic singers ever) says this:

    Want I may return
    And alter these years
    I’m going by means of adjustments

    Black sabbath – Adjustments

    This tune is extremely highly effective and talks about how life can change proper in entrance of you so rapidly.

    That tune is a few damaged coronary heart and a love story. Nevertheless, it additionally jogs my memory quite a lot of the adjustments that my job, as a Knowledge Scientist, has undergone over the past 10 years of my profession:

    • After I began learning Physics, the one factor I considered when somebody stated “Transformer” was Optimus Prime. Machine Studying for me was all about Linear Regression, SVM, Random Forest and many others… [2016]
    • After I did my Grasp’s Diploma in Large Knowledge and Physics of Advanced Methods, I first heard of “BERT” and varied Deep Studying applied sciences that appeared very promising at the moment. The primary GPT fashions got here out, and so they appeared very fascinating, regardless that nobody anticipated them to be as highly effective as they’re at this time. [2018-2020]
    • Quick ahead to my life now as a full-time Knowledge Scientist. Right now, if you happen to don’t know what GPT stands for and have by no means learn “Consideration is All You Want” you could have only a few probabilities of passing a Knowledge Science System Design interview. [2021 – today]

    When folks state that the instruments and the on a regular basis lifetime of an individual working with knowledge are considerably totally different than 10 (and even 5) years in the past, I agree all the way in which. What I don’t agree with is the concept the instruments used previously needs to be erased simply because every little thing now appears to be solvable with GPT, LLMs, or Agentic AI.

    The aim of this text is to contemplate a single process, which is classifying the love/hate/impartial intent of a Tweet. Specifically, we’ll do it with conventional Machine Studying, Deep Studying, and Giant Language Fashions.

    We are going to do that hands-on, utilizing Python, and we’ll describe why and when to make use of every method. Hopefully, after this text, you’ll study:

    1. The instruments used within the early days ought to nonetheless be thought of, studied, and at occasions adopted.
    2. Latency, Accuracy, and Value needs to be evaluated when selecting the most effective algorithm to your use case
    3. Adjustments within the Knowledge Scientist world are mandatory and to be embraced with out worry 🙂

    Let’s get began!

    1. The Use Case

    The case we’re coping with is one thing that’s really very adopted in Knowledge Science/AI functions: sentiment evaluation. Because of this, given a textual content, we wish to extrapolate the “feeling” behind the creator of that textual content. That is very helpful for circumstances the place you wish to collect the suggestions behind a given evaluation of an object, a film, an merchandise you might be recommending, and many others…

    On this weblog submit, we’re utilizing a really “well-known” sentiment evaluation instance, which is classifying the sensation behind a tweet. As I needed extra management, we is not going to work with natural tweets scraped from the online (the place labels are unsure). As a substitute, we shall be utilizing content material generated by Giant Language Fashions that we will management.

    This system additionally permits us to tune the issue and the number of the issue and to watch how totally different strategies react.

    • Simple case: the love tweets sound like postcards, the hate ones are blunt, and the impartial messages speak about climate and occasional. If a mannequin struggles right here, one thing else is off.
    • Tougher case: nonetheless love, hate, impartial, however now we inject sarcasm, combined tones, and refined hints that demand consideration to context. We even have much less knowledge, to have a smaller dataset to coach with.
    • Further Onerous case: we transfer to 5 feelings: love, hate, anger, disgust, envy, so the mannequin has to parse richer, extra layered sentences. Furthermore, we’ve 0 entries to coach the info: we can’t do any coaching.

    I’ve generated the info and put every of the recordsdata in a particular folder of the general public GitHub Folder I’ve created for this undertaking [data].

    Our aim is to construct a sensible classification system that may be capable to effectively grasp the sentiment behind the tweets. However how lets do it? Let’s determine it out.

    2. System Design

    An image that’s all the time extraordinarily useful to contemplate is the next:

    Picture made by creator

    Accuracy, price, and scale in a Machine Studying system kind a triangle. You possibly can solely totally optimize two on the similar time.

    You possibly can have a really correct mannequin that scales very nicely with tens of millions of entries, but it surely received’t be fast. You possibly can have a fast mannequin that scales with tens of millions of entries, but it surely received’t be that correct. You possibly can have an correct and fast mannequin, but it surely received’t scale very nicely.

    These issues are abstracted from the particular downside, however they assist information which ML System Design to construct. We are going to come again to this.

    Additionally, the ability of our mannequin needs to be proportional to the dimensions of our coaching set. Usually, we attempt to keep away from the coaching set error to lower at the price of a rise within the check set (the well-known overfitting).

    Picture made by creator

    We don’t wish to be within the Underfitting or Overfitting space. Let me clarify why.

    In easy phrases, underfitting occurs when your mannequin is just too easy to study the actual sample in your knowledge. It’s like attempting to attract a straight line by means of a spiral. Overfitting is the other. The mannequin learns the coaching knowledge too nicely, together with all of the noise, so it performs nice on what it has already seen however poorly on new knowledge. The candy spot is the center floor, the place your mannequin understands the construction with out memorizing it.

    We are going to come again to this one as nicely.

    3. Simple Case: Conventional Machine Studying

    We open with the friendliest situation: a extremely structured dataset of 1,000 tweets that we generated and labelled. The three lessons (constructive, impartial, unfavourable) are balanced on function, the language could be very specific, and each row lives in a clear CSV.

    Let’s begin with a easy import block of code.

    Let’s see what the dataset seems like:

    Picture made by creator

    Now, we anticipate that this received’t scale for tens of millions of rows (as a result of the dataset is just too structured to be numerous). Nevertheless, we will construct a really fast and correct methodology for this tiny and particular use case. Let’s begin with the modeling. Three details to contemplate:

    1. We’re doing prepare/check break up with 20% of the dataset within the check set.
    2. We’re going to use a TF-IDF method to get the embeddings of the phrases. TF-IDF stands for Time period Frequency–Inverse Doc Frequency. It’s a basic method that transforms textual content into numbers by giving every phrase a weight primarily based on how essential it’s in a doc in comparison with the entire dataset.
    3. We are going to mix this system with two ML fashions: Logistic Regression and Help Vector Machines, from scikit-learn. Logistic Regression is straightforward and interpretable, typically used as a powerful baseline for textual content classification. Help Vector Machines deal with discovering the most effective boundary between lessons and often carry out very nicely when the info is just not too noisy.

    And the efficiency is actually excellent for each fashions.

    Picture made by creator

    For this quite simple case, the place we’ve a constant dataset of 1,000 rows, a conventional method will get the job finished. No want for billions of parameter fashions like GPT.

    4. Onerous Case: Deep Studying

    The second dataset remains to be artificial, however it’s designed to be annoying on function. Labels stay love, hate, and impartial, but the tweets lean on sarcasm, combined tone, and backhanded compliments. On high of that, the coaching pool is smaller whereas the validation slice stays massive, so the fashions work with much less proof and extra ambiguity.

    Now that we’ve this ambiguity, we have to take out the larger weapons. There are Deep Studying embedding fashions that preserve robust accuracy and nonetheless scale nicely in these circumstances (keep in mind the triangle and the error versus complexity plot!). Specifically, Deep Studying embedding fashions study the which means of phrases from their context as a substitute of treating them as remoted tokens.

    For this weblog submit, we’ll use BERT, which is without doubt one of the most well-known embedding fashions on the market. Let’s first import some libraries:

    … and a few helpers.

    Thanks to those features, we will rapidly consider our embedding mannequin vs the TF-IDF method.

    Picture made by creator

    As we will see, the TF-IDF mannequin is extraordinarily underperforming within the constructive labels, whereas it preserves excessive accuracy when utilizing the embedding mannequin (BERT).

    5. Further Onerous case: LLM Agent

    Okay, now let’s make issues VERY onerous:

    1. We solely have 100 rows.
    2. We assume we have no idea the labels, which means we can not prepare any machine studying mannequin.
    3. We’ve got 5 labels: envy, hate, love, disgust, anger.

    As we can’t prepare something, however we nonetheless wish to carry out our classification, we should undertake a technique that one way or the other already has the classifications inside. Giant Language Fashions are the best instance of such a technique.

    Be aware that if we used LLMs for the opposite two circumstances, it could be like capturing a fly with a cannon. However right here, it makes excellent sense: the duty is difficult, and we’ve no technique to do something good, as a result of we can’t prepare our mannequin (we don’t have the coaching set).

    On this case, we’ve accuracy at a big scale. Nevertheless, the API takes a while, so we’ve to attend a second or two earlier than the response comes again (keep in mind the triangle!).

    Let’s import some libraries:

    And that is the classification API name:

    And we will see that the LLM does a tremendous classification job:

    6. Conclusions

    Over the previous decade, the position of the Knowledge Scientist has modified as dramatically because the expertise itself. This may result in the concept of simply utilizing essentially the most highly effective instruments on the market, however that’s NOT the most effective route for a lot of circumstances.

    As a substitute of reaching for the most important mannequin first, we examined one downside by means of a easy lens: accuracy, latency, and price.

    Specifically, here’s what we did, step-by-step:

    • We outlined our use case as tweet sentiment classification, aiming to detect love, hate, or impartial intent. We designed three datasets of accelerating problem: a clear one, a sarcastic one, and a zero-training one.
    • We tackled the straightforward case utilizing TF-IDF with Logistic Regression and SVM. The tweets had been clear and direct, and each fashions carried out virtually completely.
    • We moved to the onerous case, the place sarcasm, combined tone, and refined context made the duty extra complicated. We used BERT embeddings to seize which means past particular person phrases.
    • Lastly, for the additional onerous case with no coaching knowledge, we used a Giant Language Mannequin to categorise feelings instantly by means of zero-shot studying.

    Every step confirmed how the best device relies on the issue. Conventional ML is quick and dependable when the info is structured. Deep Studying fashions assist when which means hides between the traces. LLMs are highly effective when you haven’t any labels or want broad generalization.

    7. Earlier than you head out!

    Thanks once more to your time. It means lots ❤️

    My identify is Piero Paialunga, and I’m this man right here:

    Picture made by creator

    I’m initially from Italy, maintain a Ph.D. from the College of Cincinnati, and work as a Knowledge Scientist at The Commerce Desk in New York Metropolis. I write about AI, Machine Studying, and the evolving position of knowledge scientists each right here on TDS and on LinkedIn. In the event you preferred the article and wish to know extra about machine studying and comply with my research, you may:

    A. Observe me on Linkedin, the place I publish all my tales
    B. Observe me on GitHub, the place you may see all my code
    C. For questions, you may ship me an e-mail at piero.paialunga@hotmail



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Editor Times Featured
    • Website

    Related Posts

    KV Cache Is Eating Your VRAM. Here’s How Google Fixed It With TurboQuant.

    April 19, 2026

    Proxy-Pointer RAG: Structure Meets Scale at 100% Accuracy with Smarter Retrieval

    April 19, 2026

    Dreaming in Cubes | Towards Data Science

    April 19, 2026

    AI Agents Need Their Own Desk, and Git Worktrees Give Them One

    April 18, 2026

    Your RAG System Retrieves the Right Data — But Still Produces Wrong Answers. Here’s Why (and How to Fix It).

    April 18, 2026

    Europe Warns of a Next-Gen Cyber Threat

    April 18, 2026

    Comments are closed.

    Editors Picks

    Scandi-style tiny house combines smart storage and simple layout

    April 19, 2026

    Our Favorite Apple Watch Has Never Been Less Expensive

    April 19, 2026

    Vercel says it detected unauthorized access to its internal systems after a hacker using the ShinyHunters handle claimed a breach on BreachForums (Lawrence Abrams/BleepingComputer)

    April 19, 2026

    Today’s NYT Strands Hints, Answer and Help for April 20 #778

    April 19, 2026
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    About Us
    About Us

    Welcome to Times Featured, an AI-driven entrepreneurship growth engine that is transforming the future of work, bridging the digital divide and encouraging younger community inclusion in the 4th Industrial Revolution, and nurturing new market leaders.

    Empowering the growth of profiles, leaders, entrepreneurs businesses, and startups on international landscape.

    Asia-Middle East-Europe-North America-Australia-Africa

    Facebook LinkedIn WhatsApp
    Featured Picks

    GAMING: Indie games are slowly dominating PAX Australia

    October 24, 2025

    Today’s NYT Wordle Hints, Answer and Help for July 25 #1497

    July 25, 2025

    From Pixels to Perfect Replicas

    August 21, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    Copyright © 2024 Timesfeatured.com IP Limited. All Rights.
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us

    Type above and press Enter to search. Press Esc to cancel.