{"id":3484,"date":"2026-03-01T20:47:47","date_gmt":"2026-03-01T19:47:47","guid":{"rendered":"https:\/\/www.gironi.it\/blog\/understanding-the-basics-of-machine-learning-a-beginners-guide\/"},"modified":"2026-03-02T09:28:52","modified_gmt":"2026-03-02T08:28:52","slug":"understanding-the-basics-of-machine-learning-a-beginners-guide","status":"publish","type":"post","link":"https:\/\/www.gironi.it\/blog\/en\/understanding-the-basics-of-machine-learning-a-beginners-guide\/","title":{"rendered":"Understanding the Basics of Machine Learning: A Beginner&#8217;s Guide"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Machine Learning is changing the way we see the world around us. From weather prediction to medical diagnosis, from content recommendations on streaming platforms to financial fraud detection, Machine Learning is increasingly present in our daily lives.<\/p>\n<p>But what exactly is it, and how does it work? In this post, we will <strong>explore the fundamental concepts of Machine Learning and see how it can be used to solve real-world problems<\/strong>. We will also look at how to get started with Machine Learning, what resources are available, and how to use this technology to improve both work and everyday life.<\/p>\n<p><!--more--><\/p>\n<p style=\"background-color:#f0f0f0;padding:1em;border-radius:4px\"><strong><em>Caveat<\/em><\/strong>: This article is a simple introduction to a vast subject. It is written for anyone who wants to understand the basic concepts of Machine Learning, without requiring advanced technical or mathematical knowledge. At the end of the post, we provide a set of useful resources for anyone who wishes to explore the topic further and continue what is a truly fascinating journey.<\/p>\n<div style=\"border: 1px solid #ccc;padding: 1.2em 1.5em;margin: 1.5em 0;border-radius: 6px\">\n<h3 style=\"margin-top: 0\">What We&#8217;ll Cover<\/h3>\n<ul>\n<li><a href=\"#what-is-ml\">What Is Machine Learning<\/a><\/li>\n<li><a href=\"#types\">Supervised vs Unsupervised Learning<\/a><\/li>\n<li><a href=\"#supervised-algorithms\">Main Supervised Learning Algorithms<\/a><\/li>\n<li><a href=\"#unsupervised-algorithms\">Main Unsupervised Learning Algorithms<\/a><\/li>\n<li><a href=\"#ml-process\">The Machine Learning Process<\/a><\/li>\n<li><a href=\"#getting-started\">Getting Started: Tutorials and Resources<\/a><\/li>\n<li><a href=\"#jupyter-colab\">Jupyter Lab and Google Colab<\/a><\/li>\n<li><a href=\"#further-reading\">Further Reading<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"what-is-ml\">What Is Machine Learning<\/h2>\n<p>Machine Learning, or automated learning, is a technology that allows machines to &#8220;learn&#8221; from data and improve their performance without being explicitly programmed. In other words, Machine Learning enables machines to &#8220;learn&#8221; from experience, just as humans do.<\/p>\n<p>There are two main types of Machine Learning: <strong>supervised Machine Learning<\/strong> and <strong>unsupervised Machine Learning<\/strong>.<\/p>\n<p>In supervised Machine Learning, the model is &#8220;trained&#8221; on a dataset that includes examples of both inputs and desired outputs. The model then uses these examples to make predictions on new data. In unsupervised Machine Learning, the model must &#8220;discover&#8221; on its own the structures and relationships within the data, without being guided by pre-defined examples.<\/p>\n<p>Machine Learning is used across a wide range of applications, from weather prediction to medical diagnosis, from content recommendations to financial fraud detection. In general, the goal of Machine Learning is to automate decisions and predictions based on data, improving the efficiency and accuracy of the process.<\/p>\n<h2 id=\"types\">Types of Machine Learning: Supervised and Unsupervised<\/h2>\n<p>As we have already seen, Machine Learning can be divided into two main categories: supervised Machine Learning and unsupervised Machine Learning.<\/p>\n<p><strong>Supervised Machine Learning is the most common type of automated learning<\/strong> and is based on a <strong>set of already labeled data<\/strong>. In other words, the model is &#8220;trained&#8221; on a dataset that includes examples of both inputs and desired outputs. The model then uses these examples to learn to make inferences on new data. For example, a spam classifier could be trained on a set of emails labeled as &#8220;spam&#8221; or &#8220;not spam,&#8221; and then used to classify new incoming emails.<\/p>\n<p><strong>Unsupervised Machine Learning<\/strong>, on the other hand, <strong>is based on a set of unlabeled data<\/strong>. In other words, the model must &#8220;learn&#8221; on its own to discover structures and relationships within the data. A typical example of this type of learning is clustering, where data is divided into groups (<em>clusters<\/em>) based on their similarities.<\/p>\n<p style=\"background-color:#f0f0f0;padding:1em;border-radius:4px\">In general, we can say that supervised Machine Learning uses labeled data to make predictions or classifications, while unsupervised Machine Learning uses unlabeled data to make discoveries or identify relationships within the data.<\/p>\n<h3 id=\"supervised-algorithms\">Main Supervised Learning Algorithms<\/h3>\n<p>The main supervised Machine Learning algorithms are:<\/p>\n<ul>\n<li><strong>Linear Regression<\/strong>: used for <strong>quantitative predictions<\/strong> on a continuous variable. For example, predicting the price of a house based on its square footage.\n<p>We have written dedicated posts on this topic, which may be very helpful for a proper understanding:<br \/><strong><a href=\"https:\/\/www.gironi.it\/blog\/en\/correlation-and-regression-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">Correlation and Regression Analysis<\/a><br \/><a href=\"https:\/\/www.gironi.it\/blog\/en\/multiple-regression-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">Multiple Regression Analysis<\/a><\/strong><\/li>\n<li><strong>Logistic Regression<\/strong>: used for <strong>categorical variable predictions<\/strong>, i.e., when the output is one class among two or more possibilities. For example, predicting whether a patient has a certain disease or not.<\/li>\n<li><strong>Decision Trees<\/strong>: used for both classification and regression. They consist of a decision graph where each node represents a decision and each branch represents an outcome.<\/li>\n<li><strong>Random Forest<\/strong>: a variant of decision trees where multiple trees are used to make predictions, and then the average of the trees&#8217; predictions is used.<\/li>\n<li><strong>Gradient Boosting<\/strong>: an algorithm that uses a series of decision trees in succession to improve predictions.<\/li>\n<li><strong>Support Vector Machine (SVM)<\/strong>: used for classification when the data is linearly separable.<\/li>\n<li><strong>k-Nearest Neighbors (k-NN)<\/strong>: used for classification based on the similarity of data points relative to a reference point.<\/li>\n<li><strong>Naive Bayes<\/strong>: used for probability-based classification.<\/li>\n<\/ul>\n<h3 id=\"unsupervised-algorithms\">Main Unsupervised Learning Algorithms<\/h3>\n<ul>\n<li><strong>Clustering<\/strong>: used to divide data into groups or clusters based on their similarities. The most common clustering algorithm is k-means.<\/li>\n<li><strong>Principal Component Analysis (PCA)<\/strong>: used to reduce the dimensionality of data, that is, to transform a set of correlated variables into a set of uncorrelated variables.<\/li>\n<li><strong>Density-Based Spatial Clustering (DBSCAN)<\/strong>: used to find clusters based on the density of data points.<\/li>\n<li><strong>Association Rule Mining (Apriori, FP-Growth)<\/strong>: used to find association rules between variables.<\/li>\n<li><strong>Anomaly Detection Algorithms (One-class SVM, Isolation Forest)<\/strong>: used to detect elements that deviate from the norm.<\/li>\n<li><strong>Self-Organizing Maps (SOM)<\/strong>: used to visualize hidden structures in the data.<\/li>\n<li><strong>Structure Detection Algorithms (Spectral Clustering, Hierarchical Clustering)<\/strong>: used to find hierarchical relationships in the data.<\/li>\n<\/ul>\n<p>These are some of the main unsupervised Machine Learning algorithms, but there are many others. As with supervised Machine Learning, the choice of algorithm depends on the characteristics of the specific problem and the nature of the data.<\/p>\n<p style=\"background-color:#f0f0f0;padding:1em 1.2em;border-radius:4px;font-size:1.1em\"><strong>In practice, choosing the right algorithm for a specific solution is a critical decision that can determine the success or complete failure of a data analysis effort.<\/strong><\/p>\n<h2 id=\"ml-process\">The Main Phases of the Machine Learning Process<\/h2>\n<ol>\n<li><strong>Data Collection<\/strong>: The first phase consists of gathering the data needed for the problem to be solved. This data must be cleaned, formatted, and prepared for processing.<\/li>\n<li><strong>Data Analysis<\/strong>: Once the data has been collected, it is important to explore it in order to better understand the problem and identify any interesting relationships or characteristics.<\/li>\n<li><strong>Model Selection<\/strong>: The next phase consists of choosing the most appropriate Machine Learning model for the problem at hand. There are many available algorithms, including decision trees, neural networks, and support vector machines (SVM).<\/li>\n<li><strong>Model Training<\/strong>: Once the model has been selected, it must be &#8220;trained&#8221; using the training data. This process allows the model to &#8220;learn&#8221; from the data and become capable of making predictions on new data.<\/li>\n<li><strong>Model Evaluation<\/strong>: Once trained, the model must be evaluated on a test dataset to verify its accuracy.<\/li>\n<li><strong>Model Deployment<\/strong>: If the model has shown good performance, it can be used to solve the problem in question and deployed to a production environment.<\/li>\n<li><strong>Monitoring and Maintenance<\/strong>: The model must be monitored to ensure it continues to function correctly and, if necessary, updated or replaced if performance declines.<\/li>\n<\/ol>\n<h2 id=\"getting-started\">Getting Started with Machine Learning: Tutorials and Resources<\/h2>\n<p>Machine Learning is a rapidly evolving field, and there are many resources available for those who want to get started. Any list is necessarily incomplete and subject to personal preferences, but here are some good starting points:<\/p>\n<p><strong>Tutorials:<\/strong> There are numerous tutorials available online that cover the basics of Machine Learning. For example, the scikit-learn data science website has a tutorial section that explains how to use the library to build some of the most common models.<br \/><a href=\"https:\/\/scikit-learn.org\/stable\/tutorial\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/scikit-learn.org\/stable\/tutorial\/index.html<\/a><\/p>\n<p><strong>Books:<\/strong> There are many books on the subject, but some of the classics in the field include:<br \/>&#8220;<em>Introduction to Machine Learning<\/em>&#8221; by Alpaydin: <a href=\"https:\/\/www.amazon.com\/Introduction-Machine-Learning-Adaptive-Computation\/dp\/0262028182\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.amazon.com\/Introduction-Machine-Learning-Adaptive-Computation\/dp\/0262028182<\/a><br \/>&#8220;<em>Python Machine Learning<\/em>&#8221; by Raschka and Mirjalili: <a href=\"https:\/\/www.packtpub.com\/data\/python-machine-learning-third-edition\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.packtpub.com\/data\/python-machine-learning-third-edition<\/a><\/p>\n<p><strong>Online Courses:<\/strong> There are many online courses that cover the basics of Machine Learning, such as the excellent course by Andrew Ng on Coursera:<br \/><a href=\"https:\/\/www.coursera.org\/learn\/machine-learning\" target=\"_blank\" rel=\"noopener\">https:\/\/www.coursera.org\/learn\/machine-learning<\/a><br \/>or the Machine Learning course by fast.ai:<br \/><a href=\"https:\/\/www.fast.ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.fast.ai\/<\/a><\/p>\n<p><strong>Tools:<\/strong> There are many tools and libraries that can be used to explore data and build models. Some of the most popular include:<\/p>\n<p><strong>scikit-learn<\/strong>: a Machine Learning library for Python<br \/><a href=\"https:\/\/scikit-learn.org\/stable\/\" target=\"_blank\" rel=\"noopener\">https:\/\/scikit-learn.org\/stable\/<\/a><br \/><strong>TensorFlow<\/strong>: a Machine Learning library developed by Google<br \/><a href=\"https:\/\/www.tensorflow.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.tensorflow.org\/<\/a><br \/><strong>Keras<\/strong>: a high-level interface for building neural networks in TensorFlow<br \/><a href=\"https:\/\/keras.io\/\" target=\"_blank\" rel=\"noopener\">https:\/\/keras.io\/<\/a><br \/><strong>PyTorch<\/strong>: an open-source Machine Learning library developed by Facebook<br \/><a href=\"https:\/\/pytorch.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pytorch.org\/<\/a><\/p>\n<p>In general, we recommend starting with tutorials and online courses to become familiar with the basic concepts, and then continuing with books and tools to deepen understanding and develop practical skills. To become a good data scientist, it is also important to work with real data and not just tutorials or exercises. Seeking out Machine Learning projects or competitions can help build concrete experience.<\/p>\n<h2 id=\"jupyter-colab\">Experimenting with Code: Jupyter Lab and Google Colab<\/h2>\n<p>Jupyter Lab and Google Colab are both <strong>free and powerful tools for data exploration<\/strong>, learning, and testing Machine Learning code.<\/p>\n<p>How can we use both tools to create development environments and share our work with others?<\/p>\n<p><strong>Jupyter Lab<\/strong> is the new interface for <strong>Jupyter Notebook<\/strong> that provides an integrated development environment for working with notebooks. <strong>It is an interactive development environment that allows us to write, run, and document Python and R code within a web browser<\/strong>. It is particularly useful for data analysis and for learning Machine Learning.<\/p>\n<p>To get started, Jupyter Lab needs to be installed on a local machine. This can be done easily using <strong>Anaconda<\/strong>, a Python distribution that includes Jupyter Lab and many other data science libraries. Once installed, Jupyter Lab can be launched from the command line and a new notebook opened to write and run code. Jupyter Lab is available at: <a href=\"https:\/\/jupyter.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/jupyter.org\/<\/a><\/p>\n<p>It is also possible to test the environment directly in the browser with JupyterLite:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2023\/01\/jubyterLite-1024x459.png\" alt=\"JupyterLite: try the Jupyter environment in your browser\" \/><figcaption>JupyterLite: try the Jupyter environment in your browser<\/figcaption><\/figure>\n<p><strong>Google Colab<\/strong> is a <strong>cloud-based<\/strong> development environment that allows us to write and run Python and R code within a web browser <strong>without any installation<\/strong>. It is a very convenient option, because Colab can be accessed from any device with an internet connection and work can be shared with others simply by providing a link. It also allows the use of a GPU or TPU to make computations more powerful. Google Colab is available at: <a href=\"https:\/\/colab.research.google.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/colab.research.google.com\/<\/a><\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2023\/01\/google-colab-1024x506.png\" alt=\"Google Colab: test and share code in the cloud\" \/><figcaption>Google Colab: test and share code in the cloud<\/figcaption><\/figure>\n<p>Both tools allow us to create a sequence of cells containing code and text. <strong>Code can be executed within cells and the results displayed directly in the notebook<\/strong>. This makes Jupyter Lab and Google Colab ideal for data exploration, Machine Learning learning, sharing, and documenting work.<\/p>\n<hr \/>\n<h3>You might also like<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.gironi.it\/blog\/en\/correlation-and-regression-analysis\/\">Correlation and Regression Analysis<\/a><\/li>\n<li><a href=\"https:\/\/www.gironi.it\/blog\/en\/logistic-regression\/\">Logistic Regression<\/a><\/li>\n<li><a href=\"https:\/\/www.gironi.it\/blog\/en\/how-to-use-decision-trees\/\">How to Use Decision Trees<\/a><\/li>\n<\/ul>\n<hr \/>\n<h3 id=\"further-reading\">Further Reading<\/h3>\n<p>For a solid introduction to the statistical foundations of machine learning\u2014including regression, model selection, and prediction\u2014<a href=\"https:\/\/www.amazon.it\/dp\/8891906190?tag=consulenzeinf-21\" rel=\"nofollow sponsored noopener\" target=\"_blank\"><em>Introduzione all&#8217;econometria<\/em><\/a> by Stock and Watson provides the quantitative framework that underpins many ML techniques. For a hands-on guide to online experimentation and A\/B testing\u2014essential skills for deploying ML models in production\u2014<a href=\"https:\/\/www.amazon.it\/dp\/1108724264?tag=consulenzeinf-21\" rel=\"nofollow sponsored noopener\" target=\"_blank\"><em>Trustworthy Online Controlled Experiments<\/em><\/a> by Kohavi, Tang and Xu is the definitive reference.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Machine Learning is changing the way we see the world around us. From weather prediction to medical diagnosis, from content recommendations on streaming platforms to financial fraud detection, Machine Learning is increasingly present in our daily lives. But what exactly is it, and how does it work? In this post, we will explore the &hellip; <a href=\"https:\/\/www.gironi.it\/blog\/en\/understanding-the-basics-of-machine-learning-a-beginners-guide\/\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;Understanding the Basics of Machine Learning: A Beginner&#8217;s Guide&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[161],"tags":[],"class_list":["post-3484","post","type-post","status-publish","format-standard","hentry","category-statistics"],"lang":"en","translations":{"en":3484,"it":2594},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"autore-articoli","author_link":"https:\/\/www.gironi.it\/blog\/author\/autore-articoli\/"},"uagb_comment_info":5,"uagb_excerpt":"Introduction Machine Learning is changing the way we see the world around us. From weather prediction to medical diagnosis, from content recommendations on streaming platforms to financial fraud detection, Machine Learning is increasingly present in our daily lives. But what exactly is it, and how does it work? In this post, we will explore the&hellip;","_links":{"self":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/comments?post=3484"}],"version-history":[{"count":1,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3484\/revisions"}],"predecessor-version":[{"id":3488,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3484\/revisions\/3488"}],"wp:attachment":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/media?parent=3484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/categories?post=3484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/tags?post=3484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}