{"id":39,"date":"2026-05-18T12:37:25","date_gmt":"2026-05-18T12:37:25","guid":{"rendered":"https:\/\/convly.ai\/build-first-machine-learning-model-python\/"},"modified":"2026-06-10T05:06:15","modified_gmt":"2026-06-10T05:06:15","slug":"build-first-machine-learning-model-python","status":"publish","type":"post","link":"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/","title":{"rendered":"How to Build Your First Machine Learning Model in Python (2026)"},"content":{"rendered":"<p>The best way to understand machine learning is to build a model yourself. It&#8217;s far less intimidating than it sounds \u2014 with Python and the right library, your first working model is about 20 lines of code. This tutorial walks through every step, explaining not just <em>what<\/em> to type but <em>why<\/em>.<\/p>\n<div class=\"convly-tldr\">\n<h3>Key takeaways<\/h3>\n<ul>\n<li><strong>You&#8217;ll use<\/strong> Python and scikit-learn \u2014 the standard beginner-friendly ML library.<\/li>\n<li><strong>The workflow:<\/strong> load data \u2192 split it \u2192 train a model \u2192 evaluate \u2192 predict.<\/li>\n<li><strong>The golden rule:<\/strong> always test on data the model never saw during training.<\/li>\n<li><strong>No advanced math needed<\/strong> \u2014 scikit-learn handles the hard parts.<\/li>\n<\/ul>\n<\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-flat ez-toc-counter ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6a38a8e415e5d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a38a8e415e5d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#What_youll_build\" >What you&#8217;ll build<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_1_Set_up_your_tools\" >Step 1: Set up your tools<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_2_Load_the_data\" >Step 2: Load the data<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_3_Split_the_data\" >Step 3: Split the data<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_4_Choose_and_train_a_model\" >Step 4: Choose and train a model<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_5_Evaluate_the_model\" >Step 5: Evaluate the model<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Step_6_Make_a_prediction_on_new_data\" >Step 6: Make a prediction on new data<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#The_complete_workflow\" >The complete workflow<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Where_to_go_next\" >Where to go next<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Common_mistakes_that_quietly_break_your_first_model\" >Common mistakes that quietly break your first model<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#FAQ\" >FAQ<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Bottom_line\" >Bottom line<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/convly.ai\/pt\/build-first-machine-learning-model-python\/#Related_articles\" >Related articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_youll_build\"><\/span>What you&#8217;ll build<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You&#8217;ll build a <strong>classifier<\/strong> \u2014 a model that sorts things into categories. We&#8217;ll use the classic beginner dataset, the <strong>Iris dataset<\/strong>: measurements of iris flowers (petal and sepal length and width), where the task is to predict the flower&#8217;s species. It&#8217;s small, clean, and built into scikit-learn, so it&#8217;s perfect for a first model.<\/p>\n<p>The same five steps you learn here apply to almost every machine learning project, no matter how large.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_1_Set_up_your_tools\"><\/span>Step 1: Set up your tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You need Python and two libraries. <strong>scikit-learn<\/strong> is the workhorse \u2014 it provides datasets, algorithms, and evaluation tools in a consistent, beginner-friendly interface.<\/p>\n<p>Install them from your terminal:<\/p>\n<pre><code>pip install scikit-learn pandas\n<\/code><\/pre>\n<p>You can write the code in a plain <code>.py<\/code> file, but a <strong>Jupyter notebook<\/strong> (or a free cloud notebook like Google Colab) is ideal for learning \u2014 you run code in small pieces and see each result immediately.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_2_Load_the_data\"><\/span>Step 2: Load the data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Every ML project starts with data. Here we load the built-in Iris dataset:<\/p>\n<pre><code class=\"language-python\">from sklearn.datasets import load_iris\n\niris = load_iris()\nX = iris.data      # the measurements (the inputs \/ features)\ny = iris.target    # the species (the labels \/ answers)\n\nprint(&quot;Shape of X:&quot;, X.shape)   # (150, 4) \u2014 150 flowers, 4 measurements each\nprint(&quot;Classes:&quot;, iris.target_names)\n<\/code><\/pre>\n<p>Two variables matter here, and the naming is a universal convention:<\/p>\n<ul>\n<li><strong><code>X<\/code><\/strong> holds the <strong>features<\/strong> \u2014 the inputs the model learns from (the four measurements).<\/li>\n<li><strong><code>y<\/code><\/strong> holds the <strong>labels<\/strong> \u2014 the correct answers (the species).<\/li>\n<\/ul>\n<p>Because we have the answers, this is <a href=\"\/supervised-vs-unsupervised-vs-reinforcement-learning\/\">supervised learning<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_3_Split_the_data\"><\/span>Step 3: Split the data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is the most important step for getting an honest result. You must split your data into two parts:<\/p>\n<ul>\n<li>A <strong>training set<\/strong> the model learns from.<\/li>\n<li>A <strong>test set<\/strong> the model never sees during training \u2014 used only to evaluate it.<\/li>\n<\/ul>\n<p>If you tested on the same data you trained on, you&#8217;d just be measuring memorization, not real learning. (This is how you catch <a href=\"\/overfitting-how-to-prevent-it\/\">overfitting<\/a>.)<\/p>\n<pre><code class=\"language-python\">from sklearn.model_selection import train_test_split\n\nX_train, X_test, y_train, y_test = train_test_split(\n    X, y, test_size=0.2, random_state=42\n)\n<\/code><\/pre>\n<p><code>test_size=0.2<\/code> keeps 20% of the data for testing and trains on the other 80%. <code>random_state=42<\/code> just makes the random split reproducible, so you get the same result every run.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_4_Choose_and_train_a_model\"><\/span>Step 4: Choose and train a model<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now the machine learning itself. We&#8217;ll use a <strong>Random Forest<\/strong> \u2014 an accurate, reliable, beginner-friendly algorithm (see our <a href=\"\/top-10-machine-learning-algorithms\/\">algorithms guide<\/a>).<\/p>\n<p>In scikit-learn, training a model is two lines:<\/p>\n<pre><code class=\"language-python\">from sklearn.ensemble import RandomForestClassifier\n\nmodel = RandomForestClassifier(random_state=42)\nmodel.fit(X_train, y_train)\n<\/code><\/pre>\n<p>That <code>.fit()<\/code> call <strong>is<\/strong> the training. The model studies the training features and their labels and learns the patterns that connect measurements to species. scikit-learn handles all the math behind that single line.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_5_Evaluate_the_model\"><\/span>Step 5: Evaluate the model<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now check how well it learned \u2014 using the test set it has never seen:<\/p>\n<pre><code class=\"language-python\">from sklearn.metrics import accuracy_score\n\npredictions = model.predict(X_test)\naccuracy = accuracy_score(y_test, predictions)\n\nprint(f&quot;Accuracy: {accuracy:.2%}&quot;)\n<\/code><\/pre>\n<p><code>.predict()<\/code> asks the model to classify the test flowers; <code>accuracy_score<\/code> compares its guesses to the true answers. On the Iris dataset you&#8217;ll typically see accuracy around 95\u2013100% \u2014 your model correctly identifies almost every flower it never saw before.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_6_Make_a_prediction_on_new_data\"><\/span>Step 6: Make a prediction on new data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The real payoff: using the model on brand-new input. Give it a set of measurements and it predicts the species:<\/p>\n<pre><code class=\"language-python\">new_flower = [[5.1, 3.5, 1.4, 0.2]]   # sepal &amp; petal measurements\nprediction = model.predict(new_flower)\n\nprint(&quot;Predicted species:&quot;, iris.target_names[prediction[0]])\n<\/code><\/pre>\n<p>That&#8217;s a complete machine learning model: trained, tested, and making predictions on data it has never encountered.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_complete_workflow\"><\/span>The complete workflow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Those five steps are not just an exercise \u2014 they&#8217;re the skeleton of essentially every supervised ML project:<\/p>\n<table class=\"convly-vs\">\n<thead>\n<tr>\n<th>Step<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1. Load data<\/td>\n<td>Get features (X) and labels (y)<\/td>\n<\/tr>\n<tr>\n<td>2. Split data<\/td>\n<td>Separate training and test sets<\/td>\n<\/tr>\n<tr>\n<td>3. Train<\/td>\n<td><code>model.fit()<\/code> learns the pattern<\/td>\n<\/tr>\n<tr>\n<td>4. Evaluate<\/td>\n<td>Measure accuracy on unseen test data<\/td>\n<\/tr>\n<tr>\n<td>5. Predict<\/td>\n<td><code>model.predict()<\/code> on new inputs<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Bigger projects add data cleaning, feature preparation, and model tuning \u2014 but this core loop stays the same.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Where_to_go_next\"><\/span>Where to go next<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To keep building:<\/p>\n<ul>\n<li><strong>Try other algorithms<\/strong> \u2014 swap <code>RandomForestClassifier<\/code> for <code>LogisticRegression<\/code> or <code>SVC<\/code> and compare. scikit-learn&#8217;s consistent interface makes this trivial.<\/li>\n<li><strong>Try other datasets<\/strong> \u2014 practice on <a href=\"\/best-free-datasets-machine-learning\/\">free datasets<\/a> that interest you.<\/li>\n<li><strong>Learn data preparation<\/strong> \u2014 real data is messy; cleaning and preparing it is most of the job.<\/li>\n<li><strong>Explore evaluation<\/strong> \u2014 accuracy is just one metric; learn precision, recall, and cross-validation.<\/li>\n<\/ul>\n<p><!--ai-enriched--><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Common_mistakes_that_quietly_break_your_first_model\"><\/span>Common mistakes that quietly break your first model<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Your model trained and printed an accuracy score \u2014 but a number that looks good is not the same as a model that works. These are the traps beginners fall into most often, and all of them are easy to avoid once you know they exist.<\/p>\n<ul>\n<li><strong>Judging the model on data it already saw.<\/strong> If you measure accuracy on the training data, you are grading the model on the answers it memorized. A score of 100% there means nothing. Always evaluate on the held-out test set you created when you split the data \u2014 that is the only number that estimates real-world performance.<\/li>\n<li><strong>Data leakage: letting test data influence training.<\/strong> This is the most damaging and least obvious mistake. If you scale, normalize, or fill in missing values <em>before<\/em> splitting, statistics from the test set (like a column&#8217;s mean) leak into training and inflate your score. The fix is strict ordering: split first, then <strong>fit<\/strong> any transformer on the training set only and merely <strong>apply<\/strong> it to the test set. scikit-learn&#8217;s documentation flags this as one of the most common pitfalls in machine learning.<\/li>\n<li><strong>Forgetting to scale when the algorithm needs it.<\/strong> Distance- and gradient-based models (k-nearest neighbors, SVMs, logistic regression) are thrown off when one feature ranges 0\u20131 and another ranges 0\u2013100,000. Tree-based models like random forests do not care. Know which camp your algorithm is in.<\/li>\n<li><strong>Trusting accuracy on imbalanced data.<\/strong> If 95% of your examples are one class, a model that always guesses that class scores 95% while being useless. When classes are lopsided, read the precision, recall, and F1-score from <code>classification_report<\/code> instead of accuracy alone.<\/li>\n<\/ul>\n<p>The cleanest defence against leakage is a <strong>Pipeline<\/strong>. Chaining your preprocessing and model into one object means every transformation is automatically fit on the right slice of data, every time \u2014 including during cross-validation:<\/p>\n<ul>\n<li><code>from sklearn.pipeline import make_pipeline<\/code><\/li>\n<li><code>model = make_pipeline(StandardScaler(), LogisticRegression())<\/code><\/li>\n<li>Then call <code>model.fit(X_train, y_train)<\/code> exactly as before.<\/li>\n<\/ul>\n<p>One last habit worth building early: a single train\/test split is a noisy estimate. Re-running with a different random split can swing your score by several points. Once you are comfortable, replace the single split with <code>cross_val_score<\/code>, which trains and tests across several folds and reports the average \u2014 a far more honest read on whether your model actually learned something.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3>How do I build a machine learning model in Python?<\/h3>\n<p>Use the scikit-learn library. The workflow is: load your data into features (X) and labels (y), split it into training and test sets, create a model and call <code>.fit()<\/code> to train it, evaluate it on the test set, and use <code>.predict()<\/code> for new data. A first model is about 20 lines of code.<\/p>\n<h3>What library should beginners use for machine learning?<\/h3>\n<p>scikit-learn. It offers a wide range of algorithms, built-in datasets, and evaluation tools through one simple, consistent interface, and it handles the underlying math for you. It&#8217;s the standard starting point before moving to deep learning frameworks.<\/p>\n<h3>Do I need to be good at math to build an ML model?<\/h3>\n<p>No. To build models with scikit-learn you need only basic Python and an understanding of the workflow. The library handles the math. Deeper math becomes useful later if you want to tune models expertly or do research.<\/p>\n<h3>Why do I need to split data into training and test sets?<\/h3>\n<p>So you can measure real performance. If you test a model on the same data it trained on, you only measure memorization. A separate test set the model never saw shows whether it genuinely learned the pattern and can generalize to new data.<\/p>\n<h3>What does model.fit() do?<\/h3>\n<p><code>.fit()<\/code> is the training step. It feeds the training features and labels to the algorithm, which adjusts its internal parameters to learn the patterns connecting inputs to correct answers. After <code>.fit()<\/code>, the model is trained and ready to make predictions.<\/p>\n<h3>My model got high accuracy \u2014 does that mean it&#8217;s good?<\/h3>\n<p>Not necessarily. High accuracy is only meaningful if it was measured on the held-out test set, not the training data, and if your classes are reasonably balanced. On a dataset where one class dominates, a high score can come from the model simply guessing the majority class every time. Check precision, recall, and F1-score with <code>classification_report<\/code>, and confirm the number came from data the model never trained on.<\/p>\n<h3>How do I save my trained model and use it later?<\/h3>\n<p>Use Python&#8217;s <code>joblib<\/code> library, which ships with scikit-learn. Call <code>joblib.dump(model, \"model.joblib\")<\/code> to write the trained model to disk, and <code>joblib.load(\"model.joblib\")<\/code> to load it back in another script \u2014 no retraining required. Save the entire Pipeline, not just the final estimator, so your scaling and preprocessing travel with the model and new inputs are handled identically.<\/p>\n<h3>How do I move from a built-in dataset to my own data?<\/h3>\n<p>Load your data with pandas \u2014 <code>pandas.read_csv(\"yourfile.csv\")<\/code> \u2014 then separate your input columns (features, usually called <code>X<\/code>) from the column you want to predict (the target, <code>y<\/code>). From there the workflow is identical: split, train, evaluate. The new work is mostly cleaning: handling missing values, encoding text categories into numbers, and choosing which columns are actually useful. That data-preparation step is where most real-world ML time is spent.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Bottom_line\"><\/span>Bottom line<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Building your first machine learning model is genuinely a short, achievable project: install scikit-learn, then load, split, train, evaluate, and predict. Those five steps are the foundation of nearly every supervised ML project you&#8217;ll ever build.<\/p>\n<p>Don&#8217;t just read this \u2014 open a notebook and run the code. Change the algorithm, try a different dataset, break things and fix them. The concepts in machine learning click far faster once you&#8217;ve trained a model with your own hands. When you&#8217;re ready for more, grab a <a href=\"\/best-free-datasets-machine-learning\/\">free dataset<\/a> and build something of your own.<\/p>\n<p><!--related-block--><\/p>\n<div class=\"convly-related\">\n<h2><span class=\"ez-toc-section\" id=\"Related_articles\"><\/span>Related articles<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/convly.ai\/90-day-ai-engineer-path\/\">From Zero to AI Engineer: Your 90-Day Learning Path<\/a><\/li>\n<li><a href=\"https:\/\/convly.ai\/local-llm-ollama-setup\/\">Setting Up Your First Local LLM with Ollama<\/a><\/li>\n<li><a href=\"https:\/\/convly.ai\/build-personal-ai-assistant-python\/\">Build a Personal AI Assistant in 30 Minutes (Python Tutorial)<\/a><\/li>\n<li><a href=\"https:\/\/convly.ai\/how-to-run-llama-3-locally-on-snapdragon-8-gen-4\/\">How to Run Llama 3 Locally on Snapdragon 8 Gen 4 (Step-by-Step, 2026)<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Build a working machine learning model in Python, step by step. This beginner tutorial uses scikit-learn to take you from setup to a trained, tested model.<\/p>","protected":false},"author":0,"featured_media":40,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"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":[9],"tags":[486,484,476,487,485],"class_list":["post-39","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-first-ml-model","tag-machine-learning-python","tag-ml-for-beginners","tag-python-tutorial","tag-scikit-learn"],"_links":{"self":[{"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":3,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":1052,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/posts\/39\/revisions\/1052"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/media\/40"}],"wp:attachment":[{"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/convly.ai\/pt\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}