{"author":{"@type":"Person","name":"Alexander Bock","url":"https://abxk.ai/en/autor/alexander-bock/"},"categories":["AI Development"],"content":{"markdown":"Most parts of this learning path use finished models: you send text to a large language model (LLM) and get an answer back. Behind every one of these models sits **machine learning**, and the same ideas power spam filters, product recommendations and the camera in a self-checkout. Sooner or later you will read terms like classification, neural network, RNN or YOLO in a job ad, a tutorial or a product description.\n\nThis is part 6, the last part of Level 0 in our AI Development learning path. You will learn how a model learns from examples, what classification means, how a neural network works in plain words, which four model families you will meet, what frameworks such as TensorFlow are for, and when you need any of this instead of an LLM API. You do not need math or code for this part.\n\n## Learning from examples instead of rules\n\nClassic software follows rules that a person wrote: \"if the email contains the word *lottery*, move it to spam\". **Machine learning** turns this around. You give the computer many examples with the right answer, and it finds the rules itself. The result is a **model**: a program with millions of adjustable numbers, called **weights**, that turns an input into an output.\n\nLearning happens in a loop. The model makes a prediction for an example, a formula measures how far off it was, and the weights change a little so that the next prediction is better. After many rounds over thousands of examples, the errors become small. This is **training**. Using the finished model on new data is called **inference**, and that is what you pay for when you call an LLM API.\n\n![A loop of four steps around a model: examples with the right answer, prediction, measure the error and adjust the weights; below a note to test the model on new data afterwards](/images/learn/en/machine-learning-basics-loop.webp \"Training in one picture: predict, measure the error, adjust, and repeat.\")\n\nThere are three main ways to learn:\n\n- **Supervised learning:** every example has the right answer, called a **label**. \"This email is spam, this one is not.\" Most business uses work this way.\n- **Unsupervised learning:** the examples have no labels. The model finds groups or patterns on its own, for example customers who buy in a similar way.\n- **Reinforcement learning:** the model tries actions and gets a reward or a penalty, like a game score. LLMs are fine-tuned partly this way, with human feedback on their answers.\n\n{{\u003c callout type=\"term\" title=\"Overfitting\" \u003e}}\nA model that learned its examples by heart instead of the pattern behind them is **overfitted**. It scores well on the training data and badly on new data. That is why you always keep part of your data back and test the model on it at the end.\n{{\u003c /callout \u003e}}\n\n## Classification: the task you will meet most\n\n**Classification** means putting an input into one of several fixed groups, called **classes**. Is this email spam or not? Which department should get this support ticket? Is this transaction fraud? Machine learning classification is the most common task in business, because so many decisions are a choice between a few options.\n\nA classification model does not just pick a class. It gives a probability for each class, for example \"spam: 0.93\". You decide where the line is. A low line catches more spam but also blocks more real emails; a high line lets more spam through. To judge a classifier, look at more than one number:\n\n| Task | What the model outputs | Example |\n|---|---|---|\n| Classification | One class out of several | Spam or not spam; ticket goes to billing, technical or sales |\n| Regression | A number | The price of a used car; next week's sales |\n| Clustering | Groups that nobody defined beforehand | Customer segments with similar buying habits |\n| Object detection | Objects in an image with a box around each | Products on a shelf photo, people in a camera image |\n| Generation | New text, images or audio | An answer to a question, a product photo, a voiceover |\n\n- **Accuracy** is the share of all predictions that were right. It can mislead: if only 1% of transactions are fraud, a model that always says \"no fraud\" is 99% accurate and useless.\n- **Precision** asks: of all emails the model marked as spam, how many really were spam?\n- **Recall** asks: of all real spam emails, how many did the model catch?\n\n## Neural networks in plain words\n\nA **neural network** is a model built from many small units, loosely inspired by brain cells. Each unit takes numbers in, multiplies them by its weights, adds them up and passes the result on. The units sit in **layers**: an input layer that receives the data, hidden layers in the middle and an output layer with the answer. A network with many hidden layers is called **deep**, which is where the term **deep learning** comes from.\n\nWhat makes neural networks powerful is that the early layers learn simple patterns and the later layers combine them. In an image model, the first layers react to edges and colors, the middle layers to shapes such as wheels or eyes, and the last layers to whole objects. Nobody programs these steps; they come out of training.\n\n## Four model families you will meet\n\nNeural networks come in different designs, and each fits a different kind of data. Classic models without neural networks are still the best choice for many tables.\n\n![Four cards: classic models for tables, CNNs and YOLO for images, RNNs for sequences and Transformers for text and large language models](/images/learn/en/machine-learning-basics-families.webp \"Which family fits depends on the data, not on the hype.\")\n\n- **Classic models** such as decision trees and logistic regression work on tables with rows and columns: customer data, transactions, sensor values. They train fast, need little data and are easy to explain.\n- **Convolutional neural networks (CNNs)** look at images through small windows that slide across the picture. **YOLO** (\"You Only Look Once\") is a well-known family of object detection models built on this idea: it finds all objects in an image in a single pass and draws a box around each one, fast enough for live video (Source: Redmon et al., \"You Only Look Once\", CVPR 2016, arxiv.org).\n- **Recurrent neural networks (RNNs)** read a sequence one step at a time and carry a memory from step to step, which suits speech, sensor data and text. An improved version called LSTM remembers longer stretches (Source: Hochreiter and Schmidhuber, \"Long Short-Term Memory\", Neural Computation 1997).\n- **Transformers** look at all parts of a text at once and learn which words relate to which. They replaced RNNs for most language tasks after 2017 (Source: Vaswani et al., \"Attention Is All You Need\", NeurIPS 2017, arxiv.org). Almost every large language model is built on them. Our [LLM database](/en/llm/) lists {{\u003c stat \"models\" \u003e}} language models with their benchmark results.\n\n## Frameworks: TensorFlow, PyTorch and the rest\n\nNobody writes the math of a neural network by hand. **Frameworks** do it for you: you describe the layers, and the framework handles training on graphics cards (GPUs). **TensorFlow** from Google and **PyTorch**, which started at Meta, are the two big ones; PyTorch dominates research, and both run in production. For classic models on tables, **scikit-learn** is the usual choice in Python.\n\nA typical first TensorFlow tutorial trains a small network to recognize handwritten digits from the MNIST data set, in a few dozen lines of code. That is a good exercise to see the training loop from this part in action. Cloud platforms such as Amazon SageMaker, Google Vertex AI or Azure Machine Learning run the same frameworks on rented hardware, so you can start machine learning on AWS or another cloud without buying GPUs. Renting compute is covered in [GPU infrastructure for AI](/en/ai-development/learn/gpu-infrastructure-for-ai/) in Level 3.\n\n## When you need this, and when an LLM API is enough\n\nFor most AI features in apps today, you do not train a model at all. You call an LLM through an API, as you will in [your first LLM API call](/en/ai-development/learn/your-first-llm-api-call/) in Level 1. Training your own model pays off when you have many labeled examples, a narrow task that repeats millions of times, or data that must not leave your servers.\n\n| Your task | Usually the better choice | Why |\n|---|---|---|\n| Sort support tickets into five departments | An LLM with clear instructions, later a small classifier | Fast to start; a trained classifier is cheaper at high volume |\n| Spot fraud in payment data | A classic model on the table | Needs speed, explanations and works on numbers, not text |\n| Count products on shelf photos | An object detection model such as YOLO | Finds and locates many objects per image, in real time |\n| Answer questions about your documents | An LLM with retrieval (RAG) | Uses your texts without any training |\n| Predict machine failures from sensor data | A classic model or a sequence model | Works on time series; LLMs are not built for that |\n\nIf you do decide to adapt a model, start with the decision guide [fine-tuning vs. RAG vs. prompting](/en/ai-development/learn/fine-tuning-vs-rag-vs-prompting/) in Level 3. It helps you choose the cheapest way that works before you collect a single training example.","text":"Most parts of this learning path use finished models: you send text to a large language model (LLM) and get an answer back. Behind every one of these models sits machine learning, and the same ideas power spam filters, product recommendations and the camera in a self-checkout. Sooner or later you will read terms like classification, neural network, RNN or YOLO in a job ad, a tutorial or a product description.\nThis is part 6, the last part of Level 0 in our AI Development learning path. You will learn how a model learns from examples, what classification means, how a neural network works in plain words, which four model families you will meet, what frameworks such as TensorFlow are for, and when you need any of this instead of an LLM API. You do not need math or code for this part.\nLearning from examples instead of rules Classic software follows rules that a person wrote: \u0026ldquo;if the email contains the word lottery, move it to spam\u0026rdquo;. Machine learning turns this around. You give the computer many examples with the right answer, and it finds the rules itself. The result is a model: a program with millions of adjustable numbers, called weights, that turns an input into an output.\nLearning happens in a loop. The model makes a prediction for an example, a formula measures how far off it was, and the weights change a little so that the next prediction is better. After many rounds over thousands of examples, the errors become small. This is training. Using the finished model on new data is called inference, and that is what you pay for when you call an LLM API.\nTraining in one picture: predict, measure the error, adjust, and repeat. There are three main ways to learn:\nSupervised learning: every example has the right answer, called a label. \u0026ldquo;This email is spam, this one is not.\u0026rdquo; Most business uses work this way. Unsupervised learning: the examples have no labels. The model finds groups or patterns on its own, for example customers who buy in a similar way. Reinforcement learning: the model tries actions and gets a reward or a penalty, like a game score. LLMs are fine-tuned partly this way, with human feedback on their answers. §Overfitting\nA model that learned its examples by heart instead of the pattern behind them is overfitted. It scores well on the training data and badly on new data. That is why you always keep part of your data back and test the model on it at the end.\nClassification: the task you will meet most Classification means putting an input into one of several fixed groups, called classes. Is this email spam or not? Which department should get this support ticket? Is this transaction fraud? Machine learning classification is the most common task in business, because so many decisions are a choice between a few options.\nA classification model does not just pick a class. It gives a probability for each class, for example \u0026ldquo;spam: 0.93\u0026rdquo;. You decide where the line is. A low line catches more spam but also blocks more real emails; a high line lets more spam through. To judge a classifier, look at more than one number:\nHow Machine Learning Works: Classification, Neural Networks, RNNs and YOLO Task What the model outputs Example Classification One class out of several Spam or not spam; ticket goes to billing, technical or sales Regression A number The price of a used car; next week\u0026rsquo;s sales Clustering Groups that nobody defined beforehand Customer segments with similar buying habits Object detection Objects in an image with a box around each Products on a shelf photo, people in a camera image Generation New text, images or audio An answer to a question, a product photo, a voiceover Accuracy is the share of all predictions that were right. It can mislead: if only 1% of transactions are fraud, a model that always says \u0026ldquo;no fraud\u0026rdquo; is 99% accurate and useless. Precision asks: of all emails the model marked as spam, how many really were spam? Recall asks: of all real spam emails, how many did the model catch? Neural networks in plain words A neural network is a model built from many small units, loosely inspired by brain cells. Each unit takes numbers in, multiplies them by its weights, adds them up and passes the result on. The units sit in layers: an input layer that receives the data, hidden layers in the middle and an output layer with the answer. A network with many hidden layers is called deep, which is where the term deep learning comes from.\nWhat makes neural networks powerful is that the early layers learn simple patterns and the later layers combine them. In an image model, the first layers react to edges and colors, the middle layers to shapes such as wheels or eyes, and the last layers to whole objects. Nobody programs these steps; they come out of training.\nFour model families you will meet Neural networks come in different designs, and each fits a different kind of data. Classic models without neural networks are still the best choice for many tables.\nWhich family fits depends on the data, not on the hype. Classic models such as decision trees and logistic regression work on tables with rows and columns: customer data, transactions, sensor values. They train fast, need little data and are easy to explain. Convolutional neural networks (CNNs) look at images through small windows that slide across the picture. YOLO (\u0026ldquo;You Only Look Once\u0026rdquo;) is a well-known family of object detection models built on this idea: it finds all objects in an image in a single pass and draws a box around each one, fast enough for live video (Source: Redmon et al., \u0026ldquo;You Only Look Once\u0026rdquo;, CVPR 2016, arxiv.org). Recurrent neural networks (RNNs) read a sequence one step at a time and carry a memory from step to step, which suits speech, sensor data and text. An improved version called LSTM remembers longer stretches (Source: Hochreiter and Schmidhuber, \u0026ldquo;Long Short-Term Memory\u0026rdquo;, Neural Computation 1997). Transformers look at all parts of a text at once and learn which words relate to which. They replaced RNNs for most language tasks after 2017 (Source: Vaswani et al., \u0026ldquo;Attention Is All You Need\u0026rdquo;, NeurIPS 2017, arxiv.org). Almost every large language model is built on them. Our LLM database lists 343 language models with their benchmark results. Frameworks: TensorFlow, PyTorch and the rest Nobody writes the math of a neural network by hand. Frameworks do it for you: you describe the layers, and the framework handles training on graphics cards (GPUs). TensorFlow from Google and PyTorch, which started at Meta, are the two big ones; PyTorch dominates research, and both run in production. For classic models on tables, scikit-learn is the usual choice in Python.\nA typical first TensorFlow tutorial trains a small network to recognize handwritten digits from the MNIST data set, in a few dozen lines of code. That is a good exercise to see the training loop from this part in action. Cloud platforms such as Amazon SageMaker, Google Vertex AI or Azure Machine Learning run the same frameworks on rented hardware, so you can start machine learning on AWS or another cloud without buying GPUs. Renting compute is covered in GPU infrastructure for AI in Level 3.\nWhen you need this, and when an LLM API is enough For most AI features in apps today, you do not train a model at all. You call an LLM through an API, as you will in your first LLM API call in Level 1. Training your own model pays off when you have many labeled examples, a narrow task that repeats millions of times, or data that must not leave your servers.\nHow Machine Learning Works: Classification, Neural Networks, RNNs and YOLO (2) Your task Usually the better choice Why Sort support tickets into five departments An LLM with clear instructions, later a small classifier Fast to start; a trained classifier is cheaper at high volume Spot fraud in payment data A classic model on the table Needs speed, explanations and works on numbers, not text Count products on shelf photos An object detection model such as YOLO Finds and locates many objects per image, in real time Answer questions about your documents An LLM with retrieval (RAG) Uses your texts without any training Predict machine failures from sensor data A classic model or a sequence model Works on time series; LLMs are not built for that If you do decide to adapt a model, start with the decision guide fine-tuning vs. RAG vs. prompting in Level 3. It helps you choose the cheapest way that works before you collect a single training example.\n","words":1466},"date":"2026-10-18","description":"Machine learning basics for AI builders: learning from examples, classification, neural networks, RNNs, YOLO and TensorFlow, and when you need them at all.","image":"https://abxk.ai/images/cover/machine-learning-basics.webp","json":"https://abxk.ai/en/ai-development/learn/machine-learning-basics/index.json","kind":"page","language":"en","learning_path":{"category":"ai-development","level":0,"level_name":"Start here"},"modified":"2026-10-18","related_tools":["Runpod","Pinecone","MindStudio"],"section":"ai-development","seo_title":"Machine Learning Basics: Classification, RNNs and YOLO","tags":["machine-learning","neural-networks","classification","beginner","ai-development"],"title":"How Machine Learning Works: Classification, Neural Networks, RNNs and YOLO","translations":[{"json":"https://abxk.ai/de/ai-development/learn/machine-learning-basics/index.json","language":"de","url":"https://abxk.ai/de/ai-development/learn/machine-learning-basics/"}],"url":"https://abxk.ai/en/ai-development/learn/machine-learning-basics/"}