{"id":3179,"date":"2025-10-06T16:08:01","date_gmt":"2025-10-06T14:08:01","guid":{"rendered":"https:\/\/tecnologia.euroinnova.com\/que-es-el-aprendizaje-supervisado-y-como-funciona\/"},"modified":"2025-10-07T14:54:42","modified_gmt":"2025-10-07T12:54:42","slug":"supervised-learning","status":"publish","type":"post","link":"https:\/\/tecnologia.euroinnova.com\/en\/aprendizaje-supervisado","title":{"rendered":"What is supervised learning and how does it work?"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Supervised learning is an approach that is implemented in the creation of artificial intelligence in which an algorithm is trained from <strong>previously classified data.<\/strong> The aim is to get them to associate a set of implicit patterns with a particular output. In this way, the algorithm will be able to provide satisfactory outputs when presented with completely different data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this sense, the aim of supervised learning is for an artificial intelligence system to be able to perform <strong>regression and classification tasks with a high degree of accuracy.<\/strong> For example, it can be used to determine which category a blog post belongs to or to predict a sales index for the future. Supervised learning can also be applied in other AI-related processes, such as anomaly detection, the <a href=\"https:\/\/tecnologia.euroinnova.com\/en\/reconocimiento-de-imagenes\/\" target=\"_blank\" rel=\"noopener\">image recognition<\/a> or spam filtering.<\/span><\/p>\n<h2 id=\"aprendizaje-supervisado-vs-no-supervisado-vs-semisupervisado\"><span style=\"font-weight: 400;\">Supervised vs. unsupervised vs. semi-supervised learning<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">As we have explained in supervised learning, the model receives classified data, that is, <strong>each input comes with a label indicating the correct answer.<\/strong> The model learns to make predictions from the inputs and adjusts itself to minimise the difference between the predictions and the actual labels.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In unsupervised learning, the model receives<strong> unlabelled data and looks for underlying patterns or structures.<\/strong> in the data without external help. The main objective of this machine learning technique is to establish associations between data or natural groupings in the data without a predetermined classification.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Semi-supervised learning combines elements of supervised and unsupervised learning. Here, the model receives both <strong>labelled and unlabelled data.<\/strong> It uses labelled data to learn in a supervised way, but also uses unlabelled data to improve its ability to generalise and find patterns in the data.\u00a0<\/span><\/p>\n<h2 id=\"cuando-aplicar-el-aprendizaje-supervisado\"><span style=\"font-weight: 400;\">When to apply supervised learning?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">It is appropriate to use supervised learning in artificial intelligence in situations where we have labelled data, we know the output we want to obtain or if our goal is to formulate very accurate predictions from a labelled data set.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We can mention a couple of cases where it is better to apply supervised learning rather than unsupervised learning:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Classification and prediction:<\/strong> When we need to predict a specific category or numerical value based on labelled historical data, supervised learning is the most efficient alternative. For example, in email spam detection, we want to classify emails as \u201cspam\u201d or \u201cnon-spam\u201d based on previously labelled examples.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Clear pattern recognition:<\/strong> When data has clear and distinct patterns that can be identified with specific labels, supervised learning is faster and gives cleaner results. For example, in image recognition, where we want to classify images as \u201ccats\u201d or \u201cdogs\u201d, supervised learning works well because the images come standardly labelled with the correct category.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">In contrast, unsupervised learning is more useful when we do not have labels for our data and want to explore the underlying structure of our data. For example, if we have a dataset of customers, but we do not know a priori whether they belong to different market segments, it would be useful to use unsupervised learning techniques such as clustering to group customers into similar segments based on their characteristics.<\/span><\/p>\n<h2 id=\"como-funciona-el-aprendizaje-supervisado\"><span style=\"font-weight: 400;\">How does supervised learning work?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">During its training phase, the system is fed with classified data sets so that it learns the variables it can associate with each value. Then, to test the ability of the trained algorithm, we present it with a different data set. This data is classified, but is given to the algorithm as unclassified input. The algorithm is thus tasked with correctly classifying this data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To apply supervised learning in an algorithm, the following steps must be followed:<\/span><\/p>\n<h3 id=\"escoge-el-conjunto-de-datos-clasificados-de-entrenamiento\"><span style=\"font-weight: 400;\">Choose the classified training dataset<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Here you select a <strong>data set containing examples of expected input and output for each of them. E<\/strong>This data must be pre-tagged (classified), i.e. each entry must have a label indicating which category or class it belongs to. For example, if you are building a model to recognise images of cats and dogs, you would need a set of pre-tagged images of cats and dogs.<\/span><\/p>\n<h3 id=\"divide-estos-datos-en-tres-categorias-segun-su-finalidad\"><span style=\"font-weight: 400;\">It divides these data into three categories according to their purpose<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">The training set will be used to train the model, the validation set will be used to evaluate and refine its performance during training, and the test set will be used to assess the accuracy of the algorithm once it has been trained.<\/span><\/p>\n<h3 id=\"disena-un-algoritmo-para-el-modelo-de-inteligencia-artificial\"><span style=\"font-weight: 400;\">Design an algorithm for the artificial intelligence model.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">This is where <strong>select the supervised learning algorithm<\/strong> you will use to build your model. There are several algorithms available, such as linear regression, decision trees, SVM (Support Vector Machines), neural networks, among others. The choice of algorithm depends on the task you are trying to solve, the type of data you have and other factors.<\/span><\/p>\n<h3 id=\"utiliza-el-conjunto-de-datos-de-entrenamiento-con-el-algoritmo\"><span style=\"font-weight: 400;\">It uses the training data set with the algorithm<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Once you have selected your algorithm, <strong>run it with the training dataset.<\/strong> To do this, you have to enter the input data and adjust the parameters of the algorithm so that it correctly links the inputs with their corresponding outputs by inference.<\/span><\/p>\n<h3 id=\"evalua-los-outputs-del-algoritmo\"><span style=\"font-weight: 400;\">Evaluates the outputs of the algorithm<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">After training the model, it is necessary to <strong>refine its parameters through the validation dataset.<\/strong> In this way, we will resolve any inaccuracies and refine the algorithm's performance.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once the algorithm has been perfected, we can <strong>assess the extent to which the model can generalise<\/strong> data that you have not seen during your training with the test data. You can calculate performance metrics such as accuracy, recall, F1-score, among others, to provide a more objective assessment of the algorithm.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At this stage, the algorithm is expected to give satisfactory outputs. If not, the algorithm should be re-trained or we should consider changing the algorithm and start this process again.<\/span><\/p>\n<h2 id=\"tecnicas-de-aprendizaje-supervisado\"><span style=\"font-weight: 400;\">Supervised learning techniques<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">There are many methods for training an AI with supervised learning. Here we explain the main data classification techniques used in supervised learning:<\/span><\/p>\n<h3 id=\"arboles-de-decision\"><span style=\"font-weight: 400;\">Decision trees<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Decision trees are supervised learning models used for classification and regression. In a <a href=\"https:\/\/tecnologia.euroinnova.com\/en\/arboles-de-decision\/\" target=\"_blank\" rel=\"noopener\">decision tree<\/a>, Each internal node represents a feature or attribute, each branch represents a decision based on that feature, and each leaf represents a result or label. We explain more details in this post about decision trees.<\/span><\/p>\n<h3 id=\"regresion-logistica\"><span style=\"font-weight: 400;\">Logistic regression<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Logistic regression is a supervised learning model used for binary classification problems, i.e. when the target variable has only two categories. Logistic regression estimates the probability that an instance belongs to a particular class by using a logistic function, which maps the input to an output between 0 and 1.\u00a0<\/span><\/p>\n<h3 id=\"random-forest\"><span style=\"font-weight: 400;\">Random forest<\/span><\/h3>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/tecnologia.euroinnova.com\/en\/algoritmo-random-forest\/\" target=\"_blank\" rel=\"noopener\">Random forest<\/a> (random forest) is a supervised learning method used for classification and regression problems. To do this, several decision trees are designed for subsequent training with data sets. Finally, the predictions of each one are averaged to obtain a final prediction.<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>El aprendizaje supervisado es un enfoque que se implementa en la creaci\u00f3n de inteligencia artificial en el que se entrena [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":711,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sin-categorizar"],"acf":[],"_links":{"self":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts\/3179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/comments?post=3179"}],"version-history":[{"count":0,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/posts\/3179\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/media\/711"}],"wp:attachment":[{"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/media?parent=3179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/categories?post=3179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecnologia.euroinnova.com\/en\/wp-json\/wp\/v2\/tags?post=3179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}