[{"data":1,"prerenderedAt":30179},["ShallowReactive",2],{"blog-index-en":3},[4,3848,5661,22970,23608],{"id":5,"title":6,"author":7,"body":8,"date":3829,"description":14,"extension":3830,"image":3831,"lastmod":3829,"meta":3832,"navigation":160,"order":144,"path":3833,"seo":3834,"sitemap":3835,"slug":3838,"stem":3839,"summary":3840,"tags":3841,"__hash__":3847},"content_en\u002Fblog\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis.md","Experimenting with Exploratory Data Analysis","David Deras",{"type":9,"value":10,"toc":3820},"minimark",[11,15,25,28,31,36,44,52,57,73,834,838,849,901,904,1026,1029,1066,1069,1073,1076,1097,1551,1562,1569,1574,1577,1580,1591,1598,1603,1617,1620,1634,1637,1648,1651,1662,1671,1674,1681,1687,1690,1697,1703,1710,1713,1716,1730,1733,1739,1742,1749,1752,1755,1766,1772,1774,1779,1793,1796,1803,1806,2045,2048,2051,2328,2331,2342,2351,2354,2374,2381,2388,2391,2397,2400,2422,2429,2480,2487,2531,2538,2576,2583,2615,2622,2625,2670,2673,2687,2692,2695,2701,2704,2707,2710,2718,2721,2724,2727,2747,2766,2770,2777,3068,3072,3075,3231,3234,3240,3246,3313,3316,3342,3347,3532,3541,3544,3547,3653,3656,3720,3723,3768,3771,3816],[12,13,14],"p",{},"The exploratory data analysis (EDA) is a crucial step in any machine learning project. In this article, we will conduct some experiments with EDA to better understand how we can use it to gain valuable insights from our data and improve the performance of our models.",[12,16,17,18],{},"Previous article: ",[19,20,24],"a",{"href":21,"rel":22},"https:\u002F\u002Fderas.dev\u002Fblog\u002Fworkflow-machine-learning-projects",[23],"nofollow","The Workflow in Machine Learning Projects",[26,27],"table-of-contents",{},[29,30],"hr",{},[32,33,35],"h2",{"id":34},"a-practical-exercise-estimating-café-sales","A Practical Exercise: Estimating Café Sales",[12,37,38,39,43],{},"To understand the true impact of Exploratory Data Analysis (EDA), let's move beyond theory and dive into practice with a commercial scenario: ",[40,41,42],"strong",{},"Estimate the monthly revenue a café will generate",". This type of exercise allows managers and business owners to make data-driven decisions rather than relying on gut feelings.",[12,45,46,47],{},"You can follow this interactive exercise in Google Colab: ",[19,48,51],{"href":49,"rel":50},"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F12NPwGTp9JE0Vl926_ODlqpDRLkbnJimz?usp=sharing",[23],"EDA for Estimating Café Sales",[53,54,56],"h3",{"id":55},"step-1-data-generation-and-loading","Step 1: Data Generation and Loading",[12,58,59,60,64,65,68,69,72],{},"As the first step, we need a historical dataset. We will simulate the data for 365 operational days of the café, with variables ranging from ambient temperature to advertising investment (Ads on social media). We import the essential tools from the classic Python stack: ",[61,62,63],"code",{},"pandas"," for handling tables, and ",[61,66,67],{},"matplotlib","\u002F",[61,70,71],{},"seaborn"," for visualizations.",[74,75,80],"pre",{"className":76,"code":77,"language":78,"meta":79,"style":79},"language-python shiki shiki-themes vitesse-light vitesse-dark","import pandas as pd\nimport numpy as np\nimport random\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nnp.random.seed(42)\nrandom.seed(42)\n\nn = 365\nweathers = [\"Sunny\", \"Rainy\", \"Cloudy\"]\ndata = []\n\nfor _ in range(n):\n    temperature = round(random.uniform(15.0, 35.0), 1)\n    ad_investment = round(random.uniform(10.0, 150.0), 2)\n    nearby_events = random.choice([0, 1])\n    applied_discount = random.choice([0, 10, 15, 20])\n    weather = random.choice(weathers)\n\n    sales = (\n        500 +\n        (ad_investment * 2.5) -\n        (temperature * 8) +\n        (nearby_events * 250) +\n        (applied_discount * 5)\n    )\n\n    if weather == \"Rainy\": sales += 150\n    elif weather == \"Sunny\": sales -= 50\n\n    sales += np.random.normal(0, 80)\n\n    data.append([temperature, ad_investment, nearby_events, applied_discount, weather, round(sales, 2)])\n\ncolumns = [\"temperature_c\", \"ad_investment\", \"local_event\", \"discount\", \"weather\", \"daily_sales\"]\ndf = pd.DataFrame(data, columns=columns)\ndf.head()\n","python","",[61,81,82,101,114,122,142,155,162,188,203,208,220,264,275,280,304,342,377,406,441,462,467,478,488,509,526,543,558,564,569,599,625,630,660,665,717,722,786,820],{"__ignoreMap":79},[83,84,87,91,95,98],"span",{"class":85,"line":86},"line",1,[83,88,90],{"class":89},"sTPum","import",[83,92,94],{"class":93},"s8w-G"," pandas ",[83,96,97],{"class":89},"as",[83,99,100],{"class":93}," pd\n",[83,102,104,106,109,111],{"class":85,"line":103},2,[83,105,90],{"class":89},[83,107,108],{"class":93}," numpy ",[83,110,97],{"class":89},[83,112,113],{"class":93}," np\n",[83,115,117,119],{"class":85,"line":116},3,[83,118,90],{"class":89},[83,120,121],{"class":93}," random\n",[83,123,125,127,130,134,137,139],{"class":85,"line":124},4,[83,126,90],{"class":89},[83,128,129],{"class":93}," matplotlib",[83,131,133],{"class":132},"si6no",".",[83,135,136],{"class":93},"pyplot ",[83,138,97],{"class":89},[83,140,141],{"class":93}," plt\n",[83,143,145,147,150,152],{"class":85,"line":144},5,[83,146,90],{"class":89},[83,148,149],{"class":93}," seaborn ",[83,151,97],{"class":89},[83,153,154],{"class":93}," sns\n",[83,156,158],{"class":85,"line":157},6,[83,159,161],{"emptyLinePlaceholder":160},true,"\n",[83,163,165,168,170,173,175,178,181,185],{"class":85,"line":164},7,[83,166,167],{"class":93},"np",[83,169,133],{"class":132},[83,171,172],{"class":93},"random",[83,174,133],{"class":132},[83,176,177],{"class":93},"seed",[83,179,180],{"class":132},"(",[83,182,184],{"class":183},"sqbOQ","42",[83,186,187],{"class":132},")\n",[83,189,191,193,195,197,199,201],{"class":85,"line":190},8,[83,192,172],{"class":93},[83,194,133],{"class":132},[83,196,177],{"class":93},[83,198,180],{"class":132},[83,200,184],{"class":183},[83,202,187],{"class":132},[83,204,206],{"class":85,"line":205},9,[83,207,161],{"emptyLinePlaceholder":160},[83,209,211,214,217],{"class":85,"line":210},10,[83,212,213],{"class":93},"n ",[83,215,216],{"class":132},"=",[83,218,219],{"class":183}," 365\n",[83,221,223,226,228,231,235,239,241,244,247,250,252,254,256,259,261],{"class":85,"line":222},11,[83,224,225],{"class":93},"weathers ",[83,227,216],{"class":132},[83,229,230],{"class":132}," [",[83,232,234],{"class":233},"scnC2","\"",[83,236,238],{"class":237},"spP0B","Sunny",[83,240,234],{"class":233},[83,242,243],{"class":132},",",[83,245,246],{"class":233}," \"",[83,248,249],{"class":237},"Rainy",[83,251,234],{"class":233},[83,253,243],{"class":132},[83,255,246],{"class":233},[83,257,258],{"class":237},"Cloudy",[83,260,234],{"class":233},[83,262,263],{"class":132},"]\n",[83,265,267,270,272],{"class":85,"line":266},12,[83,268,269],{"class":93},"data ",[83,271,216],{"class":132},[83,273,274],{"class":132}," []\n",[83,276,278],{"class":85,"line":277},13,[83,279,161],{"emptyLinePlaceholder":160},[83,281,283,286,289,292,296,298,301],{"class":85,"line":282},14,[83,284,285],{"class":89},"for",[83,287,288],{"class":93}," _ ",[83,290,291],{"class":89},"in",[83,293,295],{"class":294},"sHLBJ"," range",[83,297,180],{"class":132},[83,299,300],{"class":93},"n",[83,302,303],{"class":132},"):\n",[83,305,307,310,312,315,317,319,321,324,326,329,331,334,337,340],{"class":85,"line":306},15,[83,308,309],{"class":93},"    temperature ",[83,311,216],{"class":132},[83,313,314],{"class":294}," round",[83,316,180],{"class":132},[83,318,172],{"class":93},[83,320,133],{"class":132},[83,322,323],{"class":93},"uniform",[83,325,180],{"class":132},[83,327,328],{"class":183},"15.0",[83,330,243],{"class":132},[83,332,333],{"class":183}," 35.0",[83,335,336],{"class":132},"),",[83,338,339],{"class":183}," 1",[83,341,187],{"class":132},[83,343,345,348,350,352,354,356,358,360,362,365,367,370,372,375],{"class":85,"line":344},16,[83,346,347],{"class":93},"    ad_investment ",[83,349,216],{"class":132},[83,351,314],{"class":294},[83,353,180],{"class":132},[83,355,172],{"class":93},[83,357,133],{"class":132},[83,359,323],{"class":93},[83,361,180],{"class":132},[83,363,364],{"class":183},"10.0",[83,366,243],{"class":132},[83,368,369],{"class":183}," 150.0",[83,371,336],{"class":132},[83,373,374],{"class":183}," 2",[83,376,187],{"class":132},[83,378,380,383,385,388,390,393,396,399,401,403],{"class":85,"line":379},17,[83,381,382],{"class":93},"    nearby_events ",[83,384,216],{"class":132},[83,386,387],{"class":93}," random",[83,389,133],{"class":132},[83,391,392],{"class":93},"choice",[83,394,395],{"class":132},"([",[83,397,398],{"class":183},"0",[83,400,243],{"class":132},[83,402,339],{"class":183},[83,404,405],{"class":132},"])\n",[83,407,409,412,414,416,418,420,422,424,426,429,431,434,436,439],{"class":85,"line":408},18,[83,410,411],{"class":93},"    applied_discount ",[83,413,216],{"class":132},[83,415,387],{"class":93},[83,417,133],{"class":132},[83,419,392],{"class":93},[83,421,395],{"class":132},[83,423,398],{"class":183},[83,425,243],{"class":132},[83,427,428],{"class":183}," 10",[83,430,243],{"class":132},[83,432,433],{"class":183}," 15",[83,435,243],{"class":132},[83,437,438],{"class":183}," 20",[83,440,405],{"class":132},[83,442,444,447,449,451,453,455,457,460],{"class":85,"line":443},19,[83,445,446],{"class":93},"    weather ",[83,448,216],{"class":132},[83,450,387],{"class":93},[83,452,133],{"class":132},[83,454,392],{"class":93},[83,456,180],{"class":132},[83,458,459],{"class":93},"weathers",[83,461,187],{"class":132},[83,463,465],{"class":85,"line":464},20,[83,466,161],{"emptyLinePlaceholder":160},[83,468,470,473,475],{"class":85,"line":469},21,[83,471,472],{"class":93},"    sales ",[83,474,216],{"class":132},[83,476,477],{"class":132}," (\n",[83,479,481,484],{"class":85,"line":480},22,[83,482,483],{"class":183},"        500",[83,485,487],{"class":486},"s5TCs"," +\n",[83,489,491,494,497,500,503,506],{"class":85,"line":490},23,[83,492,493],{"class":132},"        (",[83,495,496],{"class":93},"ad_investment ",[83,498,499],{"class":486},"*",[83,501,502],{"class":183}," 2.5",[83,504,505],{"class":132},")",[83,507,508],{"class":486}," -\n",[83,510,512,514,517,519,522,524],{"class":85,"line":511},24,[83,513,493],{"class":132},[83,515,516],{"class":93},"temperature ",[83,518,499],{"class":486},[83,520,521],{"class":183}," 8",[83,523,505],{"class":132},[83,525,487],{"class":486},[83,527,529,531,534,536,539,541],{"class":85,"line":528},25,[83,530,493],{"class":132},[83,532,533],{"class":93},"nearby_events ",[83,535,499],{"class":486},[83,537,538],{"class":183}," 250",[83,540,505],{"class":132},[83,542,487],{"class":486},[83,544,546,548,551,553,556],{"class":85,"line":545},26,[83,547,493],{"class":132},[83,549,550],{"class":93},"applied_discount ",[83,552,499],{"class":486},[83,554,555],{"class":183}," 5",[83,557,187],{"class":132},[83,559,561],{"class":85,"line":560},27,[83,562,563],{"class":132},"    )\n",[83,565,567],{"class":85,"line":566},28,[83,568,161],{"emptyLinePlaceholder":160},[83,570,572,575,578,581,583,585,587,590,593,596],{"class":85,"line":571},29,[83,573,574],{"class":89},"    if",[83,576,577],{"class":93}," weather ",[83,579,580],{"class":486},"==",[83,582,246],{"class":233},[83,584,249],{"class":237},[83,586,234],{"class":233},[83,588,589],{"class":132},":",[83,591,592],{"class":93}," sales ",[83,594,595],{"class":132},"+=",[83,597,598],{"class":183}," 150\n",[83,600,602,605,607,609,611,613,615,617,619,622],{"class":85,"line":601},30,[83,603,604],{"class":89},"    elif",[83,606,577],{"class":93},[83,608,580],{"class":486},[83,610,246],{"class":233},[83,612,238],{"class":237},[83,614,234],{"class":233},[83,616,589],{"class":132},[83,618,592],{"class":93},[83,620,621],{"class":132},"-=",[83,623,624],{"class":183}," 50\n",[83,626,628],{"class":85,"line":627},31,[83,629,161],{"emptyLinePlaceholder":160},[83,631,633,635,637,640,642,644,646,649,651,653,655,658],{"class":85,"line":632},32,[83,634,472],{"class":93},[83,636,595],{"class":132},[83,638,639],{"class":93}," np",[83,641,133],{"class":132},[83,643,172],{"class":93},[83,645,133],{"class":132},[83,647,648],{"class":93},"normal",[83,650,180],{"class":132},[83,652,398],{"class":183},[83,654,243],{"class":132},[83,656,657],{"class":183}," 80",[83,659,187],{"class":132},[83,661,663],{"class":85,"line":662},33,[83,664,161],{"emptyLinePlaceholder":160},[83,666,668,671,673,676,678,681,683,686,688,691,693,696,698,701,703,705,707,710,712,714],{"class":85,"line":667},34,[83,669,670],{"class":93},"    data",[83,672,133],{"class":132},[83,674,675],{"class":93},"append",[83,677,395],{"class":132},[83,679,680],{"class":93},"temperature",[83,682,243],{"class":132},[83,684,685],{"class":93}," ad_investment",[83,687,243],{"class":132},[83,689,690],{"class":93}," nearby_events",[83,692,243],{"class":132},[83,694,695],{"class":93}," applied_discount",[83,697,243],{"class":132},[83,699,700],{"class":93}," weather",[83,702,243],{"class":132},[83,704,314],{"class":294},[83,706,180],{"class":132},[83,708,709],{"class":93},"sales",[83,711,243],{"class":132},[83,713,374],{"class":183},[83,715,716],{"class":132},")])\n",[83,718,720],{"class":85,"line":719},35,[83,721,161],{"emptyLinePlaceholder":160},[83,723,725,728,730,732,734,737,739,741,743,746,748,750,752,755,757,759,761,764,766,768,770,773,775,777,779,782,784],{"class":85,"line":724},36,[83,726,727],{"class":93},"columns ",[83,729,216],{"class":132},[83,731,230],{"class":132},[83,733,234],{"class":233},[83,735,736],{"class":237},"temperature_c",[83,738,234],{"class":233},[83,740,243],{"class":132},[83,742,246],{"class":233},[83,744,745],{"class":237},"ad_investment",[83,747,234],{"class":233},[83,749,243],{"class":132},[83,751,246],{"class":233},[83,753,754],{"class":237},"local_event",[83,756,234],{"class":233},[83,758,243],{"class":132},[83,760,246],{"class":233},[83,762,763],{"class":237},"discount",[83,765,234],{"class":233},[83,767,243],{"class":132},[83,769,246],{"class":233},[83,771,772],{"class":237},"weather",[83,774,234],{"class":233},[83,776,243],{"class":132},[83,778,246],{"class":233},[83,780,781],{"class":237},"daily_sales",[83,783,234],{"class":233},[83,785,263],{"class":132},[83,787,789,792,794,797,799,802,804,807,809,813,815,818],{"class":85,"line":788},37,[83,790,791],{"class":93},"df ",[83,793,216],{"class":132},[83,795,796],{"class":93}," pd",[83,798,133],{"class":132},[83,800,801],{"class":93},"DataFrame",[83,803,180],{"class":132},[83,805,806],{"class":93},"data",[83,808,243],{"class":132},[83,810,812],{"class":811},"s9nN2"," columns",[83,814,216],{"class":132},[83,816,817],{"class":93},"columns",[83,819,187],{"class":132},[83,821,823,826,828,831],{"class":85,"line":822},38,[83,824,825],{"class":93},"df",[83,827,133],{"class":132},[83,829,830],{"class":93},"head",[83,832,833],{"class":132},"()\n",[53,835,837],{"id":836},"step-2-knowing-the-data-initial-exploration","Step 2: Knowing the Data (Initial Exploration)",[12,839,840,841,844,845,848],{},"With ",[61,842,843],{},"df.info()"," we check for missing values (nulls) and data types, while ",[61,846,847],{},"df.describe()"," provides a summary of the average, maximum and minimum daily sales and expenses.",[74,850,852],{"className":76,"code":851,"language":78,"meta":79,"style":79},"# A quick look at the health of our table\nprint(df.info())\n\n# Descriptive statistics (averages, quartiles, min\u002Fmax)\nprint(df.describe())\n",[61,853,854,860,877,881,886],{"__ignoreMap":79},[83,855,856],{"class":85,"line":86},[83,857,859],{"class":858},"snYqZ","# A quick look at the health of our table\n",[83,861,862,865,867,869,871,874],{"class":85,"line":103},[83,863,864],{"class":294},"print",[83,866,180],{"class":132},[83,868,825],{"class":93},[83,870,133],{"class":132},[83,872,873],{"class":93},"info",[83,875,876],{"class":132},"())\n",[83,878,879],{"class":85,"line":116},[83,880,161],{"emptyLinePlaceholder":160},[83,882,883],{"class":85,"line":124},[83,884,885],{"class":858},"# Descriptive statistics (averages, quartiles, min\u002Fmax)\n",[83,887,888,890,892,894,896,899],{"class":85,"line":144},[83,889,864],{"class":294},[83,891,180],{"class":132},[83,893,825],{"class":93},[83,895,133],{"class":132},[83,897,898],{"class":93},"describe",[83,900,876],{"class":132},[12,902,903],{},"Resulting in the following:",[74,905,909],{"className":906,"code":907,"language":908,"meta":79,"style":79},"language-sh shiki shiki-themes vitesse-light vitesse-dark","\u003Cclass 'pandas.core.frame.DataFrame'>\nRangeIndex: 365 entries, 0 to 364\nData columns (total 6 columns):\n #   Column         Non-Null Count  Dtype  \n---  ------         --------------  -----  \n 0   temperature_c  365 non-null    float64\n 1   ad_investment  365 non-null    float64\n 2   local_event    365 non-null    int64  \n 3   discount       365 non-null    int64  \n 4   weather        365 non-null    object \n 5   daily_sales    365 non-null    float64\ndtypes: float64(3), int64(2), object(1)\nmemory usage: 17.2+ KB\nNone\n       temperature_c  ad_investment  local_event    discount  daily_sales\ncount     365.000000     365.000000   365.000000  365.000000   365.000000\nmean       24.648767      82.490247     0.561644   11.684932   735.927151\nstd         5.687482      40.828333     0.496867    7.270059   204.863687\nmin        15.100000      10.060000     0.000000    0.000000   226.620000\n25%        19.800000      48.400000     0.000000   10.000000   576.890000\n50%        24.500000      84.780000     1.000000   15.000000   729.730000\n75%        29.600000     120.280000     1.000000   20.000000   879.280000\nmax        35.000000     149.780000     1.000000   20.000000  1337.220000\n","sh",[61,910,911,916,921,926,931,936,941,946,951,956,961,966,971,976,981,986,991,996,1001,1006,1011,1016,1021],{"__ignoreMap":79},[83,912,913],{"class":85,"line":86},[83,914,915],{},"\u003Cclass 'pandas.core.frame.DataFrame'>\n",[83,917,918],{"class":85,"line":103},[83,919,920],{},"RangeIndex: 365 entries, 0 to 364\n",[83,922,923],{"class":85,"line":116},[83,924,925],{},"Data columns (total 6 columns):\n",[83,927,928],{"class":85,"line":124},[83,929,930],{}," #   Column         Non-Null Count  Dtype  \n",[83,932,933],{"class":85,"line":144},[83,934,935],{},"---  ------         --------------  -----  \n",[83,937,938],{"class":85,"line":157},[83,939,940],{}," 0   temperature_c  365 non-null    float64\n",[83,942,943],{"class":85,"line":164},[83,944,945],{}," 1   ad_investment  365 non-null    float64\n",[83,947,948],{"class":85,"line":190},[83,949,950],{}," 2   local_event    365 non-null    int64  \n",[83,952,953],{"class":85,"line":205},[83,954,955],{}," 3   discount       365 non-null    int64  \n",[83,957,958],{"class":85,"line":210},[83,959,960],{}," 4   weather        365 non-null    object \n",[83,962,963],{"class":85,"line":222},[83,964,965],{}," 5   daily_sales    365 non-null    float64\n",[83,967,968],{"class":85,"line":266},[83,969,970],{},"dtypes: float64(3), int64(2), object(1)\n",[83,972,973],{"class":85,"line":277},[83,974,975],{},"memory usage: 17.2+ KB\n",[83,977,978],{"class":85,"line":282},[83,979,980],{},"None\n",[83,982,983],{"class":85,"line":306},[83,984,985],{},"       temperature_c  ad_investment  local_event    discount  daily_sales\n",[83,987,988],{"class":85,"line":344},[83,989,990],{},"count     365.000000     365.000000   365.000000  365.000000   365.000000\n",[83,992,993],{"class":85,"line":379},[83,994,995],{},"mean       24.648767      82.490247     0.561644   11.684932   735.927151\n",[83,997,998],{"class":85,"line":408},[83,999,1000],{},"std         5.687482      40.828333     0.496867    7.270059   204.863687\n",[83,1002,1003],{"class":85,"line":443},[83,1004,1005],{},"min        15.100000      10.060000     0.000000    0.000000   226.620000\n",[83,1007,1008],{"class":85,"line":464},[83,1009,1010],{},"25%        19.800000      48.400000     0.000000   10.000000   576.890000\n",[83,1012,1013],{"class":85,"line":469},[83,1014,1015],{},"50%        24.500000      84.780000     1.000000   15.000000   729.730000\n",[83,1017,1018],{"class":85,"line":480},[83,1019,1020],{},"75%        29.600000     120.280000     1.000000   20.000000   879.280000\n",[83,1022,1023],{"class":85,"line":490},[83,1024,1025],{},"max        35.000000     149.780000     1.000000   20.000000  1337.220000\n",[12,1027,1028],{},"Let's explore the results:",[1030,1031,1032,1036,1046,1049,1052],"ul",{},[1033,1034,1035],"li",{},"The average temperature is 24.65°C, with a range between 15.1°C and 35°C.",[1033,1037,1038,1039,1042,1043,133],{},"Advertising investment varies widely, averaging ",[61,1040,1041],{},"$82.49"," and reaching a maximum of ",[61,1044,1045],{},"$149.78",[1033,1047,1048],{},"56.16% of the days had a local event.",[1033,1050,1051],{},"The discount applied varies, averaging 11.68% and reaching a maximum of 20%.",[1033,1053,1054,1055,1058,1059,1062,1063,133],{},"Daily sales average ",[61,1056,1057],{},"$735.93",", with wide variability, ranging from a minimum of ",[61,1060,1061],{},"$226.62"," to a maximum of ",[61,1064,1065],{},"$1337.22",[12,1067,1068],{},"Furthermore, there are no null values ​​in the dataset, which is a good sign for further analysis. The wide variability in daily sales suggests that there are significant factors affecting sales, making exploratory data analysis even more crucial for understanding these relationships.",[53,1070,1072],{"id":1071},"step-3-strategic-visualization","Step 3: Strategic Visualization",[12,1074,1075],{},"The best way to understand our data is through visualization. We will build three key charts for our analysis:",[1077,1078,1079,1085,1091],"ol",{},[1033,1080,1081,1084],{},[40,1082,1083],{},"Sales Histogram:"," Tells us if our daily profits follow a normal curve (Gaussian Bell) or if they are skewed.",[1033,1086,1087,1090],{},[40,1088,1089],{},"Scatter Plot (Dispersión) Advertising vs. Sales:"," Reveals whether investing more money in Ads actually increases sales or if it reaches a plateau (decreasing returns).",[1033,1092,1093,1096],{},[40,1094,1095],{},"Correlation Matrix:"," Is the \"holy grail\" of EDA. It will assign a value from -1 to 1 to the relationship between all our variables.",[74,1098,1100],{"className":76,"code":1099,"language":78,"meta":79,"style":79},"# 1. Sales distribution (Do we sell more on \"good\" or \"bad\" days, statistically speaking?)\nplt.figure(figsize=(8,5))\nsns.histplot(df[\"daily_sales\"], bins=20, kde=True, color=\"brown\")\nplt.title(\"Distribution of Daily Coffee Sales\")\nplt.xlabel(\"Sales in $\")\nplt.ylabel(\"Frequency (Days)\")\nplt.show()\n\n# 2. The Impact of Ads\nplt.figure(figsize=(8,5))\nsns.scatterplot(x=\"ad_investment\", y=\"daily_sales\", hue=\"weather\", data=df)\nplt.title(\"Ad Investment vs. Sales\")\nplt.xlabel(\"Investment ($)\")\nplt.ylabel(\"Sales ($)\")\nplt.show()\n\n# 3. The heat map\nplt.figure(figsize=(8,6))\nsns.heatmap(df.corr(numeric_only=True), annot=True, cmap=\"YlOrBr\", fmt=\".2f\")\nplt.title(\"Variable Correlation\")\nplt.show()\n",[61,1101,1102,1107,1136,1196,1216,1236,1256,1267,1271,1276,1298,1357,1376,1395,1414,1424,1428,1433,1456,1522,1541],{"__ignoreMap":79},[83,1103,1104],{"class":85,"line":86},[83,1105,1106],{"class":858},"# 1. Sales distribution (Do we sell more on \"good\" or \"bad\" days, statistically speaking?)\n",[83,1108,1109,1112,1114,1117,1119,1122,1125,1128,1130,1133],{"class":85,"line":103},[83,1110,1111],{"class":93},"plt",[83,1113,133],{"class":132},[83,1115,1116],{"class":93},"figure",[83,1118,180],{"class":132},[83,1120,1121],{"class":811},"figsize",[83,1123,1124],{"class":132},"=(",[83,1126,1127],{"class":183},"8",[83,1129,243],{"class":132},[83,1131,1132],{"class":183},"5",[83,1134,1135],{"class":132},"))\n",[83,1137,1138,1141,1143,1146,1148,1150,1153,1155,1157,1159,1162,1165,1167,1170,1172,1175,1177,1180,1182,1185,1187,1189,1192,1194],{"class":85,"line":116},[83,1139,1140],{"class":93},"sns",[83,1142,133],{"class":132},[83,1144,1145],{"class":93},"histplot",[83,1147,180],{"class":132},[83,1149,825],{"class":93},[83,1151,1152],{"class":132},"[",[83,1154,234],{"class":233},[83,1156,781],{"class":237},[83,1158,234],{"class":233},[83,1160,1161],{"class":132},"],",[83,1163,1164],{"class":811}," bins",[83,1166,216],{"class":132},[83,1168,1169],{"class":183},"20",[83,1171,243],{"class":132},[83,1173,1174],{"class":811}," kde",[83,1176,216],{"class":132},[83,1178,1179],{"class":89},"True",[83,1181,243],{"class":132},[83,1183,1184],{"class":811}," color",[83,1186,216],{"class":132},[83,1188,234],{"class":233},[83,1190,1191],{"class":237},"brown",[83,1193,234],{"class":233},[83,1195,187],{"class":132},[83,1197,1198,1200,1202,1205,1207,1209,1212,1214],{"class":85,"line":124},[83,1199,1111],{"class":93},[83,1201,133],{"class":132},[83,1203,1204],{"class":93},"title",[83,1206,180],{"class":132},[83,1208,234],{"class":233},[83,1210,1211],{"class":237},"Distribution of Daily Coffee Sales",[83,1213,234],{"class":233},[83,1215,187],{"class":132},[83,1217,1218,1220,1222,1225,1227,1229,1232,1234],{"class":85,"line":144},[83,1219,1111],{"class":93},[83,1221,133],{"class":132},[83,1223,1224],{"class":93},"xlabel",[83,1226,180],{"class":132},[83,1228,234],{"class":233},[83,1230,1231],{"class":237},"Sales in $",[83,1233,234],{"class":233},[83,1235,187],{"class":132},[83,1237,1238,1240,1242,1245,1247,1249,1252,1254],{"class":85,"line":157},[83,1239,1111],{"class":93},[83,1241,133],{"class":132},[83,1243,1244],{"class":93},"ylabel",[83,1246,180],{"class":132},[83,1248,234],{"class":233},[83,1250,1251],{"class":237},"Frequency (Days)",[83,1253,234],{"class":233},[83,1255,187],{"class":132},[83,1257,1258,1260,1262,1265],{"class":85,"line":164},[83,1259,1111],{"class":93},[83,1261,133],{"class":132},[83,1263,1264],{"class":93},"show",[83,1266,833],{"class":132},[83,1268,1269],{"class":85,"line":190},[83,1270,161],{"emptyLinePlaceholder":160},[83,1272,1273],{"class":85,"line":205},[83,1274,1275],{"class":858},"# 2. The Impact of Ads\n",[83,1277,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296],{"class":85,"line":210},[83,1279,1111],{"class":93},[83,1281,133],{"class":132},[83,1283,1116],{"class":93},[83,1285,180],{"class":132},[83,1287,1121],{"class":811},[83,1289,1124],{"class":132},[83,1291,1127],{"class":183},[83,1293,243],{"class":132},[83,1295,1132],{"class":183},[83,1297,1135],{"class":132},[83,1299,1300,1302,1304,1307,1309,1312,1314,1316,1318,1320,1322,1325,1327,1329,1331,1333,1335,1338,1340,1342,1344,1346,1348,1351,1353,1355],{"class":85,"line":222},[83,1301,1140],{"class":93},[83,1303,133],{"class":132},[83,1305,1306],{"class":93},"scatterplot",[83,1308,180],{"class":132},[83,1310,1311],{"class":811},"x",[83,1313,216],{"class":132},[83,1315,234],{"class":233},[83,1317,745],{"class":237},[83,1319,234],{"class":233},[83,1321,243],{"class":132},[83,1323,1324],{"class":811}," y",[83,1326,216],{"class":132},[83,1328,234],{"class":233},[83,1330,781],{"class":237},[83,1332,234],{"class":233},[83,1334,243],{"class":132},[83,1336,1337],{"class":811}," hue",[83,1339,216],{"class":132},[83,1341,234],{"class":233},[83,1343,772],{"class":237},[83,1345,234],{"class":233},[83,1347,243],{"class":132},[83,1349,1350],{"class":811}," data",[83,1352,216],{"class":132},[83,1354,825],{"class":93},[83,1356,187],{"class":132},[83,1358,1359,1361,1363,1365,1367,1369,1372,1374],{"class":85,"line":266},[83,1360,1111],{"class":93},[83,1362,133],{"class":132},[83,1364,1204],{"class":93},[83,1366,180],{"class":132},[83,1368,234],{"class":233},[83,1370,1371],{"class":237},"Ad Investment vs. Sales",[83,1373,234],{"class":233},[83,1375,187],{"class":132},[83,1377,1378,1380,1382,1384,1386,1388,1391,1393],{"class":85,"line":277},[83,1379,1111],{"class":93},[83,1381,133],{"class":132},[83,1383,1224],{"class":93},[83,1385,180],{"class":132},[83,1387,234],{"class":233},[83,1389,1390],{"class":237},"Investment ($)",[83,1392,234],{"class":233},[83,1394,187],{"class":132},[83,1396,1397,1399,1401,1403,1405,1407,1410,1412],{"class":85,"line":282},[83,1398,1111],{"class":93},[83,1400,133],{"class":132},[83,1402,1244],{"class":93},[83,1404,180],{"class":132},[83,1406,234],{"class":233},[83,1408,1409],{"class":237},"Sales ($)",[83,1411,234],{"class":233},[83,1413,187],{"class":132},[83,1415,1416,1418,1420,1422],{"class":85,"line":306},[83,1417,1111],{"class":93},[83,1419,133],{"class":132},[83,1421,1264],{"class":93},[83,1423,833],{"class":132},[83,1425,1426],{"class":85,"line":344},[83,1427,161],{"emptyLinePlaceholder":160},[83,1429,1430],{"class":85,"line":379},[83,1431,1432],{"class":858},"# 3. The heat map\n",[83,1434,1435,1437,1439,1441,1443,1445,1447,1449,1451,1454],{"class":85,"line":408},[83,1436,1111],{"class":93},[83,1438,133],{"class":132},[83,1440,1116],{"class":93},[83,1442,180],{"class":132},[83,1444,1121],{"class":811},[83,1446,1124],{"class":132},[83,1448,1127],{"class":183},[83,1450,243],{"class":132},[83,1452,1453],{"class":183},"6",[83,1455,1135],{"class":132},[83,1457,1458,1460,1462,1465,1467,1469,1471,1474,1476,1479,1481,1483,1485,1488,1490,1492,1494,1497,1499,1501,1504,1506,1508,1511,1513,1515,1518,1520],{"class":85,"line":443},[83,1459,1140],{"class":93},[83,1461,133],{"class":132},[83,1463,1464],{"class":93},"heatmap",[83,1466,180],{"class":132},[83,1468,825],{"class":93},[83,1470,133],{"class":132},[83,1472,1473],{"class":93},"corr",[83,1475,180],{"class":132},[83,1477,1478],{"class":811},"numeric_only",[83,1480,216],{"class":132},[83,1482,1179],{"class":89},[83,1484,336],{"class":132},[83,1486,1487],{"class":811}," annot",[83,1489,216],{"class":132},[83,1491,1179],{"class":89},[83,1493,243],{"class":132},[83,1495,1496],{"class":811}," cmap",[83,1498,216],{"class":132},[83,1500,234],{"class":233},[83,1502,1503],{"class":237},"YlOrBr",[83,1505,234],{"class":233},[83,1507,243],{"class":132},[83,1509,1510],{"class":811}," fmt",[83,1512,216],{"class":132},[83,1514,234],{"class":233},[83,1516,1517],{"class":237},".2f",[83,1519,234],{"class":233},[83,1521,187],{"class":132},[83,1523,1524,1526,1528,1530,1532,1534,1537,1539],{"class":85,"line":464},[83,1525,1111],{"class":93},[83,1527,133],{"class":132},[83,1529,1204],{"class":93},[83,1531,180],{"class":132},[83,1533,234],{"class":233},[83,1535,1536],{"class":237},"Variable Correlation",[83,1538,234],{"class":233},[83,1540,187],{"class":132},[83,1542,1543,1545,1547,1549],{"class":85,"line":469},[83,1544,1111],{"class":93},[83,1546,133],{"class":132},[83,1548,1264],{"class":93},[83,1550,833],{"class":132},[12,1552,1553,1558],{},[1554,1555],"img",{"alt":1556,"src":1557},"Daily sales distribution","\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis\u002Fshared\u002Fsales_distribution.webp",[1559,1560,1561],"em",{},"Sales Histogram",[12,1563,1564,1565,1568],{},"Let's start with the histogram, which allows us to visualize how daily sales are distributed over time. In this case, we observe that sales follow an approximately normal distribution, with a mean close to ",[61,1566,1567],{},"$800",". This means that most days sales are concentrated around this average value, and that days with very low or very high sales are less frequent and are distributed relatively symmetrically on both sides.",[1030,1570,1571],{},[1033,1572,1573],{},"Why is it important to identify a normal distribution?",[12,1575,1576],{},"Because many statistical and machine learning models, such as linear regression, analysis of variance, or certain probabilistic models, perform better when the data (or at least the model errors) follow a normal distribution.",[12,1578,1579],{},"When this condition is met:",[1030,1581,1582,1585,1588],{},[1033,1583,1584],{},"Estimates tend to be more stable.",[1033,1586,1587],{},"Confidence intervals and statistical tests are more reliable.",[1033,1589,1590],{},"The model is not excessively affected by extreme values.",[12,1592,1593,1594,1597],{},"If the data ",[40,1595,1596],{},"does not"," follow a normal distribution, it may be necessary to apply mathematical transformations (such as logarithms, square roots, or Box-Cox transformations) to stabilize the variance and reduce skewness.",[1030,1599,1600],{},[1033,1601,1602],{},"What do \"right skew\" and \"left skew\" mean?",[1030,1604,1605,1611],{},[1033,1606,1607,1610],{},[40,1608,1609],{},"Right skew (positive skewness):"," There is a long tail toward high values. This indicates that there are few days with extremely high sales.",[1033,1612,1613,1616],{},[40,1614,1615],{},"Left skew (negative skewness):"," There is a long tail toward low values. This indicates that there are few days with unusually low sales.",[12,1618,1619],{},"Skewness is important because models sensitive to extreme values ​​can become distorted.",[12,1621,1622,1623,1626,1627,1630,1631,133],{},"Let's assume that most days sales are between ",[61,1624,1625],{},"$700"," and ",[61,1628,1629],{},"$900",", but on three special days (for example, promotions or holidays) sales reach ",[61,1632,1633],{},"$2,500",[12,1635,1636],{},"If we train a linear regression directly with this data:",[1030,1638,1639,1642,1645],{},[1033,1640,1641],{},"The model will attempt to fit a line that also accounts for these spikes.",[1033,1643,1644],{},"This can shift the slope or intercept.",[1033,1646,1647],{},"As a result, predictions for \"normal\" days (which are the majority) might be slightly inflated.",[12,1649,1650],{},"In contrast, if we apply a logarithmic transformation before training the model:",[1030,1652,1653,1656,1659],{},[1033,1654,1655],{},"The impact of extremely high values ​​is reduced.",[1033,1657,1658],{},"The distribution becomes more symmetrical.",[1033,1660,1661],{},"The model learns a pattern that is more representative of the overall behavior.",[12,1663,1664,1668],{},[1554,1665],{"alt":1666,"src":1667},"Advertising vs Sales","\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis\u002Fshared\u002Fads_vs_sales.webp",[1559,1669,1670],{},"Dispersion between Advertising Investment and Sales",[12,1672,1673],{},"The points are colored according to the weather: Blue-Sunny, Orange-Cloudy, Green-Rainy",[1030,1675,1676],{},[1033,1677,1678],{},[40,1679,1680],{},"Main Relationship: Investment vs. Sales",[12,1682,1683,1684,589],{},"The first thing to note is a ",[40,1685,1686],{},"positive trend",[12,1688,1689],{},"As advertising investment increases, sales tend to increase.",[12,1691,1692,1693,1696],{},"This indicates a ",[40,1694,1695],{},"positive correlation"," between the two variables. It doesn't appear to be a completely random relationship; the points show a general upward slope.",[12,1698,1699,1700,1702],{},"In machine learning terms, this suggests that advertising investment is ",[40,1701,19],{}," relevant predictor variable for estimating sales (though not the only one).",[1030,1704,1705],{},[1033,1706,1707],{},[40,1708,1709],{},"Sales Variability",[12,1711,1712],{},"Although the trend is positive, the points are quite dispersed vertically.",[12,1714,1715],{},"For example:",[12,1717,1718,1719,1722,1723,1626,1726,1729],{},"With an investment of ",[61,1720,1721],{},"$100",", sales can vary between approximately ",[61,1724,1725],{},"$400",[61,1727,1728],{},"$1,100"," depending on other factors.",[12,1731,1732],{},"This tells us something very important:",[1734,1735,1736],"blockquote",{},[12,1737,1738],{},"Investment does not explain 100% of sales performance.",[12,1740,1741],{},"There are other influencing variables (in this case, we know that weather is one of them).",[1030,1743,1744],{},[1033,1745,1746],{},[40,1747,1748],{},"Impact of Weather",[12,1750,1751],{},"This is where the graph becomes more interesting.",[12,1753,1754],{},"Looking at the colors:",[1030,1756,1757,1760,1763],{},[1033,1758,1759],{},"Green dots (rainy) tend to be located at higher sales values.",[1033,1761,1762],{},"Blue dots (sunny) tend to be concentrated at lower values ​​for the same level of investment.",[1033,1764,1765],{},"Orange dots (cloudy) are somewhere in between.",[12,1767,1768,1769,133],{},"This suggests that weather acts as a ",[40,1770,1771],{},"moderating variable",[12,1773,1715],{},[12,1775,1718,1776,589],{},[61,1777,1778],{},"$120",[1030,1780,1781,1787],{},[1033,1782,1783,1784],{},"Sunny day → sales around ",[61,1785,1786],{},"$500–900",[1033,1788,1789,1790],{},"Rainy day → sales around ",[61,1791,1792],{},"$700–1,200",[12,1794,1795],{},"In a simple regression model that only uses investment, these differences would generate large errors.",[1030,1797,1798],{},[1033,1799,1800],{},[40,1801,1802],{},"Implication for Modeling",[12,1804,1805],{},"If we train a model using only investment:",[83,1807,1810],{"className":1808},[1809],"katex-display",[83,1811,1814,1867],{"className":1812},[1813],"katex",[83,1815,1818],{"className":1816},[1817],"katex-mathml",[1819,1820,1823],"math",{"xmlns":1821,"display":1822},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML","block",[1824,1825,1826,1862],"semantics",{},[1827,1828,1829,1833,1836,1846,1849,1856,1859],"mrow",{},[1830,1831,1832],"mtext",{},"Sales",[1834,1835,216],"mo",{},[1837,1838,1839,1843],"msub",{},[1840,1841,1842],"mi",{},"β",[1844,1845,398],"mn",{},[1834,1847,1848],{},"+",[1837,1850,1851,1853],{},[1840,1852,1842],{},[1844,1854,1855],{},"1",[1834,1857,1858],{},"⋅",[1830,1860,1861],{},"Investment",[1863,1864,1866],"annotation",{"encoding":1865},"application\u002Fx-tex","\\text{Sales} = \\beta_0 + \\beta_1 \\cdot \\text{Investment}",[83,1868,1872,1901,1977,2032],{"className":1869,"ariaHidden":1871},[1870],"katex-html","true",[83,1873,1876,1881,1889,1894,1898],{"className":1874},[1875],"base",[83,1877],{"className":1878,"style":1880},[1879],"strut","height:0.6944em;",[83,1882,1886],{"className":1883},[1884,1885],"mord","text",[83,1887,1832],{"className":1888},[1884],[83,1890],{"className":1891,"style":1893},[1892],"mspace","margin-right:0.2778em;",[83,1895,216],{"className":1896},[1897],"mrel",[83,1899],{"className":1900,"style":1893},[1892],[83,1902,1904,1908,1966,1970,1974],{"className":1903},[1875],[83,1905],{"className":1906,"style":1907},[1879],"height:0.8889em;vertical-align:-0.1944em;",[83,1909,1911,1916],{"className":1910},[1884],[83,1912,1842],{"className":1913,"style":1915},[1884,1914],"mathnormal","margin-right:0.0528em;",[83,1917,1920],{"className":1918},[1919],"msupsub",[83,1921,1925,1957],{"className":1922},[1923,1924],"vlist-t","vlist-t2",[83,1926,1929,1952],{"className":1927},[1928],"vlist-r",[83,1930,1934],{"className":1931,"style":1933},[1932],"vlist","height:0.3011em;",[83,1935,1937,1942],{"style":1936},"top:-2.55em;margin-left:-0.0528em;margin-right:0.05em;",[83,1938],{"className":1939,"style":1941},[1940],"pstrut","height:2.7em;",[83,1943,1949],{"className":1944},[1945,1946,1947,1948],"sizing","reset-size6","size3","mtight",[83,1950,398],{"className":1951},[1884,1948],[83,1953,1956],{"className":1954},[1955],"vlist-s","​",[83,1958,1960],{"className":1959},[1928],[83,1961,1964],{"className":1962,"style":1963},[1932],"height:0.15em;",[83,1965],{},[83,1967],{"className":1968,"style":1969},[1892],"margin-right:0.2222em;",[83,1971,1848],{"className":1972},[1973],"mbin",[83,1975],{"className":1976,"style":1969},[1892],[83,1978,1980,1983,2023,2026,2029],{"className":1979},[1875],[83,1981],{"className":1982,"style":1907},[1879],[83,1984,1986,1989],{"className":1985},[1884],[83,1987,1842],{"className":1988,"style":1915},[1884,1914],[83,1990,1992],{"className":1991},[1919],[83,1993,1995,2015],{"className":1994},[1923,1924],[83,1996,1998,2012],{"className":1997},[1928],[83,1999,2001],{"className":2000,"style":1933},[1932],[83,2002,2003,2006],{"style":1936},[83,2004],{"className":2005,"style":1941},[1940],[83,2007,2009],{"className":2008},[1945,1946,1947,1948],[83,2010,1855],{"className":2011},[1884,1948],[83,2013,1956],{"className":2014},[1955],[83,2016,2018],{"className":2017},[1928],[83,2019,2021],{"className":2020,"style":1963},[1932],[83,2022],{},[83,2024],{"className":2025,"style":1969},[1892],[83,2027,1858],{"className":2028},[1973],[83,2030],{"className":2031,"style":1969},[1892],[83,2033,2035,2039],{"className":2034},[1875],[83,2036],{"className":2037,"style":2038},[1879],"height:0.6833em;",[83,2040,2042],{"className":2041},[1884,1885],[83,2043,1861],{"className":2044},[1884],[12,2046,2047],{},"The model will capture the general trend, but will have systematic errors depending on the weather.",[12,2049,2050],{},"In contrast, if we include the weather as a categorical variable (for example, using one-hot encoding):",[83,2052,2054],{"className":2053},[1809],[83,2055,2057,2105],{"className":2056},[1813],[83,2058,2060],{"className":2059},[1817],[1819,2061,2062],{"xmlns":1821,"display":1822},[1824,2063,2064,2102],{},[1827,2065,2066,2068,2070,2076,2078,2084,2086,2088,2090,2097,2099],{},[1830,2067,1832],{},[1834,2069,216],{},[1837,2071,2072,2074],{},[1840,2073,1842],{},[1844,2075,398],{},[1834,2077,1848],{},[1837,2079,2080,2082],{},[1840,2081,1842],{},[1844,2083,1855],{},[1834,2085,1858],{},[1830,2087,1861],{},[1834,2089,1848],{},[1837,2091,2092,2094],{},[1840,2093,1842],{},[1844,2095,2096],{},"2",[1834,2098,1858],{},[1830,2100,2101],{},"Weather",[1863,2103,2104],{"encoding":1865},"\\text{Sales} = \\beta_0 + \\beta_1 \\cdot \\text{Investment} + \\beta_2 \\cdot \\text{Weather}",[83,2106,2108,2129,2184,2239,2261,2316],{"className":2107,"ariaHidden":1871},[1870],[83,2109,2111,2114,2120,2123,2126],{"className":2110},[1875],[83,2112],{"className":2113,"style":1880},[1879],[83,2115,2117],{"className":2116},[1884,1885],[83,2118,1832],{"className":2119},[1884],[83,2121],{"className":2122,"style":1893},[1892],[83,2124,216],{"className":2125},[1897],[83,2127],{"className":2128,"style":1893},[1892],[83,2130,2132,2135,2175,2178,2181],{"className":2131},[1875],[83,2133],{"className":2134,"style":1907},[1879],[83,2136,2138,2141],{"className":2137},[1884],[83,2139,1842],{"className":2140,"style":1915},[1884,1914],[83,2142,2144],{"className":2143},[1919],[83,2145,2147,2167],{"className":2146},[1923,1924],[83,2148,2150,2164],{"className":2149},[1928],[83,2151,2153],{"className":2152,"style":1933},[1932],[83,2154,2155,2158],{"style":1936},[83,2156],{"className":2157,"style":1941},[1940],[83,2159,2161],{"className":2160},[1945,1946,1947,1948],[83,2162,398],{"className":2163},[1884,1948],[83,2165,1956],{"className":2166},[1955],[83,2168,2170],{"className":2169},[1928],[83,2171,2173],{"className":2172,"style":1963},[1932],[83,2174],{},[83,2176],{"className":2177,"style":1969},[1892],[83,2179,1848],{"className":2180},[1973],[83,2182],{"className":2183,"style":1969},[1892],[83,2185,2187,2190,2230,2233,2236],{"className":2186},[1875],[83,2188],{"className":2189,"style":1907},[1879],[83,2191,2193,2196],{"className":2192},[1884],[83,2194,1842],{"className":2195,"style":1915},[1884,1914],[83,2197,2199],{"className":2198},[1919],[83,2200,2202,2222],{"className":2201},[1923,1924],[83,2203,2205,2219],{"className":2204},[1928],[83,2206,2208],{"className":2207,"style":1933},[1932],[83,2209,2210,2213],{"style":1936},[83,2211],{"className":2212,"style":1941},[1940],[83,2214,2216],{"className":2215},[1945,1946,1947,1948],[83,2217,1855],{"className":2218},[1884,1948],[83,2220,1956],{"className":2221},[1955],[83,2223,2225],{"className":2224},[1928],[83,2226,2228],{"className":2227,"style":1963},[1932],[83,2229],{},[83,2231],{"className":2232,"style":1969},[1892],[83,2234,1858],{"className":2235},[1973],[83,2237],{"className":2238,"style":1969},[1892],[83,2240,2242,2246,2252,2255,2258],{"className":2241},[1875],[83,2243],{"className":2244,"style":2245},[1879],"height:0.7667em;vertical-align:-0.0833em;",[83,2247,2249],{"className":2248},[1884,1885],[83,2250,1861],{"className":2251},[1884],[83,2253],{"className":2254,"style":1969},[1892],[83,2256,1848],{"className":2257},[1973],[83,2259],{"className":2260,"style":1969},[1892],[83,2262,2264,2267,2307,2310,2313],{"className":2263},[1875],[83,2265],{"className":2266,"style":1907},[1879],[83,2268,2270,2273],{"className":2269},[1884],[83,2271,1842],{"className":2272,"style":1915},[1884,1914],[83,2274,2276],{"className":2275},[1919],[83,2277,2279,2299],{"className":2278},[1923,1924],[83,2280,2282,2296],{"className":2281},[1928],[83,2283,2285],{"className":2284,"style":1933},[1932],[83,2286,2287,2290],{"style":1936},[83,2288],{"className":2289,"style":1941},[1940],[83,2291,2293],{"className":2292},[1945,1946,1947,1948],[83,2294,2096],{"className":2295},[1884,1948],[83,2297,1956],{"className":2298},[1955],[83,2300,2302],{"className":2301},[1928],[83,2303,2305],{"className":2304,"style":1963},[1932],[83,2306],{},[83,2308],{"className":2309,"style":1969},[1892],[83,2311,1858],{"className":2312},[1973],[83,2314],{"className":2315,"style":1969},[1892],[83,2317,2319,2322],{"className":2318},[1875],[83,2320],{"className":2321,"style":1880},[1879],[83,2323,2325],{"className":2324},[1884,1885],[83,2326,2101],{"className":2327},[1884],[12,2329,2330],{},"The model will be able to:",[1030,2332,2333,2336,2339],{},[1033,2334,2335],{},"Adjust different intercepts by weather (for example, an extra term for rainy days).",[1033,2337,2338],{},"Improve precision (since it allows us to capture that additional variability).",[1033,2340,2341],{},"Reduce error variance (because the variance, that is, the spread of the points around the regression line, is reduced when explaining more factors).",[12,2343,2344,2348],{},[1554,2345],{"alt":2346,"src":2347},"Cafeteria Correlation Matrix","\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis\u002Fshared\u002Fcafeteria_correlation_matrix.webp",[1559,2349,2350],{},"Correlation Heatmap",[12,2352,2353],{},"Let's break down the correlation matrix, interpreting each value, but first, let's remember what each number means:",[1030,2355,2356,2362,2368],{},[1033,2357,2358,2361],{},[40,2359,2360],{},"1.00",": perfect positive correlation",[1033,2363,2364,2367],{},[40,2365,2366],{},"0.00",": no linear relationship",[1033,2369,2370,2373],{},[40,2371,2372],{},"-1.00",": perfect negative correlation",[12,2375,2376,2377,2380],{},"The matrix is ​​",[40,2378,2379],{},"symmetric",", that is:",[74,2382,2386],{"className":2383,"code":2385,"language":1885},[2384],"language-text","Corr(A, B) = Corr(B, A)\n",[61,2387,2385],{"__ignoreMap":79},[12,2389,2390],{},"That's why you'll see the same values ​​reflected above and below the diagonal.",[12,2392,2393,2394,2396],{},"The main diagonal is always ",[40,2395,2360],{},", because each variable is perfectly correlated with itself.",[12,2398,2399],{},"The variables included are:",[1030,2401,2402,2406,2410,2414,2418],{},[1033,2403,2404],{},[61,2405,736],{},[1033,2407,2408],{},[61,2409,745],{},[1033,2411,2412],{},[61,2413,754],{},[1033,2415,2416],{},[61,2417,763],{},[1033,2419,2420],{},[61,2421,781],{},[1077,2423,2424],{},[1033,2425,2426,2428],{},[61,2427,736],{},": Temperature in degrees Celsius.",[1030,2430,2431,2437,2444,2451,2458],{},[1033,2432,2433,2434,2436],{},"temperature_c - temperature_c = ",[40,2435,2360],{},"\nPerfect correlation with itself.",[1033,2438,2439,2440,2443],{},"temperature_c - ad_investment = ",[40,2441,2442],{},"-0.03","\nPractically no relationship.\nTemperature does not influence how much is invested in advertising.",[1033,2445,2446,2447,2450],{},"temperature_c - local_event = ",[40,2448,2449],{},"0.05","\nVery weak positive correlation.\nLocal events do not really depend on the weather in this dataset.",[1033,2452,2453,2454,2457],{},"temperature_c - discount = ",[40,2455,2456],{},"0.04","\nNo relevant relationship.\nDiscounts do not appear to be affected by temperature.",[1033,2459,2460,2461,2464,2465,2468,2469,2477,2479],{},"temperature_c - daily_sales = ",[40,2462,2463],{},"-0.24","\nWeak to moderate negative correlation.\nWhen the temperature rises, sales tend to decrease slightly.",[2466,2467],"br",{},"This may indicate:",[1030,2470,2471,2474],{},[1033,2472,2473],{},"The business sells products that are consumed more in cooler weather.",[1033,2475,2476],{},"There is less foot traffic on very hot days.",[2466,2478],{},"It is not a strong relationship, but it is consistent.",[1077,2481,2482],{"start":103},[1033,2483,2484,2486],{},[61,2485,745],{},": Investment in advertising.",[1030,2488,2489,2494,2501,2507],{},[1033,2490,2491,2492],{},"ad_investment - ad_investment = ",[40,2493,2360],{},[1033,2495,2496,2497,2500],{},"ad_investment - local_event = ",[40,2498,2499],{},"-0.05","\nPractically independent.\nAdvertising investment does not depend directly on whether there is an event.",[1033,2502,2503,2504,2506],{},"ad_investment - discount = ",[40,2505,2442],{},"\nNo relationship.\nInvestment and discounts appear to be separate decisions.",[1033,2508,2509,2510,2513,2514,2516,2517,2528,2530],{},"ad_investment - daily_sales = ",[40,2511,2512],{},"0.47","\nModerate positive correlation.",[2466,2515],{},"This means:",[1030,2518,2519,2522,2525],{},[1033,2520,2521],{},"Higher investment leads to higher sales.",[1033,2523,2524],{},"The relationship is significant, but not perfect.",[1033,2526,2527],{},"Other factors are also influencing it.",[2466,2529],{},"Statistically, it is an important predictor.",[1077,2532,2533],{"start":116},[1033,2534,2535,2537],{},[61,2536,754],{},": Local event.",[1030,2539,2540,2545,2552],{},[1033,2541,2542,2543],{},"local_event - local_event = ",[40,2544,2360],{},[1033,2546,2547,2548,2551],{},"local_event - discount = ",[40,2549,2550],{},"-0.06","\nAlmost no correlation.\nIt doesn't seem that events necessarily imply discounts.",[1033,2553,2554,2555,2558,2559,2561,2562,2573,2575],{},"local_event - daily_sales = ",[40,2556,2557],{},"0.57","\nThis is the highest correlation with sales.",[2466,2560],{},"Interpretation:",[1030,2563,2564,2567,2570],{},[1033,2565,2566],{},"When there is a local event, sales increase significantly.",[1033,2568,2569],{},"It is the most influential factor in the dataset.",[1033,2571,2572],{},"It represents a key variable for the model.",[2466,2574],{},"In practical terms:\nEvents generate additional traffic or demand.",[1077,2577,2578],{"start":124},[1033,2579,2580,2582],{},[61,2581,763],{},": Discount.",[1030,2584,2585,2588],{},[1033,2586,2587],{},"discount - discount = 1.00",[1033,2589,2590,2591,2516,2593,2601,2603,2604],{},"discount - daily_sales = 0.13\nWeak positive correlation.",[2466,2592],{},[1030,2594,2595,2598],{},[1033,2596,2597],{},"Discounts have a small impact.",[1033,2599,2600],{},"They don't appear to be the main driver of sales.",[2466,2602],{},"Possible explanations:",[1030,2605,2606,2609,2612],{},[1033,2607,2608],{},"Low discounts",[1033,2610,2611],{},"Poor strategy",[1033,2613,2614],{},"Or an effect conditioned by other variables",[1077,2616,2617],{"start":144},[1033,2618,2619,2621],{},[61,2620,781],{},": Daily sales.",[12,2623,2624],{},"We have already interpreted all their correlations with the other variables:",[2626,2627,2628,2641],"table",{},[2629,2630,2631],"thead",{},[2632,2633,2634,2638],"tr",{},[2635,2636,2637],"th",{},"Variable",[2635,2639,2640],{},"Correlation",[2642,2643,2644,2651,2657,2663],"tbody",{},[2632,2645,2646,2649],{},[2647,2648,736],"td",{},[2647,2650,2463],{},[2632,2652,2653,2655],{},[2647,2654,745],{},[2647,2656,2512],{},[2632,2658,2659,2661],{},[2647,2660,754],{},[2647,2662,2557],{},[2632,2664,2665,2667],{},[2647,2666,763],{},[2647,2668,2669],{},"0.13",[12,2671,2672],{},"Ordered by linear impact:",[1077,2674,2675,2678,2681,2684],{},[1033,2676,2677],{},"local_event (0.57)",[1033,2679,2680],{},"ad_investment (0.47)",[1033,2682,2683],{},"temperature_c (-0.24)",[1033,2685,2686],{},"discount (0.13)",[12,2688,2689],{},[40,2690,2691],{},"What does this tell us in terms of modeling?",[12,2693,2694],{},"First, the most predictive variables for estimating sales are:",[1030,2696,2697,2699],{},[1033,2698,754],{},[1033,2700,745],{},[12,2702,2703],{},"Both should be included in the model.",[12,2705,2706],{},"Then we have multicollinearity.",[12,2708,2709],{},"We observe that:",[1030,2711,2712,2715],{},[1033,2713,2714],{},"No independent variable has a high correlation with another.",[1033,2716,2717],{},"All values ​​between predictors are close to 0.",[12,2719,2720],{},"This is excellent because it means there is no strong redundancy and that each variable provides distinct information.",[12,2722,2723],{},"If we had values ​​close to 1 or -1 between predictors (for example, ad_investment and local_event), we would have to consider removing or combining variables to avoid multicollinearity problems.",[12,2725,2726],{},"So, with all this, we can conclude:",[1030,2728,2729,2732,2735,2738,2741,2744],{},[1033,2730,2731],{},"Local events are the main sales driver.",[1033,2733,2734],{},"Advertising investment has a clear and consistent impact.",[1033,2736,2737],{},"Temperature has a slightly negative effect.",[1033,2739,2740],{},"Discounts have a low impact.",[1033,2742,2743],{},"There is no problematic multicollinearity.",[1033,2745,2746],{},"The dataset is suitable for a multiple regression model.",[1734,2748,2749,2752],{},[12,2750,2751],{},"With this information, a coffee shop manager could make strategic decisions such as:",[1030,2753,2754,2757,2760,2763],{},[1033,2755,2756],{},"Prioritize campaigns during local events.",[1033,2758,2759],{},"Maintain consistent advertising investment.",[1033,2761,2762],{},"Re-evaluate discount strategy.",[1033,2764,2765],{},"Consider specific strategies for hot days.",[53,2767,2769],{"id":2768},"step-4-from-data-to-prediction-modeling","Step 4: From Data to Prediction (Modeling)",[12,2771,2772,2773,2776],{},"With the completed EDA, we transform the weather data into a binary format and feed it into a ",[40,2774,2775],{},"Simple Linear Regression"," model.",[74,2778,2780],{"className":76,"code":2779,"language":78,"meta":79,"style":79},"from sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score\n\n# One-Hot Encoding: Converts \"Sunny\" or \"Rainy\" into columns of 0s and 1s\ndf_encoded = pd.get_dummies(df, columns=[\"weather\"])\nX = df_encoded.drop(\"daily_sales\", axis=1)\ny = df_encoded[\"daily_sales\"]\n\n# Train-test split: 80% for training, 20% for testing\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\ncoffee_shop_model = LinearRegression()\ncoffee_shop_model.fit(X_train, y_train)\n\n# Make predictions on the test set\npredictions = coffee_shop_model.predict(X_test)\n",[61,2781,2782,2800,2816,2842,2846,2851,2884,2918,2937,2941,2946,3001,3005,3017,3037,3041,3046],{"__ignoreMap":79},[83,2783,2784,2787,2790,2792,2795,2797],{"class":85,"line":86},[83,2785,2786],{"class":89},"from",[83,2788,2789],{"class":93}," sklearn",[83,2791,133],{"class":132},[83,2793,2794],{"class":93},"model_selection ",[83,2796,90],{"class":89},[83,2798,2799],{"class":93}," train_test_split\n",[83,2801,2802,2804,2806,2808,2811,2813],{"class":85,"line":103},[83,2803,2786],{"class":89},[83,2805,2789],{"class":93},[83,2807,133],{"class":132},[83,2809,2810],{"class":93},"linear_model ",[83,2812,90],{"class":89},[83,2814,2815],{"class":93}," LinearRegression\n",[83,2817,2818,2820,2822,2824,2827,2829,2832,2834,2837,2839],{"class":85,"line":116},[83,2819,2786],{"class":89},[83,2821,2789],{"class":93},[83,2823,133],{"class":132},[83,2825,2826],{"class":93},"metrics ",[83,2828,90],{"class":89},[83,2830,2831],{"class":93}," mean_absolute_error",[83,2833,243],{"class":132},[83,2835,2836],{"class":93}," mean_squared_error",[83,2838,243],{"class":132},[83,2840,2841],{"class":93}," r2_score\n",[83,2843,2844],{"class":85,"line":124},[83,2845,161],{"emptyLinePlaceholder":160},[83,2847,2848],{"class":85,"line":144},[83,2849,2850],{"class":858},"# One-Hot Encoding: Converts \"Sunny\" or \"Rainy\" into columns of 0s and 1s\n",[83,2852,2853,2856,2858,2860,2862,2865,2867,2869,2871,2873,2876,2878,2880,2882],{"class":85,"line":157},[83,2854,2855],{"class":93},"df_encoded ",[83,2857,216],{"class":132},[83,2859,796],{"class":93},[83,2861,133],{"class":132},[83,2863,2864],{"class":93},"get_dummies",[83,2866,180],{"class":132},[83,2868,825],{"class":93},[83,2870,243],{"class":132},[83,2872,812],{"class":811},[83,2874,2875],{"class":132},"=[",[83,2877,234],{"class":233},[83,2879,772],{"class":237},[83,2881,234],{"class":233},[83,2883,405],{"class":132},[83,2885,2886,2889,2891,2894,2896,2899,2901,2903,2905,2907,2909,2912,2914,2916],{"class":85,"line":164},[83,2887,2888],{"class":93},"X ",[83,2890,216],{"class":132},[83,2892,2893],{"class":93}," df_encoded",[83,2895,133],{"class":132},[83,2897,2898],{"class":93},"drop",[83,2900,180],{"class":132},[83,2902,234],{"class":233},[83,2904,781],{"class":237},[83,2906,234],{"class":233},[83,2908,243],{"class":132},[83,2910,2911],{"class":811}," axis",[83,2913,216],{"class":132},[83,2915,1855],{"class":183},[83,2917,187],{"class":132},[83,2919,2920,2923,2925,2927,2929,2931,2933,2935],{"class":85,"line":190},[83,2921,2922],{"class":93},"y ",[83,2924,216],{"class":132},[83,2926,2893],{"class":93},[83,2928,1152],{"class":132},[83,2930,234],{"class":233},[83,2932,781],{"class":237},[83,2934,234],{"class":233},[83,2936,263],{"class":132},[83,2938,2939],{"class":85,"line":205},[83,2940,161],{"emptyLinePlaceholder":160},[83,2942,2943],{"class":85,"line":210},[83,2944,2945],{"class":858},"# Train-test split: 80% for training, 20% for testing\n",[83,2947,2948,2951,2953,2956,2958,2961,2963,2966,2968,2971,2973,2976,2978,2980,2982,2985,2987,2990,2992,2995,2997,2999],{"class":85,"line":222},[83,2949,2950],{"class":93},"X_train",[83,2952,243],{"class":132},[83,2954,2955],{"class":93}," X_test",[83,2957,243],{"class":132},[83,2959,2960],{"class":93}," y_train",[83,2962,243],{"class":132},[83,2964,2965],{"class":93}," y_test ",[83,2967,216],{"class":132},[83,2969,2970],{"class":93}," train_test_split",[83,2972,180],{"class":132},[83,2974,2975],{"class":93},"X",[83,2977,243],{"class":132},[83,2979,1324],{"class":93},[83,2981,243],{"class":132},[83,2983,2984],{"class":811}," test_size",[83,2986,216],{"class":132},[83,2988,2989],{"class":183},"0.2",[83,2991,243],{"class":132},[83,2993,2994],{"class":811}," random_state",[83,2996,216],{"class":132},[83,2998,184],{"class":183},[83,3000,187],{"class":132},[83,3002,3003],{"class":85,"line":266},[83,3004,161],{"emptyLinePlaceholder":160},[83,3006,3007,3010,3012,3015],{"class":85,"line":277},[83,3008,3009],{"class":93},"coffee_shop_model ",[83,3011,216],{"class":132},[83,3013,3014],{"class":93}," LinearRegression",[83,3016,833],{"class":132},[83,3018,3019,3022,3024,3027,3029,3031,3033,3035],{"class":85,"line":282},[83,3020,3021],{"class":93},"coffee_shop_model",[83,3023,133],{"class":132},[83,3025,3026],{"class":93},"fit",[83,3028,180],{"class":132},[83,3030,2950],{"class":93},[83,3032,243],{"class":132},[83,3034,2960],{"class":93},[83,3036,187],{"class":132},[83,3038,3039],{"class":85,"line":306},[83,3040,161],{"emptyLinePlaceholder":160},[83,3042,3043],{"class":85,"line":344},[83,3044,3045],{"class":858},"# Make predictions on the test set\n",[83,3047,3048,3051,3053,3056,3058,3061,3063,3066],{"class":85,"line":379},[83,3049,3050],{"class":93},"predictions ",[83,3052,216],{"class":132},[83,3054,3055],{"class":93}," coffee_shop_model",[83,3057,133],{"class":132},[83,3059,3060],{"class":93},"predict",[83,3062,180],{"class":132},[83,3064,3065],{"class":93},"X_test",[83,3067,187],{"class":132},[53,3069,3071],{"id":3070},"step-5-evaluating-the-model","Step 5: Evaluating the Model",[12,3073,3074],{},"Now let's assess how \"accurate\" our algorithm is by comparing sales against its predictions.",[74,3076,3078],{"className":76,"code":3077,"language":78,"meta":79,"style":79},"mae = mean_absolute_error(y_test, predictions)\nrmse = np.sqrt(mean_squared_error(y_test, predictions))\nr2 = r2_score(y_test, predictions)\n\nprint(f\"MAE: ${mae:.2f}\")\nprint(f\"RMSE: ${rmse:.2f}\")\nprint(f\"R^2: {r2:.2f}\")\n",[61,3079,3080,3101,3130,3150,3154,3183,3207],{"__ignoreMap":79},[83,3081,3082,3085,3087,3089,3091,3094,3096,3099],{"class":85,"line":86},[83,3083,3084],{"class":93},"mae ",[83,3086,216],{"class":132},[83,3088,2831],{"class":93},[83,3090,180],{"class":132},[83,3092,3093],{"class":93},"y_test",[83,3095,243],{"class":132},[83,3097,3098],{"class":93}," predictions",[83,3100,187],{"class":132},[83,3102,3103,3106,3108,3110,3112,3115,3117,3120,3122,3124,3126,3128],{"class":85,"line":103},[83,3104,3105],{"class":93},"rmse ",[83,3107,216],{"class":132},[83,3109,639],{"class":93},[83,3111,133],{"class":132},[83,3113,3114],{"class":93},"sqrt",[83,3116,180],{"class":132},[83,3118,3119],{"class":93},"mean_squared_error",[83,3121,180],{"class":132},[83,3123,3093],{"class":93},[83,3125,243],{"class":132},[83,3127,3098],{"class":93},[83,3129,1135],{"class":132},[83,3131,3132,3135,3137,3140,3142,3144,3146,3148],{"class":85,"line":116},[83,3133,3134],{"class":93},"r2 ",[83,3136,216],{"class":132},[83,3138,3139],{"class":93}," r2_score",[83,3141,180],{"class":132},[83,3143,3093],{"class":93},[83,3145,243],{"class":132},[83,3147,3098],{"class":93},[83,3149,187],{"class":132},[83,3151,3152],{"class":85,"line":124},[83,3153,161],{"emptyLinePlaceholder":160},[83,3155,3156,3158,3160,3163,3166,3170,3173,3176,3179,3181],{"class":85,"line":144},[83,3157,864],{"class":294},[83,3159,180],{"class":132},[83,3161,3162],{"class":486},"f",[83,3164,3165],{"class":237},"\"MAE: $",[83,3167,3169],{"class":3168},"sfsYZ","{",[83,3171,3172],{"class":93},"mae",[83,3174,3175],{"class":486},":.2f",[83,3177,3178],{"class":3168},"}",[83,3180,234],{"class":237},[83,3182,187],{"class":132},[83,3184,3185,3187,3189,3191,3194,3196,3199,3201,3203,3205],{"class":85,"line":157},[83,3186,864],{"class":294},[83,3188,180],{"class":132},[83,3190,3162],{"class":486},[83,3192,3193],{"class":237},"\"RMSE: $",[83,3195,3169],{"class":3168},[83,3197,3198],{"class":93},"rmse",[83,3200,3175],{"class":486},[83,3202,3178],{"class":3168},[83,3204,234],{"class":237},[83,3206,187],{"class":132},[83,3208,3209,3211,3213,3215,3218,3220,3223,3225,3227,3229],{"class":85,"line":164},[83,3210,864],{"class":294},[83,3212,180],{"class":132},[83,3214,3162],{"class":486},[83,3216,3217],{"class":237},"\"R^2: ",[83,3219,3169],{"class":3168},[83,3221,3222],{"class":93},"r2",[83,3224,3175],{"class":486},[83,3226,3178],{"class":3168},[83,3228,234],{"class":237},[83,3230,187],{"class":132},[12,3232,3233],{},"Resulting in:",[12,3235,3236,3237],{},"MAE: ",[61,3238,3239],{},"$55.39",[12,3241,3242,3243],{},"RMSE: ",[61,3244,3245],{},"$74.51",[12,3247,3248,3312],{},[83,3249,3251,3271],{"className":3250},[1813],[83,3252,3254],{"className":3253},[1817],[1819,3255,3256],{"xmlns":1821},[1824,3257,3258,3268],{},[1827,3259,3260],{},[3261,3262,3263,3266],"msup",{},[1840,3264,3265],{},"R",[1844,3267,2096],{},[1863,3269,3270],{"encoding":1865},"R^2",[83,3272,3274],{"className":3273,"ariaHidden":1871},[1870],[83,3275,3277,3281],{"className":3276},[1875],[83,3278],{"className":3279,"style":3280},[1879],"height:0.8141em;",[83,3282,3284,3288],{"className":3283},[1884],[83,3285,3265],{"className":3286,"style":3287},[1884,1914],"margin-right:0.0077em;",[83,3289,3291],{"className":3290},[1919],[83,3292,3294],{"className":3293},[1923],[83,3295,3297],{"className":3296},[1928],[83,3298,3300],{"className":3299,"style":3280},[1932],[83,3301,3303,3306],{"style":3302},"top:-3.063em;margin-right:0.05em;",[83,3304],{"className":3305,"style":1941},[1940],[83,3307,3309],{"className":3308},[1945,1946,1947,1948],[83,3310,2096],{"className":3311},[1884,1948],": 0.88",[12,3314,3315],{},"What do these numbers mean?",[1030,3317,3318,3327,3336],{},[1033,3319,3320,3323,3324,3326],{},[40,3321,3322],{},"MAE (Mean Absolute Error)",": On average, our predictions deviate from actual sales by approximately ",[61,3325,3239],{},". This gives us an idea of ​​the magnitude of the error in monetary terms.",[1033,3328,3329,3332,3333,3335],{},[40,3330,3331],{},"RMSE (Mean Squared Error)",": By penalizing larger errors more, the RMSE of ",[61,3334,3245],{}," indicates that, although most predictions are close, there are some cases where the model is significantly off.",[1033,3337,3338,3341],{},[40,3339,3340],{},"R² (Determination Score)",": An R² of 0.88 means that the model explains 88% of the variability in daily sales. This is a pretty good result, indicating that the model captures most of the patterns present in the data.",[12,3343,3344],{},[40,3345,3346],{},"Predictions vs. Actual Chart",[74,3348,3350],{"className":76,"code":3349,"language":78,"meta":79,"style":79},"plt.figure(figsize=(8,5))\nsns.scatterplot(x=y_test, y=predictions)\nplt.plot([y.min(), y.max()], [y.min(), y.max()], 'r--')  # Perfect reference line\nplt.title(\"Predictions vs Actual Sales\")\nplt.xlabel(\"Actual Sales ($)\")\nplt.ylabel(\"Model Predictions ($)\")\nplt.show()\n",[61,3351,3352,3374,3401,3465,3484,3503,3522],{"__ignoreMap":79},[83,3353,3354,3356,3358,3360,3362,3364,3366,3368,3370,3372],{"class":85,"line":86},[83,3355,1111],{"class":93},[83,3357,133],{"class":132},[83,3359,1116],{"class":93},[83,3361,180],{"class":132},[83,3363,1121],{"class":811},[83,3365,1124],{"class":132},[83,3367,1127],{"class":183},[83,3369,243],{"class":132},[83,3371,1132],{"class":183},[83,3373,1135],{"class":132},[83,3375,3376,3378,3380,3382,3384,3386,3388,3390,3392,3394,3396,3399],{"class":85,"line":103},[83,3377,1140],{"class":93},[83,3379,133],{"class":132},[83,3381,1306],{"class":93},[83,3383,180],{"class":132},[83,3385,1311],{"class":811},[83,3387,216],{"class":132},[83,3389,3093],{"class":93},[83,3391,243],{"class":132},[83,3393,1324],{"class":811},[83,3395,216],{"class":132},[83,3397,3398],{"class":93},"predictions",[83,3400,187],{"class":132},[83,3402,3403,3405,3407,3410,3412,3415,3417,3420,3423,3425,3427,3430,3433,3435,3437,3439,3441,3443,3445,3447,3449,3451,3454,3457,3460,3462],{"class":85,"line":116},[83,3404,1111],{"class":93},[83,3406,133],{"class":132},[83,3408,3409],{"class":93},"plot",[83,3411,395],{"class":132},[83,3413,3414],{"class":93},"y",[83,3416,133],{"class":132},[83,3418,3419],{"class":93},"min",[83,3421,3422],{"class":132},"(),",[83,3424,1324],{"class":93},[83,3426,133],{"class":132},[83,3428,3429],{"class":93},"max",[83,3431,3432],{"class":132},"()],",[83,3434,230],{"class":132},[83,3436,3414],{"class":93},[83,3438,133],{"class":132},[83,3440,3419],{"class":93},[83,3442,3422],{"class":132},[83,3444,1324],{"class":93},[83,3446,133],{"class":132},[83,3448,3429],{"class":93},[83,3450,3432],{"class":132},[83,3452,3453],{"class":233}," '",[83,3455,3456],{"class":237},"r--",[83,3458,3459],{"class":233},"'",[83,3461,505],{"class":132},[83,3463,3464],{"class":858},"  # Perfect reference line\n",[83,3466,3467,3469,3471,3473,3475,3477,3480,3482],{"class":85,"line":124},[83,3468,1111],{"class":93},[83,3470,133],{"class":132},[83,3472,1204],{"class":93},[83,3474,180],{"class":132},[83,3476,234],{"class":233},[83,3478,3479],{"class":237},"Predictions vs Actual Sales",[83,3481,234],{"class":233},[83,3483,187],{"class":132},[83,3485,3486,3488,3490,3492,3494,3496,3499,3501],{"class":85,"line":144},[83,3487,1111],{"class":93},[83,3489,133],{"class":132},[83,3491,1224],{"class":93},[83,3493,180],{"class":132},[83,3495,234],{"class":233},[83,3497,3498],{"class":237},"Actual Sales ($)",[83,3500,234],{"class":233},[83,3502,187],{"class":132},[83,3504,3505,3507,3509,3511,3513,3515,3518,3520],{"class":85,"line":157},[83,3506,1111],{"class":93},[83,3508,133],{"class":132},[83,3510,1244],{"class":93},[83,3512,180],{"class":132},[83,3514,234],{"class":233},[83,3516,3517],{"class":237},"Model Predictions ($)",[83,3519,234],{"class":233},[83,3521,187],{"class":132},[83,3523,3524,3526,3528,3530],{"class":85,"line":164},[83,3525,1111],{"class":93},[83,3527,133],{"class":132},[83,3529,1264],{"class":93},[83,3531,833],{"class":132},[12,3533,3534,3538],{},[1554,3535],{"alt":3536,"src":3537},"Predictions vs Actual","\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis\u002Fshared\u002Fpredictions_vs_actual_sales.webp",[1559,3539,3540],{},"Predictions vs. Actual Sales",[12,3542,3543],{},"As we can see, we have a reference line (in red) that represents perfection: if all predictions were exactly on that line, the model would be perfect, but reality will never be that ideal. However, most points are grouped around that line, indicating that the model has a good overall performance. Some points are further away, reflecting cases where the model does not predict as well, possibly due to factors not captured in the dataset or inherent variability in daily sales.",[12,3545,3546],{},"We can also obtain the coefficients of the model to understand the importance of each variable:",[74,3548,3550],{"className":76,"code":3549,"language":78,"meta":79,"style":79},"coefficients = pd.DataFrame({\n    'Feature': X.columns,\n    'Coefficient': coffee_shop_model.coef_\n})\ndisplay(coefficients.sort_values(by='Coefficient', ascending=False))\n",[61,3551,3552,3568,3590,3608,3613],{"__ignoreMap":79},[83,3553,3554,3557,3559,3561,3563,3565],{"class":85,"line":86},[83,3555,3556],{"class":93},"coefficients ",[83,3558,216],{"class":132},[83,3560,796],{"class":93},[83,3562,133],{"class":132},[83,3564,801],{"class":93},[83,3566,3567],{"class":132},"({\n",[83,3569,3570,3573,3576,3578,3580,3583,3585,3587],{"class":85,"line":103},[83,3571,3572],{"class":233},"    '",[83,3574,3575],{"class":237},"Feature",[83,3577,3459],{"class":233},[83,3579,589],{"class":132},[83,3581,3582],{"class":93}," X",[83,3584,133],{"class":132},[83,3586,817],{"class":93},[83,3588,3589],{"class":132},",\n",[83,3591,3592,3594,3597,3599,3601,3603,3605],{"class":85,"line":116},[83,3593,3572],{"class":233},[83,3595,3596],{"class":237},"Coefficient",[83,3598,3459],{"class":233},[83,3600,589],{"class":132},[83,3602,3055],{"class":93},[83,3604,133],{"class":132},[83,3606,3607],{"class":93},"coef_\n",[83,3609,3610],{"class":85,"line":124},[83,3611,3612],{"class":132},"})\n",[83,3614,3615,3618,3620,3623,3625,3628,3630,3633,3635,3637,3639,3641,3643,3646,3648,3651],{"class":85,"line":144},[83,3616,3617],{"class":93},"display",[83,3619,180],{"class":132},[83,3621,3622],{"class":93},"coefficients",[83,3624,133],{"class":132},[83,3626,3627],{"class":93},"sort_values",[83,3629,180],{"class":132},[83,3631,3632],{"class":811},"by",[83,3634,216],{"class":132},[83,3636,3459],{"class":233},[83,3638,3596],{"class":237},[83,3640,3459],{"class":233},[83,3642,243],{"class":132},[83,3644,3645],{"class":811}," ascending",[83,3647,216],{"class":132},[83,3649,3650],{"class":89},"False",[83,3652,1135],{"class":132},[12,3654,3655],{},"This gives us the following result:",[2626,3657,3658,3666],{},[2629,3659,3660],{},[2632,3661,3662,3664],{},[2635,3663,3575],{},[2635,3665,3596],{},[2642,3667,3668,3675,3683,3690,3697,3704,3712],{},[2632,3669,3670,3672],{},[2647,3671,754],{},[2647,3673,3674],{},"261.839739",[2632,3676,3677,3680],{},[2647,3678,3679],{},"weather_Rainy",[2647,3681,3682],{},"124.573377",[2632,3684,3685,3687],{},[2647,3686,763],{},[2647,3688,3689],{},"4.837618",[2632,3691,3692,3694],{},[2647,3693,745],{},[2647,3695,3696],{},"2.482678",[2632,3698,3699,3701],{},[2647,3700,736],{},[2647,3702,3703],{},"-8.578684",[2632,3705,3706,3709],{},[2647,3707,3708],{},"weather_Cloudy",[2647,3710,3711],{},"-28.151991",[2632,3713,3714,3717],{},[2647,3715,3716],{},"weather_Sunny",[2647,3718,3719],{},"-96.421386",[12,3721,3722],{},"This tells us the impact of each variable on daily sales, holding the others constant. For example:",[1030,3724,3725,3731,3737,3744,3750,3756,3762],{},[1033,3726,3727,3728,133],{},"A local event (local_event) increases sales by approximately ",[61,3729,3730],{},"$261.84",[1033,3732,3733,3734,133],{},"A rainy day (weather_Rainy) increases sales by approximately ",[61,3735,3736],{},"$124.57",[1033,3738,3739,3740,3743],{},"A discount (discount) increases sales by approximately ",[61,3741,3742],{},"$4.84"," for each percentage point of discount.",[1033,3745,3746,3747,133],{},"Each additional dollar invested in advertising (ad_investment) increases sales by approximately ",[61,3748,3749],{},"$2.48",[1033,3751,3752,3753,133],{},"Each additional degree Celsius (temperature_c) decreases sales by approximately ",[61,3754,3755],{},"$8.58",[1033,3757,3758,3759,133],{},"A cloudy day (weather_Cloudy) decreases sales by approximately ",[61,3760,3761],{},"$28.15",[1033,3763,3764,3765,133],{},"A sunny day (weather_Sunny) decreases sales by approximately ",[61,3766,3767],{},"$96.42",[12,3769,3770],{},"What improvements can we make to the model?",[1030,3772,3773,3789,3795,3804,3810],{},[1033,3774,3775,3778,3779,1626,3781,3783,3784,1626,3786,3788],{},[40,3776,3777],{},"Feature Engineering",": Explore the creation of new features from existing ones. For example, interaction terms between ",[61,3780,745],{},[61,3782,763],{},", or ",[61,3785,736],{},[61,3787,772],{},", could capture more complex relationships.",[1033,3790,3791,3794],{},[40,3792,3793],{},"Non-linear Relationships",": The current model is linear. If scatter plots suggest non-linear relationships (e.g., sales reaching a maximum at a certain temperature and then decreasing), polynomial features or other non-linear models (such as Random Forest or Gradient Boosting) could capture them better.",[1033,3796,3797,3800,3801,3803],{},[40,3798,3799],{},"Temporal Aspects",": Since the data is daily sales, there might be temporal patterns (e.g., weekday effects, seasonality not fully captured by ",[61,3802,772],{},"). Incorporating features like the day of the week, month, or using specific time series models could be beneficial.",[1033,3805,3806,3809],{},[40,3807,3808],{},"Outlier Detection",": Investigate any potential outliers in the data that might be disproportionately influencing the model's coefficients and predictions.",[1033,3811,3812,3815],{},[40,3813,3814],{},"More Data",": While not always feasible, having a more diverse dataset (e.g., from different coffee shops, over a longer period, and with more varied conditions) could help the model generalize better.",[3817,3818,3819],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTPum, html code.shiki .sTPum{--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .s8w-G, html code.shiki .s8w-G{--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .si6no, html code.shiki .si6no{--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sqbOQ, html code.shiki .sqbOQ{--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .scnC2, html code.shiki .scnC2{--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .spP0B, html code.shiki .spP0B{--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .sHLBJ, html code.shiki .sHLBJ{--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .s5TCs, html code.shiki .s5TCs{--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .s9nN2, html code.shiki .s9nN2{--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .snYqZ, html code.shiki .snYqZ{--shiki-default:#A0ADA0;--shiki-dark:#758575DD}html pre.shiki code .sfsYZ, html code.shiki .sfsYZ{--shiki-default:#A65E2B;--shiki-dark:#C99076}",{"title":79,"searchDepth":116,"depth":116,"links":3821},[3822],{"id":34,"depth":103,"text":35,"children":3823},[3824,3825,3826,3827,3828],{"id":55,"depth":116,"text":56},{"id":836,"depth":116,"text":837},{"id":1071,"depth":116,"text":1072},{"id":2768,"depth":116,"text":2769},{"id":3070,"depth":116,"text":3071},"2026-04-19","md","\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis\u002Fshared\u002Feda.webp",{},"\u002Fblog\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis",{"title":6,"description":14},{"loc":3836,"priority":3837,"lastmod":3829},"\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis",0.7,"experimenting-with-exploratory-data-analysis","blog\u002Fblog\u002Fexperimenting-with-exploratory-data-analysis","In this article, we will explore the process of exploratory data analysis (EDA) in the context of machine learning projects.",[3842,3843,3844,3845,3846],"machine learning","data analysis","EDA","machine learning projects","exploratory analysis","4CGVb8074X-ES3BcsMtHLKlQN-4SeiuxoecVy_h3QjE",{"id":3849,"title":3850,"author":7,"body":3851,"date":5645,"description":3855,"extension":3830,"image":5646,"lastmod":5645,"meta":5647,"navigation":160,"order":124,"path":5648,"seo":5649,"sitemap":5650,"slug":5652,"stem":5653,"summary":5654,"tags":5655,"__hash__":5660},"content_en\u002Fblog\u002Fblog\u002Fworkflow-machine-learning-projects.md","The workflow in Machine Learning projects",{"type":9,"value":3852,"toc":5608},[3853,3856,3863,3865,3867,3870,3896,3910,3919,3921,3925,3928,3954,3957,3960,3982,3984,3988,3991,4017,4020,4024,4027,4030,4034,4037,4093,4096,4121,4126,4130,4156,4160,4163,4189,4192,4196,4252,4256,4264,4267,4273,4281,4287,4295,4301,4309,4313,4316,4342,4350,4356,4359,4363,4366,4405,4408,4412,4415,4432,4434,4440,4444,4469,4473,4476,4478,4492,4496,4499,4515,4518,4522,4525,4528,4531,4551,4556,4559,4597,4601,4604,4648,4652,4655,4697,4701,4704,4708,4711,4715,4718,4750,4754,4757,4777,4780,4818,4821,4853,4856,4882,4884,4888,4891,4896,4899,4924,4927,4933,4936,4942,4949,4955,4962,4966,4972,4975,4981,4986,4992,4999,5002,5009,5012,5018,5021,5025,5028,5035,5041,5048,5054,5058,5061,5067,5070,5076,5082,5086,5089,5096,5099,5105,5112,5115,5121,5128,5131,5137,5140,5143,5146,5189,5192,5198,5205,5209,5212,5223,5226,5285,5291,5302,5308,5312,5315,5326,5329,5332,5335,5338,5346,5349,5391,5394,5397,5400,5442,5445,5501,5504,5508,5511,5525,5528,5532,5535,5538,5541,5549,5555,5558,5561,5569,5571,5578,5589,5592,5599,5606],[12,3854,3855],{},"We continue learning about the world of machine learning, and this time, we will delve into the typical flow of a machine learning project.",[12,3857,17,3858],{},[19,3859,3862],{"href":3860,"rel":3861},"https:\u002F\u002Fderas.dev\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations",[23],"Paradigms of machine learning and mathematical foundations",[26,3864],{},[29,3866],{},[12,3868,3869],{},"Why is it important to understand the workflow of a machine learning project?",[1030,3871,3872,3878,3884,3890],{},[1033,3873,3874,3877],{},[40,3875,3876],{},"The process is more important than the result",": Successful models do not depend solely on sophisticated algorithms, but on a well-structured process. A Random Forest with clean and well-prepared data consistently outperforms a deep neural network with poor-quality data.",[1033,3879,3880,3883],{},[40,3881,3882],{},"Reproducibility",": A clear and documented workflow allows other data scientists to reproduce your results, which is fundamental for validation and advancing knowledge in the field.",[1033,3885,3886,3889],{},[40,3887,3888],{},"Collaboration",": In machine learning projects, there are often multiple people involved, from data scientists to data engineers and stakeholders. A well-defined workflow facilitates communication and collaboration among all team members.",[1033,3891,3892,3895],{},[40,3893,3894],{},"Reduces the risk of errors",": A structured process helps identify and correct errors in the early stages of the project, which can save time and resources in the long run.",[12,3897,3898,3899,3902,3903,1626,3906,3909],{},"In general, machine learning is a process that is ",[40,3900,3901],{},"part of a system",", with an ",[40,3904,3905],{},"iterative cycle",[40,3907,3908],{},"value-driven approach"," that consists of several stages, each with their own tasks and challenges.",[12,3911,3912,3916],{},[1554,3913],{"alt":3914,"src":3915},"Integrated View of the Machine Learning Cycle","\u002Fblog\u002Fworkflow-machine-learning-projects\u002Fshared\u002Fmachine-learning-cycle.webp",[1559,3917,3918],{},"Machine Learning Cycle",[29,3920],{},[32,3922,3924],{"id":3923},"_1-problem-definition","1. Problem Definition",[12,3926,3927],{},"The first stage of any machine learning project is the problem definition:",[1030,3929,3930,3936,3942,3948],{},[1033,3931,3932,3935],{},[40,3933,3934],{},"Problem Identification",": What do we want to achieve with the project? What decisions do we want to support with the model? It is crucial to understand the business context or application to clearly define the problem.",[1033,3937,3938,3941],{},[40,3939,3940],{},"Target Variable",": What is the variable we want to predict or classify? This variable, also known as the dependent variable, is the focus of the project and must be clearly defined.",[1033,3943,3944,3947],{},[40,3945,3946],{},"Type of Problem",": Is it a classification, regression, clustering, or something else? The nature of the problem will influence the choice of algorithms and techniques to use.",[1033,3949,3950,3953],{},[40,3951,3952],{},"Evaluation Metrics",": How will we measure the success of the model? It is important to define evaluation metrics from the beginning, as these will guide the model development and decision-making throughout the project.",[12,3955,3956],{},"This stage is the foundation of the entire project. A poorly defined problem can lead to wasted efforts and unsatisfactory results. It is fundamental to dedicate time to understanding the problem and setting clear objectives before moving on to subsequent stages.",[12,3958,3959],{},"Let's look at a practical example:\nSuppose an e-commerce company wants to predict whether a customer will make a purchase on their website. In this case:",[1030,3961,3962,3967,3972,3977],{},[1033,3963,3964,3966],{},[40,3965,3934],{},": Predicting the probability of a customer making a purchase.",[1033,3968,3969,3971],{},[40,3970,3940],{},": The target variable could be a binary variable indicating whether the customer made a purchase (1) or not (0).",[1033,3973,3974,3976],{},[40,3975,3946],{},": This is a binary classification problem.",[1033,3978,3979,3981],{},[40,3980,3952],{},": The evaluation metrics could include accuracy, recall, and F1-score, depending on the relative importance of false positives and false negatives in the business context.",[29,3983],{},[32,3985,3987],{"id":3986},"_2-data-collection","2. Data Collection",[12,3989,3990],{},"Once the problem is clearly defined, the next step is data collection, where relevant data sources must be identified and accessed. This can include:",[1030,3992,3993,3999,4005,4011],{},[1033,3994,3995,3998],{},[40,3996,3997],{},"Internal\u002FEnterprise Databases",": Data stored in internal company systems, such as relational databases, data warehouses or data lakes. Some examples include sales records, customer data, data from CRM or ERP systems, among others.",[1033,4000,4001,4004],{},[40,4002,4003],{},"APIs and Web Services",": External data from data providers, social media, geolocation services, etc. For example, a sentiment analysis company could use the Twitter API to collect tweets related to a specific topic.",[1033,4006,4007,4010],{},[40,4008,4009],{},"System Logs and Event Records",": Data generated by applications, servers, IoT devices, etc. For example, an infrastructure monitoring company could collect server logs to detect failure patterns.",[1033,4012,4013,4016],{},[40,4014,4015],{},"Public\u002FExternal Data",": Data available publicly, such as datasets from Kaggle, government data, academic research data, etc. For example, a researcher could use the MNIST image dataset to train a handwritten digit recognition model.",[12,4018,4019],{},"It is important to note that the quality of the collected data is crucial for the success of the project. The data must be relevant, complete, accurate and up-to-date. Additionally, it is fundamental to consider ethical and legal aspects related to data collection and usage, such as user privacy and compliance with regulations like GDPR.",[32,4021,4023],{"id":4022},"_3-data-preprocessing","3. Data Preprocessing",[12,4025,4026],{},"This is the phase of preparation and cleaning of data, which is a crucial step and often the biggest bottleneck. Data professionals usually dedicate between 70% and 80% of their time to preparing data and not to building models.",[12,4028,4029],{},"The quality of the models depends directly on the quality of the data; if the data is disorganized or incomplete, the model will not be able to learn useful patterns. Even the most sophisticated algorithm cannot compensate for poor-quality data.",[32,4031,4033],{"id":4032},"_4-exploratory-data-analysis-eda","4. Exploratory Data Analysis (EDA)",[12,4035,4036],{},"During this stage, a detailed analysis of the data is performed to understand its structure, distribution, and relationships between variables. This includes:",[1030,4038,4039,4059,4076],{},[1033,4040,4041,4044,4045],{},[40,4042,4043],{},"Univariate Analysis",": Examining the distribution of each variable individually, using descriptive statistics and visualizations such as:\n",[1030,4046,4047,4050,4053,4056],{},[1033,4048,4049],{},"Histograms",[1033,4051,4052],{},"Boxplots",[1033,4054,4055],{},"Bar Charts",[1033,4057,4058],{},"Measures of central tendency (mean, median) and dispersion (standard deviation, interquartile range)",[1033,4060,4061,4064,4065],{},[40,4062,4063],{},"Bivariate Analysis",": Exploring the relationships between pairs of variables, using visualizations such as:\n",[1030,4066,4067,4070,4073],{},[1033,4068,4069],{},"Scatter Plots",[1033,4071,4072],{},"Heatmaps for visualizing correlations",[1033,4074,4075],{},"Stacked Bar Charts for categorical variables",[1033,4077,4078,4081,4082],{},[40,4079,4080],{},"Multivariate Analysis",": Examining the relationships between multiple variables simultaneously, utilizing techniques such as:\n",[1030,4083,4084,4087,4090],{},[1033,4085,4086],{},"Principal Component Analysis (PCA)",[1033,4088,4089],{},"Cluster Analysis",[1033,4091,4092],{},"Pair Plots\nThe EDA is fundamental for detecting problems in the data, such as outliers, skewed distributions or non-linear relationships between variables. Additionally, the EDA can provide valuable insights that will guide the feature selection and algorithm choice in the subsequent stages of the project.",[12,4094,4095],{},"The common tools for performing EDA include:",[1030,4097,4098,4104,4109,4115],{},[1033,4099,4100,4103],{},[40,4101,4102],{},"Python",": Bibliotecas como Pandas, Matplotlib, Seaborn y Plotly son ampliamente utilizadas para el análisis exploratorio de datos en Python.",[1033,4105,4106,4108],{},[40,4107,3265],{},": Paquetes como ggplot2, dplyr y tidyr son populares para realizar EDA en R.",[1033,4110,4111,4114],{},[40,4112,4113],{},"Herramientas de visualización",": Herramientas como Tableau, Power BI o QlikView también pueden ser utilizadas para realizar análisis exploratorio de datos de manera interactiva.",[1033,4116,4117,4120],{},[40,4118,4119],{},"Jupyter Notebooks",": Los notebooks de Jupyter son una herramienta común para realizar EDA, ya que permiten combinar código, visualizaciones y texto explicativo en un solo documento.",[1734,4122,4123],{},[12,4124,4125],{},"The EDA is not a linear step, often it is performed iteratively as new insights are discovered or problems in the data are identified. It is important to document the findings of the EDA, as these can be useful for decision-making in the subsequent stages of the project.",[53,4127,4129],{"id":4128},"principles-for-effective-eda","Principles for Effective EDA",[1030,4131,4132,4138,4144,4150],{},[1033,4133,4134,4137],{},[40,4135,4136],{},"Start Simple",": Begin with basic visualizations and statistics to gain a general understanding of the data before diving into more complex analyses.",[1033,4139,4140,4143],{},[40,4141,4142],{},"Purposeful Use of Colors",": Use colors strategically to highlight important patterns or differences in the data, avoiding excessive use of colors that might be distracting.",[1033,4145,4146,4149],{},[40,4147,4148],{},"Iterative Process",": Continuously iterate as new insights are discovered or problems in the data are identified, adjusting the EDA approach as needed.",[1033,4151,4152,4155],{},[40,4153,4154],{},"Document Findings",": Record the insights and discoveries from the EDA to facilitate decision-making in subsequent stages of the project and to share with other team members.",[32,4157,4159],{"id":4158},"_5-feature-engineering","5. Feature engineering",[12,4161,4162],{},"The feature engineering is the process of creating new features from the original data to improve the model's performance. It is the bridge between raw unstructured data and inputs ready for modeling. This stage is crucial because it helps us:",[1030,4164,4165,4171,4177,4183],{},[1033,4166,4167,4170],{},[40,4168,4169],{},"Improve Accuracy",": Well-designed features can capture complex patterns in the data that models can leverage to make better predictions.",[1033,4172,4173,4176],{},[40,4174,4175],{},"Reduce Overfitting",": By creating more relevant features, we can help models generalize better to unseen data, reducing the risk of overfitting.",[1033,4178,4179,4182],{},[40,4180,4181],{},"Facilitate Interpretation",": Well-designed features can make models more interpretable, which is especially important in applications where explainability is crucial.",[1033,4184,4185,4188],{},[40,4186,4187],{},"Increase Efficiency",": By reducing the dimensionality of the data or creating more informative features, we can improve the efficiency of model training.",[12,4190,4191],{},"Some fundamental techniques for feature engineering include:",[53,4193,4195],{"id":4194},"numerical-transformations","Numerical Transformations",[1030,4197,4198,4218],{},[1033,4199,4200,4203,4204],{},[40,4201,4202],{},"Scaling",": Useful for models sensitive to magnitude (Regression, SVM, KNN, neural networks).",[1030,4205,4206,4212,4215],{},[1033,4207,4208,4209],{},"Min-Max Scaling: Maps values to range ",[83,4210,4211],{},"0,1",[1033,4213,4214],{},"Standardization (Z-score): Mean 0, standard deviation 1",[1033,4216,4217],{},"Robust Scaling: Uses median and interquartile range (better with outliers)",[1033,4219,4220,4223,4224],{},[40,4221,4222],{},"Non-linear Transformations",": When the relationship is not linear.",[1030,4225,4226,4232,4238,4249],{},[1033,4227,4228,4229],{},"Log transform: ",[61,4230,4231],{},"log(x)",[1033,4233,4234,4235],{},"Square root: ",[61,4236,4237],{},"sqrt(x)",[1033,4239,4240,4241,4244,4245,4248],{},"Box-Cox: ",[61,4242,4243],{},"((x + 1)^λ - 1) \u002F λ"," (for λ ≠ 0) or ",[61,4246,4247],{},"log(x + 1)"," (for λ = 0)",[1033,4250,4251],{},"Yeo-Johnson: Similar to Box-Cox but for data with negative values\nVery useful when there are highly skewed distributions.",[53,4253,4255],{"id":4254},"categorical-variables","Categorical Variables",[1030,4257,4258],{},[1033,4259,4260,4263],{},[40,4261,4262],{},"One-Hot Encoding",": Converts categories into binary columns.",[12,4265,4266],{},"Example:",[74,4268,4271],{"className":4269,"code":4270,"language":1885},[2384],"Color: [Red, Blue, Green]\n\nBecome:\n\nRed  Blue  Green\n1     0     0\n",[61,4272,4270],{"__ignoreMap":79},[1030,4274,4275],{},[1033,4276,4277,4280],{},[40,4278,4279],{},"Ordinal Encoding",": When there is an order:",[74,4282,4285],{"className":4283,"code":4284,"language":1885},[2384],"Low \u003C Medium \u003C High\n",[61,4286,4284],{"__ignoreMap":79},[1030,4288,4289],{},[1033,4290,4291,4294],{},[40,4292,4293],{},"Target Encoding",": Replaces category with average of the target:",[74,4296,4299],{"className":4297,"code":4298,"language":1885},[2384],"City → average sales\n",[61,4300,4298],{"__ignoreMap":79},[1030,4302,4303],{},[1033,4304,4305,4308],{},[40,4306,4307],{},"Frequency Encoding",": Replaces category with its frequency of occurrence.",[53,4310,4312],{"id":4311},"temporal-features","Temporal Features",[12,4314,4315],{},"When working with dates, we can extract features such as:",[1030,4317,4318,4321,4324,4327,4330,4333,4336,4339],{},[1033,4319,4320],{},"Year",[1033,4322,4323],{},"Month",[1033,4325,4326],{},"Day",[1033,4328,4329],{},"Day of the week",[1033,4331,4332],{},"Is weekend",[1033,4334,4335],{},"Quarter",[1033,4337,4338],{},"Date difference",[1033,4340,4341],{},"Time since last event",[1030,4343,4344],{},[1033,4345,4346,4349],{},[40,4347,4348],{},"Cyclical Encoding",": For variables like hour or month:",[74,4351,4354],{"className":4352,"code":4353,"language":1885},[2384],"sin(2π * hour \u002F 24)\ncos(2π * hour \u002F 24)\n",[61,4355,4353],{"__ignoreMap":79},[12,4357,4358],{},"This prevents 23 and 0 from seeming \"far apart\".",[53,4360,4362],{"id":4361},"interactions-between-variables","Interactions between Variables",[12,4364,4365],{},"Sometimes the combination matters more than the single variable.",[1030,4367,4368,4377,4389,4397],{},[1033,4369,4370,4373,4374],{},[40,4371,4372],{},"Product of variables",": ",[61,4375,4376],{},"x1 * x2",[1033,4378,4379,4373,4382,4385,4386],{},[40,4380,4381],{},"Polynomials",[61,4383,4384],{},"x^2",", ",[61,4387,4388],{},"x^3",[1033,4390,4391,4373,4394],{},[40,4392,4393],{},"Ratios",[61,4395,4396],{},"price \u002F size",[1033,4398,4399,4373,4402],{},[40,4400,4401],{},"Differences",[61,4403,4404],{},"payment_date - registration_date",[12,4406,4407],{},"Very useful in linear models.",[53,4409,4411],{"id":4410},"binning-discretization","Binning (Discretization)",[12,4413,4414],{},"Convert numbers into categories:",[1030,4416,4417,4422,4427],{},[1033,4418,4419],{},[40,4420,4421],{},"Binning uniforme",[1033,4423,4424],{},[40,4425,4426],{},"Binning por cuantiles",[1033,4428,4429],{},[40,4430,4431],{},"Binning basado en negocio",[12,4433,4266],{},[74,4435,4438],{"className":4436,"code":4437,"language":1885},[2384],"Age → [0-18], [19-35], [36-60], 60+\n",[61,4439,4437],{"__ignoreMap":79},[53,4441,4443],{"id":4442},"handling-outliers","Handling Outliers",[1030,4445,4446,4451,4456,4461],{},[1033,4447,4448],{},[40,4449,4450],{},"Clipping",[1033,4452,4453],{},[40,4454,4455],{},"Winsorizing",[1033,4457,4458],{},[40,4459,4460],{},"Log transform",[1033,4462,4463,4373,4466],{},[40,4464,4465],{},"Create binary feature",[61,4467,4468],{},"es_outlier",[53,4470,4472],{"id":4471},"cluster-based-features","Cluster-Based Features",[12,4474,4475],{},"Very powerful in transactional datasets.",[12,4477,4266],{},[1030,4479,4480,4483,4486,4489],{},[1033,4481,4482],{},"Average purchases per user",[1033,4484,4485],{},"Number of orders",[1033,4487,4488],{},"Time since last purchase",[1033,4490,4491],{},"Historical maximum\u002Fminimum",[53,4493,4495],{"id":4494},"feature-selection","Feature Selection",[12,4497,4498],{},"It's not all about creating - it's also about deleting.",[1030,4500,4501,4503,4506,4509,4512],{},[1033,4502,2640],{},[1033,4504,4505],{},"Mutual information",[1033,4507,4508],{},"RFE",[1033,4510,4511],{},"Lasso (L1)",[1033,4513,4514],{},"Feature importance (trees)",[12,4516,4517],{},"Feature engineering is one of the most valuable skills in data science, as it can make the difference between a mediocre model and an exceptional one.",[32,4519,4521],{"id":4520},"_6-training-of-models","6. Training of Models",[12,4523,4524],{},"Once the data is prepared and the features are designed, the next step is to train a machine learning model.",[12,4526,4527],{},"In this stage, an appropriate machine learning algorithm is selected for the defined problem and adjusted to the training data. The training process involves feeding the model with data and allowing it to learn patterns and relationships to make predictions.",[12,4529,4530],{},"The first thing we must consider before starting is the division of the data (datasets) into training, validation, and test sets. This is crucial for evaluating the model's performance fairly and avoiding overfitting:",[1030,4532,4533,4539,4545],{},[1033,4534,4535,4538],{},[40,4536,4537],{},"Training Set (70-80%)",": This is the set of data used to train the model. The model learns from these data, adjusting its parameters to minimize error in predictions.",[1033,4540,4541,4544],{},[40,4542,4543],{},"Validation Set (10-15%)",": This is a separate set of data used to tune the model's hyperparameters and make decisions about the model's architecture. The model is not directly trained on this data, but it is used to evaluate its performance during the training process.",[1033,4546,4547,4550],{},[40,4548,4549],{},"Test Set (10-15%)",": This is a completely separate set of data used to evaluate the final performance of the model after training and hyperparameter selection. This set is not used at all during the training or validation processes, allowing for an unbiased evaluation of the model.",[1734,4552,4553],{},[12,4554,4555],{},"As a tip, if you use AI agents for software development, a good practice is to use different sessions or agents for each stage of development, one agent for code generation, another for review, and another for testing. In this case, it helps ensure that the AI is not self-referential and can detect errors that a single agent might miss.",[12,4557,4558],{},"For model training, an appropriate machine learning algorithm is selected for the type of problem being addressed (classification, regression, clustering, etc.). Some common examples include:",[1030,4560,4561,4567,4573,4579,4585,4591],{},[1033,4562,4563,4566],{},[40,4564,4565],{},"Linear Regression",": A simple model for linear relationships, fast and interpretable but limited to linear relationships.",[1033,4568,4569,4572],{},[40,4570,4571],{},"Decision Trees",": Models based on rules, easy to interpret but prone to overfitting.",[1033,4574,4575,4578],{},[40,4576,4577],{},"Random Forest",": A collection of decision trees that reduces overfitting but is less interpretable.",[1033,4580,4581,4584],{},[40,4582,4583],{},"Gradient Boosting (XGBoost, LightGBM)",": Potente para datos tabulares, pero puede ser lento y propenso a sobreajuste si no se ajusta correctamente.",[1033,4586,4587,4590],{},[40,4588,4589],{},"Redes neuronales",": Modelos inspirados en el cerebro, capaces de capturar relaciones complejas, pero requieren grandes cantidades de datos y son menos interpretables.",[1033,4592,4593,4596],{},[40,4594,4595],{},"Support Vector Machines (SVM)",": Efectivo para problemas de clasificación, pero puede ser lento con grandes conjuntos de datos.",[32,4598,4600],{"id":4599},"_7-model-evaluation","7. Model Evaluation",[12,4602,4603],{},"Once the model has been trained, it is crucial to evaluate its performance using the validation and test sets. Model evaluation involves measuring its ability to make accurate predictions and generalize to unseen data.\nEvaluation metrics vary depending on the type of problem being addressed. For classification problems, some common metrics include:",[1030,4605,4606,4612,4618,4624,4630,4636,4642],{},[1033,4607,4608,4611],{},[40,4609,4610],{},"Precision",": The proportion of correct predictions over the total number of predictions made.",[1033,4613,4614,4617],{},[40,4615,4616],{},"Recall (Sensitivity)",": The proportion of true positives over the total number of actual positives.",[1033,4619,4620,4623],{},[40,4621,4622],{},"F1-score",": The harmonic mean of precision and recall, useful when there is an imbalance between classes.",[1033,4625,4626,4629],{},[40,4627,4628],{},"AUC-ROC",": Area under the ROC curve, which measures the model's ability to distinguish between classes.\nFor regression problems, some common metrics include:",[1033,4631,4632,4635],{},[40,4633,4634],{},"Mean Squared Error (MSE)",": The average of the squares of the errors between predictions and actual values.",[1033,4637,4638,4641],{},[40,4639,4640],{},"Mean Absolute Error (MAE)",": The average of the absolute values of the errors between predictions and actual values.",[1033,4643,4644,4647],{},[40,4645,4646],{},"R² (Coeficiente de determinación)",": The proportion of the variance in the dependent variable that is predictable from the independent variables.",[53,4649,4651],{"id":4650},"confusion-matrix","Confusion Matrix",[12,4653,4654],{},"A useful tool for evaluating classification models is the confusion matrix, which shows the number of true positives, false positives, true negatives, and false negatives. This allows for a better understanding of the model's performance and the areas where it may be making errors.",[2626,4656,4657,4669],{},[2629,4658,4659],{},[2632,4660,4661,4663,4666],{},[2635,4662],{},[2635,4664,4665],{},"Predicted Positive",[2635,4667,4668],{},"Predicted Negative",[2642,4670,4671,4684],{},[2632,4672,4673,4678,4681],{},[2647,4674,4675],{},[40,4676,4677],{},"Actual Positive",[2647,4679,4680],{},"True Positives (TP)",[2647,4682,4683],{},"False Negatives (FN)",[2632,4685,4686,4691,4694],{},[2647,4687,4688],{},[40,4689,4690],{},"Actual Negative",[2647,4692,4693],{},"False Positives (FP)",[2647,4695,4696],{},"True Negatives (TN)",[53,4698,4700],{"id":4699},"roc-curve","ROC Curve",[12,4702,4703],{},"The ROC curve (Receiver Operating Characteristic) is a graphical tool that shows the relationship between the true positive rate (TPR) and the false positive rate (FPR) as the classification threshold is varied. The area under the ROC curve (AUC-ROC) is a metric that measures the model's ability to distinguish between classes, with a value of 1 indicating a perfect model and a value of 0.5 indicating a model with no discrimination capability.",[53,4705,4707],{"id":4706},"precision-recall-curve","Precision-Recall Curve",[12,4709,4710],{},"The precision-recall curve is another graphical tool that shows the relationship between precision and recall as the classification threshold is varied. This curve is especially useful when there is an imbalance between classes, as it focuses on the model's ability to correctly identify the minority class.",[32,4712,4714],{"id":4713},"_8-implementation-and-deployment","8. Implementation and Deployment",[12,4716,4717],{},"Once the model has been trained and evaluated, the next step is to implement it in a production environment so that it can be used by end users or integrated into existing systems. The implementation and deployment of machine learning models can be challenging due to the need to ensure scalability, security, and maintainability of the model in a production environment. Some key considerations for implementing and deploying machine learning models include:",[1030,4719,4720,4726,4732,4738,4744],{},[1033,4721,4722,4725],{},[40,4723,4724],{},"APIs",": Expose the model through a RESTful API or gRPC so that it can be consumed by other applications or services.",[1033,4727,4728,4731],{},[40,4729,4730],{},"Web Applications",": Integrate the model into a web application so that users can interact with it through a graphical interface.",[1033,4733,4734,4737],{},[40,4735,4736],{},"Integration with Existing Systems",": Integrate the model into existing enterprise systems, such as CRM, ERP, or recommendation systems.",[1033,4739,4740,4743],{},[40,4741,4742],{},"Containers and Orchestration",": Use containers (Docker) and orchestration tools (Kubernetes) to facilitate deployment, scalability, and management of the model in production.",[1033,4745,4746,4749],{},[40,4747,4748],{},"Monitoring and Maintenance",": Implement monitoring systems to track the model's performance in production, detect potential issues, and perform updates or retrainings as needed.",[32,4751,4753],{"id":4752},"_9-monitoring-and-maintenance","9. Monitoring and Maintenance",[12,4755,4756],{},"Once the model is in production, it is crucial to monitor its performance continuously to ensure it remains effective and relevant. Model monitoring involves tracking key metrics, detecting potential issues, and performing adjustments or retrainings as needed. Some issues that may arise during this stage include:",[1030,4758,4759,4765,4771],{},[1033,4760,4761,4764],{},[40,4762,4763],{},"Data Drift",": Occurs when the distribution of input data changes over time, which can negatively impact the model's performance. It is important to monitor the data distribution and perform retrainings if a significant drift is detected.",[1033,4766,4767,4770],{},[40,4768,4769],{},"Concept Drift",": Occurs when the relationship between features and the target variable changes over time, making the model less effective. It is important to monitor the model's performance and perform adjustments or retrainings if concept drift is detected.",[1033,4772,4773,4776],{},[40,4774,4775],{},"Training-Serving Skew",": Occurs when there are differences between the data used to train the model and the data found in production, which can negatively impact the model's performance. It is important to ensure that training data is representative of production data and perform adjustments if a significant skew is detected.",[12,4778,4779],{},"To achieve effective monitoring, some best practices can be implemented, such as:",[1030,4781,4782,4788,4794,4800,4806,4812],{},[1033,4783,4784,4787],{},[40,4785,4786],{},"Defining clear KPIs",": Establish key performance metrics (KPIs) to monitor the model, such as accuracy, recall, F1-score, AUC-ROC, etc.",[1033,4789,4790,4793],{},[40,4791,4792],{},"Implementing alerts",": Configure alerts to notify the team when the model's performance drops below a predefined threshold or when significant drift is detected.",[1033,4795,4796,4799],{},[40,4797,4798],{},"Diversifying metrics",": Monitor multiple metrics to obtain a comprehensive view of the model's performance and detect potential issues from different angles.",[1033,4801,4802,4805],{},[40,4803,4804],{},"Automating retrainings",": Set up automated processes to perform retrainings of the model when significant drift is detected or when the performance falls below a predefined threshold.",[1033,4807,4808,4811],{},[40,4809,4810],{},"Documenting changes",": Maintain a record of the changes made to the model, such as hyperparameter adjustments, changes in training data, etc., to facilitate traceability and understanding of the decisions made.",[1033,4813,4814,4817],{},[40,4815,4816],{},"Versioning models",": Use versioning tools for models to maintain a history of different versions of the model and facilitate change management and updates.",[12,4819,4820],{},"Typically, the maintenance process follows a procedure like the following:",[1077,4822,4823,4829,4835,4841,4847],{},[1033,4824,4825,4828],{},[40,4826,4827],{},"Continuous monitoring",": Track the model's performance in production using the defined key metrics.",[1033,4830,4831,4834],{},[40,4832,4833],{},"Problem detection",": Identify potential problems, such as data drift, concept drift or training-serving skew, through metric and alert monitoring.",[1033,4836,4837,4840],{},[40,4838,4839],{},"Root Cause Analysis",": Investigate the underlying causes of the detected problems, such as changes in data distribution, changes in user behavior, etc.",[1033,4842,4843,4846],{},[40,4844,4845],{},"Adjustments or Retraining",": Make adjustments to the model or perform retraining using new data to address the detected problems and improve model performance.",[1033,4848,4849,4852],{},[40,4850,4851],{},"Validation and Deployment",": Validate the performance of the adjusted or retrained model using the validation set and then deploy the new version of the model to production.",[12,4854,4855],{},"Some popular tools for monitoring and maintaining machine learning models include:",[1030,4857,4858,4864,4870,4876],{},[1033,4859,4860,4863],{},[40,4861,4862],{},"Prometheus",": An open-source monitoring and alerting system that can be used to track model performance metrics in production.",[1033,4865,4866,4869],{},[40,4867,4868],{},"Grafana",": A data visualization platform that can be integrated with Prometheus to create custom dashboards for monitoring model performance.",[1033,4871,4872,4875],{},[40,4873,4874],{},"MLflow",": An open-source platform for managing the lifecycle of machine learning models, including features for monitoring and maintaining models in production.",[1033,4877,4878,4881],{},[40,4879,4880],{},"Evidently AI",": Evidently AI is an open-source, cloud-based platform for evaluating, testing, and monitoring AI and machine learning systems.",[29,4883],{},[32,4885,4887],{"id":4886},"case-study-churn-prediction-in-a-fintech-company","Case Study: Churn Prediction in a Fintech Company",[12,4889,4890],{},"We will explore a simulated case study of a machine learning project designed to predict churn in a digital subscription fintech company. This case will illustrate our current understanding of the workflow in a machine learning project.",[12,4892,4893],{},[40,4894,4895],{},"Business Context",[12,4897,4898],{},"A digital subscription fintech company has:",[1030,4900,4901,4906,4912,4918],{},[1033,4902,4903],{},[40,4904,4905],{},"120,000 active users",[1033,4907,4908,4909],{},"Average monthly subscription: ",[40,4910,4911],{},"$25",[1033,4913,4914,4915],{},"Monthly Recurring Revenue (MRR): ",[40,4916,4917],{},"$3,000,000",[1033,4919,4920,4921],{},"Monthly churn rate: ",[40,4922,4923],{},"8%",[12,4925,4926],{},"This means that each month:",[74,4928,4931],{"className":4929,"code":4930,"language":1885},[2384],"120,000 × 8% = 9,600 users cancel\n",[61,4932,4930],{"__ignoreMap":79},[12,4934,4935],{},"Estimated monthly loss:",[74,4937,4940],{"className":4938,"code":4939,"language":1885},[2384],"9,600 × $25 = $240,000\n",[61,4941,4939],{"__ignoreMap":79},[12,4943,4944,4945,4948],{},"The company wants to reduce churn to ",[40,4946,4947],{},"6%",", which would mean saving:",[74,4950,4953],{"className":4951,"code":4952,"language":1885},[2384],"2% × 120,000 × $25 = $60,000 per month\n",[61,4954,4952],{"__ignoreMap":79},[12,4956,4957,4958,4961],{},"The goal of the Machine Learning project is to ",[40,4959,4960],{},"identify users with a high probability of canceling within the next 30 days",", to send them a personalized retention campaign.",[53,4963,4965],{"id":4964},"problem-definition","Problem Definition",[1030,4967,4968],{},[1033,4969,4970],{},[40,4971,3934],{},[12,4973,4974],{},"Reduce the monthly churn rate from 8% to 6%.",[1030,4976,4977],{},[1033,4978,4979],{},[40,4980,3940],{},[12,4982,4983,589],{},[61,4984,4985],{},"churn_30d",[74,4987,4990],{"className":4988,"code":4989,"language":1885},[2384],"1 - Cancels within the next 30 days\n0 - Does not cancel\n",[61,4991,4989],{"__ignoreMap":79},[1030,4993,4994],{},[1033,4995,4996],{},[40,4997,4998],{},"Problem Type",[12,5000,5001],{},"Binary classification.",[1030,5003,5004],{},[1033,5005,5006],{},[40,5007,5008],{},"Key Business Metric",[12,5010,5011],{},"Accuracy (i.e., the overall success rate) is not enough. The important factors are:",[74,5013,5016],{"className":5014,"code":5015,"language":1885},[2384],"Recall rate of churn users\nROI of the retention campaign\n",[61,5017,5015],{"__ignoreMap":79},[12,5019,5020],{},"Why? Because we want to accurately identify users who will cancel (recall) and ensure that the retention campaign is profitable (ROI).",[53,5022,5024],{"id":5023},"data-collection","Data Collection",[12,5026,5027],{},"Data was collected from:",[1030,5029,5030],{},[1033,5031,5032],{},[40,5033,5034],{},"Internal Sources",[74,5036,5039],{"className":5037,"code":5038,"language":1885},[2384],"* Payment history\n* App usage frequency\n* Time since last login\n* Support tickets\n* Plan type\n* Payment method\n* Payment failure history\n",[61,5040,5038],{"__ignoreMap":79},[1030,5042,5043],{},[1033,5044,5045],{},[40,5046,5047],{},"Data Volume",[74,5049,5052],{"className":5050,"code":5051,"language":1885},[2384],"* 18 months of historical data\n* 1.5 million monthly sign-ups\n* Final dataset: **95,000 unique users** with complete history\n",[61,5053,5051],{"__ignoreMap":79},[53,5055,5057],{"id":5056},"preprocessing","Preprocessing",[12,5059,5060],{},"Problems Detected:",[74,5062,5065],{"className":5063,"code":5064,"language":1885},[2384],"* 7% null values ​​in \"last login\"\n* 3% duplicate records\n* Categorical variables with high cardinality (cities)\n",[61,5066,5064],{"__ignoreMap":79},[12,5068,5069],{},"Actions Taken:",[74,5071,5074],{"className":5072,"code":5073,"language":1885},[2384],"* Imputation with median for numerical variables\n* Removal of duplicates\n* Grouping of infrequent cities as \"Other\"\n",[61,5075,5073],{"__ignoreMap":79},[12,5077,5078,5079],{},"Time spent on this stage: ",[40,5080,5081],{},"72% of the project",[53,5083,5085],{"id":5084},"exploratory-analysis","Exploratory Analysis",[12,5087,5088],{},"Key Findings:",[1030,5090,5091],{},[1033,5092,5093],{},[40,5094,5095],{},"Insight 1",[12,5097,5098],{},"Users who do not log in for 14 days have:",[74,5100,5103],{"className":5101,"code":5102,"language":1885},[2384],"* 22% probability of churn\n\nvs.\n\n* 4% for recently active users\n",[61,5104,5102],{"__ignoreMap":79},[1030,5106,5107],{},[1033,5108,5109],{},[40,5110,5111],{},"Insight 2",[12,5113,5114],{},"Users with more than 2 payment failures in 60 days:",[74,5116,5119],{"className":5117,"code":5118,"language":1885},[2384],"* 35% probability of Churn\n",[61,5120,5118],{"__ignoreMap":79},[1030,5122,5123],{},[1033,5124,5125],{},[40,5126,5127],{},"Insight 3",[12,5129,5130],{},"Users who opened more than 3 support tickets:",[74,5132,5135],{"className":5133,"code":5134,"language":1885},[2384],"* 18% churn\n* Main cause: technical issues\n",[61,5136,5134],{"__ignoreMap":79},[12,5138,5139],{},"This changes our focus: it's not just a retention issue, but also a user experience and technical support issue. This data tells us that users who have technical problems or difficulties using the app are much more likely to cancel, suggesting that an effective retention campaign should also address these issues and improve the user experience.",[53,5141,3777],{"id":5142},"feature-engineering",[12,5144,5145],{},"Variables such as the following were created:",[1030,5147,5148,5154,5160,5166,5172,5182],{},[1033,5149,5150,5153],{},[61,5151,5152],{},"days_since_last_login",": This is the number of days since the user last logged into the application. This variable is important because, as discovered in the exploratory analysis, users who don't log in for an extended period are more likely to cancel their subscription.",[1033,5155,5156,5159],{},[61,5157,5158],{},"number_of_payment_failures_60d",": This is the number of payment failures a user has experienced in the last 60 days. As discovered in the EDA, users with more than 2 payment failures in this period have a significantly higher probability of canceling their subscription.",[1033,5161,5162,5165],{},[61,5163,5164],{},"average_weekly_usage",": This is the average weekly usage of the application. This variable can help capture the user's level of engagement with the application, which can be an important indicator of their likelihood of canceling.",[1033,5167,5168,5171],{},[61,5169,5170],{},"customer_time_in_months",": Users who have been customers for longer periods may have a lower probability of canceling.",[1033,5173,5174,5177,5178,5181],{},[61,5175,5176],{},"support_tickets_90d",": This is the number of support tickets a user has opened in the last 90 days. Since it was discovered that users who open more than 3 support tickets have a higher probability of canceling, this variable can be an important indicator of churn risk. * ",[61,5179,5180],{},"payment_failure_ratio = failures \u002F attempts",": This ratio can be a more accurate indicator of churn risk related to payment issues, as it takes into account both the number of failed payments and the total number of payment attempts.",[1033,5183,5184,5185,5188],{},"Binary variable: ",[61,5186,5187],{},"is_new_user (\u003C3 months)",": New users may have a different churn risk compared to older users, so this variable can help capture that difference.",[12,5190,5191],{},"Also created:",[74,5193,5196],{"className":5194,"code":5195,"language":1885},[2384],"inactivity_risk = days_since_last_login × (1 \u002F average_usage)\n",[61,5197,5195],{"__ignoreMap":79},[12,5199,5200,5201,5204],{},"This composite variable can be a powerful indicator of churn risk, as it combines information about user inactivity (days since last login) with their engagement level (average weekly usage). A high ",[61,5202,5203],{},"risk_inactivity"," value would indicate that a user has not logged in for a long time and has a low level of usage, which could be a strong indicator that they are at risk of canceling their subscription.",[53,5206,5208],{"id":5207},"model-training","Model Training",[12,5210,5211],{},"Data was divided as follows:",[1030,5213,5214,5217,5220],{},[1033,5215,5216],{},"75% training",[1033,5218,5219],{},"15% validation",[1033,5221,5222],{},"10% testing",[12,5224,5225],{},"The following were tested:",[2626,5227,5228,5240],{},[2629,5229,5230],{},[2632,5231,5232,5235,5237],{},[2635,5233,5234],{},"Model",[2635,5236,4628],{},[2635,5238,5239],{},"Recall churn",[2642,5241,5242,5253,5263,5274],{},[2632,5243,5244,5247,5250],{},[2647,5245,5246],{},"Logistic Regression",[2647,5248,5249],{},"0.76",[2647,5251,5252],{},"0.58",[2632,5254,5255,5257,5260],{},[2647,5256,4577],{},[2647,5258,5259],{},"0.84",[2647,5261,5262],{},"0.71",[2632,5264,5265,5268,5271],{},[2647,5266,5267],{},"XGBoost",[2647,5269,5270],{},"0.87",[2647,5272,5273],{},"0.78",[2632,5275,5276,5279,5282],{},[2647,5277,5278],{},"Neural Network",[2647,5280,5281],{},"0.85",[2647,5283,5284],{},"0.73",[12,5286,5287,5288,5290],{},"Although XGBoost had better metrics, ",[40,5289,4577],{}," was initially chosen because:",[1030,5292,5293,5296,5299],{},[1033,5294,5295],{},"It was more interpretable",[1033,5297,5298],{},"Lower risk of overfitting",[1033,5300,5301],{},"Easier to maintain",[12,5303,5304,5305,133],{},"This is key: ",[40,5306,5307],{},"the best metric is not always the best business decision",[53,5309,5311],{"id":5310},"evaluation","Evaluation",[12,5313,5314],{},"In the test set:",[1030,5316,5317,5320,5323],{},[1033,5318,5319],{},"9% actual churn",[1033,5321,5322],{},"Model detected 76% of churns",[1033,5324,5325],{},"False positives: 18%",[12,5327,5328],{},"Simulation:",[12,5330,5331],{},"Intervention is only implemented for users with a probability > 0.65.",[12,5333,5334],{},"Users marked as \"high risk\": 11,000",[12,5336,5337],{},"Of those:",[1030,5339,5340,5343],{},[1033,5341,5342],{},"6,800 were actually going to cancel",[1033,5344,5345],{},"4,200 were false positives",[12,5347,5348],{},"Campaign cost:",[12,5350,5351,5352,5390],{},"11,000 × ",[83,5353,5355,5371],{"className":5354},[1813],[83,5356,5358],{"className":5357},[1817],[1819,5359,5360],{"xmlns":1821},[1824,5361,5362,5368],{},[1827,5363,5364,5366],{},[1844,5365,2096],{},[1834,5367,216],{},[1863,5369,5370],{"encoding":1865},"2 = ",[83,5372,5374],{"className":5373,"ariaHidden":1871},[1870],[83,5375,5377,5381,5384,5387],{"className":5376},[1875],[83,5378],{"className":5379,"style":5380},[1879],"height:0.6444em;",[83,5382,2096],{"className":5383},[1884],[83,5385],{"className":5386,"style":1893},[1892],[83,5388,216],{"className":5389},[1897],"22,000",[12,5392,5393],{},"Customers saved (campaign success rate 40%):",[12,5395,5396],{},"6,800 × 40% = 2,720 retained customers",[12,5398,5399],{},"Monthly revenue recovered:",[12,5401,5402,5403,5441],{},"2,720 × ",[83,5404,5406,5423],{"className":5405},[1813],[83,5407,5409],{"className":5408},[1817],[1819,5410,5411],{"xmlns":1821},[1824,5412,5413,5420],{},[1827,5414,5415,5418],{},[1844,5416,5417],{},"25",[1834,5419,216],{},[1863,5421,5422],{"encoding":1865},"25 = ",[83,5424,5426],{"className":5425,"ariaHidden":1871},[1870],[83,5427,5429,5432,5435,5438],{"className":5428},[1875],[83,5430],{"className":5431,"style":5380},[1879],[83,5433,5417],{"className":5434},[1884],[83,5436],{"className":5437,"style":1893},[1892],[83,5439,216],{"className":5440},[1897],"68,000",[12,5443,5444],{},"Monthly ROI:",[12,5446,5447,5500],{},[83,5448,5450,5473],{"className":5449},[1813],[83,5451,5453],{"className":5452},[1817],[1819,5454,5455],{"xmlns":1821},[1824,5456,5457,5470],{},[1827,5458,5459,5462,5464,5467],{},[1844,5460,5461],{},"68",[1834,5463,243],{"separator":1871},[1844,5465,5466],{},"000",[1834,5468,5469],{},"−",[1863,5471,5472],{"encoding":1865},"68,000 - ",[83,5474,5476],{"className":5475,"ariaHidden":1871},[1870],[83,5477,5479,5483,5486,5490,5494,5497],{"className":5478},[1875],[83,5480],{"className":5481,"style":5482},[1879],"height:0.8389em;vertical-align:-0.1944em;",[83,5484,5461],{"className":5485},[1884],[83,5487,243],{"className":5488},[5489],"mpunct",[83,5491],{"className":5492,"style":5493},[1892],"margin-right:0.1667em;",[83,5495,5466],{"className":5496},[1884],[83,5498,5469],{"className":5499},[1884],"22,000 = $46,000 net profit",[12,5502,5503],{},"Goal achieved.",[53,5505,5507],{"id":5506},"implementation","Implementation",[12,5509,5510],{},"The model was deployed as:",[1030,5512,5513,5516,5519,5522],{},[1033,5514,5515],{},"REST API on FastAPI",[1033,5517,5518],{},"Docker container",[1033,5520,5521],{},"Nightly job that recalculates daily risk",[1033,5523,5524],{},"CRM integration to trigger automated campaigns",[12,5526,5527],{},"Inference time per user: 12 ms",[53,5529,5531],{"id":5530},"production-monitoring","Production Monitoring",[12,5533,5534],{},"After 4 months:",[12,5536,5537],{},"The churn rate rose again to 7.4%.",[12,5539,5540],{},"The following were detected:",[1030,5542,5543,5546],{},[1033,5544,5545],{},"New competitor with aggressive discounts",[1033,5547,5548],{},"Change in the behavior of younger users",[12,5550,5551,5554],{},[40,5552,5553],{},"Concept drift"," was identified; that is, the model was no longer accurately capturing churn patterns due to changes in the market and user behavior.",[12,5556,5557],{},"Retraining was performed using recent data.",[12,5559,5560],{},"New model:",[1030,5562,5563,5566],{},[1033,5564,5565],{},"Improved recall to 81%",[1033,5567,5568],{},"Reduced churn again to 6.2%",[29,5570],{},[12,5572,5573,5574,5577],{},"What can we learn from this case? First, ",[40,5575,5576],{},"the model wasn't the focus—the process was",". Success didn't come from a sophisticated algorithm, but from a well-executed process that included:",[1030,5579,5580,5583,5586],{},[1033,5581,5582],{},"Good EDA (Engineering Development Analysis)",[1033,5584,5585],{},"Good feature engineering",[1033,5587,5588],{},"Correctly defining the business metrics",[12,5590,5591],{},"Second, accuracy wasn't the right metric. At this point, we needed to focus on ROI, because we didn't just want a model that performed well in technical metrics, but one that also generated a positive impact on the business.",[12,5593,5594,5595,5598],{},"As we've already mentioned, ",[40,5596,5597],{},"the model is part of a system"," that includes other components such as marketing, CRM, infrastructure, monitoring, and retraining. The project's success depends on the effective integration of all these components, not just the model itself.",[12,5600,5601,5602,5605],{},"Third, the project never ends; ",[40,5603,5604],{},"it's a continuous cycle",". Monitoring and maintenance are just as important as the initial training because the environment changes, users change, the market changes, and the model must adapt to remain effective.",[29,5607],{},{"title":79,"searchDepth":116,"depth":116,"links":5609},[5610,5611,5612,5613,5616,5626,5627,5632,5633,5634],{"id":3923,"depth":103,"text":3924},{"id":3986,"depth":103,"text":3987},{"id":4022,"depth":103,"text":4023},{"id":4032,"depth":103,"text":4033,"children":5614},[5615],{"id":4128,"depth":116,"text":4129},{"id":4158,"depth":103,"text":4159,"children":5617},[5618,5619,5620,5621,5622,5623,5624,5625],{"id":4194,"depth":116,"text":4195},{"id":4254,"depth":116,"text":4255},{"id":4311,"depth":116,"text":4312},{"id":4361,"depth":116,"text":4362},{"id":4410,"depth":116,"text":4411},{"id":4442,"depth":116,"text":4443},{"id":4471,"depth":116,"text":4472},{"id":4494,"depth":116,"text":4495},{"id":4520,"depth":103,"text":4521},{"id":4599,"depth":103,"text":4600,"children":5628},[5629,5630,5631],{"id":4650,"depth":116,"text":4651},{"id":4699,"depth":116,"text":4700},{"id":4706,"depth":116,"text":4707},{"id":4713,"depth":103,"text":4714},{"id":4752,"depth":103,"text":4753},{"id":4886,"depth":103,"text":4887,"children":5635},[5636,5637,5638,5639,5640,5641,5642,5643,5644],{"id":4964,"depth":116,"text":4965},{"id":5023,"depth":116,"text":5024},{"id":5056,"depth":116,"text":5057},{"id":5084,"depth":116,"text":5085},{"id":5142,"depth":116,"text":3777},{"id":5207,"depth":116,"text":5208},{"id":5310,"depth":116,"text":5311},{"id":5506,"depth":116,"text":5507},{"id":5530,"depth":116,"text":5531},"2026-04-18","\u002Fblog\u002Fworkflow-machine-learning-projects\u002Fshared\u002Fworkflow.webp",{},"\u002Fblog\u002Fblog\u002Fworkflow-machine-learning-projects",{"title":3850,"description":3855},{"loc":5651,"priority":3837,"lastmod":5645},"\u002Fblog\u002Fworkflow-machine-learning-projects","workflow-machine-learning-projects","blog\u002Fblog\u002Fworkflow-machine-learning-projects","Discover the typical workflow of a machine learning project, from data collection to model implementation, and learn about best practices and common challenges in the field of data science.",[5656,5657,5658,5659],"Machine Learning","Data Science","ML Projects","Workflow","MXgkwZT0KjAXfrhqOqfXLt24tkatVQk20fUyAE_f-Qw",{"id":5662,"title":5663,"author":7,"body":5664,"date":22957,"description":5668,"extension":3830,"image":22958,"lastmod":22957,"meta":22959,"navigation":160,"order":116,"path":22960,"seo":22961,"sitemap":22962,"slug":22964,"stem":22965,"summary":22966,"tags":22967,"__hash__":22969},"content_en\u002Fblog\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations.md","Machine learning paradigms and mathematical foundations",{"type":9,"value":5665,"toc":22941},[5666,5669,5676,5678,5680,5684,5687,5691,5694,6246,6326,6329,6343,6345,6349,6558,6572,6574,6578,6581,6607,6610,6612,6616,6626,6629,6632,6635,7110,7113,7735,7797,7908,8007,8016,8019,8090,8130,8396,8399,8737,8740,9173,9175,9454,9457,9757,9760,10136,10178,10183,10361,10949,11190,11192,11502,11505,11543,11550,11735,11737,11976,12118,12693,12930,12932,13240,13243,13848,14206,14395,14520,14622,14625,14781,14788,15190,15192,15411,15416,16005,16010,16253,16672,16677,16976,17012,17023,17025,17028,17031,17034,17054,17059,17062,17184,17309,17316,17325,17775,17784,17978,17983,18609,18611,19152,19155,19160,19163,19352,19354,19909,19962,19965,20108,20115,20259,20560,20573,20576,20894,20897,21525,21527,21804,21807,21818,21821,21829,21832,21837,22112,22117,22412,22415,22419,22422,22428,22447,22451,22475,22480,22484,22491,22494,22601,22603,22721,22724,22823,22826,22835,22849,22852,22879,22883,22886],[12,5667,5668],{},"We continue learning about Machine Learning, this time we will delve into the different paradigms of machine learning and the mathematical foundations that support these models.",[12,5670,17,5671],{},[19,5672,5675],{"href":5673,"rel":5674},"https:\u002F\u002Fderas.dev\u002Fblog\u002Fmachine-learning-fundamentals",[23],"Machine Learning Fundamentals",[26,5677],{},[29,5679],{},[32,5681,5683],{"id":5682},"machine-learning-paradigms","Machine Learning Paradigms",[12,5685,5686],{},"In the previous article, we already mentioned the types of machine learning, in this section we will review them and then move on to the mathematical foundations.",[53,5688,5690],{"id":5689},"supervised-learning","Supervised Learning",[12,5692,5693],{},"Supervised learning requires a dataset where each input example X is associated with a label or output Y. The objective of the model is to learn a function that maps inputs to correct outputs.",[12,5695,5696,5697,6099,6100,6173,6174,6245],{},"Based on this, the training dataset is represented as a set of pairs ",[83,5698,5700,5783],{"className":5699},[1813],[83,5701,5703],{"className":5702},[1817],[1819,5704,5705],{"xmlns":1821},[1824,5706,5707,5780],{},[1827,5708,5709,5712,5714,5720,5722,5728,5730,5732,5734,5740,5742,5748,5750,5752,5754,5756,5758,5760,5762,5768,5770,5776,5778],{},[1834,5710,3169],{"stretchy":5711},"false",[1834,5713,180],{"stretchy":5711},[1837,5715,5716,5718],{},[1840,5717,1311],{},[1844,5719,1855],{},[1834,5721,243],{"separator":1871},[1837,5723,5724,5726],{},[1840,5725,3414],{},[1844,5727,1855],{},[1834,5729,505],{"stretchy":5711},[1834,5731,243],{"separator":1871},[1834,5733,180],{"stretchy":5711},[1837,5735,5736,5738],{},[1840,5737,1311],{},[1844,5739,2096],{},[1834,5741,243],{"separator":1871},[1837,5743,5744,5746],{},[1840,5745,3414],{},[1844,5747,2096],{},[1834,5749,505],{"stretchy":5711},[1834,5751,243],{"separator":1871},[1840,5753,133],{"mathvariant":648},[1840,5755,133],{"mathvariant":648},[1840,5757,133],{"mathvariant":648},[1834,5759,243],{"separator":1871},[1834,5761,180],{"stretchy":5711},[1837,5763,5764,5766],{},[1840,5765,1311],{},[1840,5767,300],{},[1834,5769,243],{"separator":1871},[1837,5771,5772,5774],{},[1840,5773,3414],{},[1840,5775,300],{},[1834,5777,505],{"stretchy":5711},[1834,5779,3178],{"stretchy":5711},[1863,5781,5782],{"encoding":1865},"\\{(x_1, y_1), (x_2, y_2), ..., (x_n, y_n)\\}",[83,5784,5786],{"className":5785,"ariaHidden":1871},[1870],[83,5787,5789,5793,5798,5839,5842,5845,5887,5891,5894,5897,5900,5940,5943,5946,5986,5989,5992,5995,5999,6002,6005,6008,6049,6052,6055,6095],{"className":5788},[1875],[83,5790],{"className":5791,"style":5792},[1879],"height:1em;vertical-align:-0.25em;",[83,5794,5797],{"className":5795},[5796],"mopen","{(",[83,5799,5801,5804],{"className":5800},[1884],[83,5802,1311],{"className":5803},[1884,1914],[83,5805,5807],{"className":5806},[1919],[83,5808,5810,5831],{"className":5809},[1923,1924],[83,5811,5813,5828],{"className":5812},[1928],[83,5814,5816],{"className":5815,"style":1933},[1932],[83,5817,5819,5822],{"style":5818},"top:-2.55em;margin-left:0em;margin-right:0.05em;",[83,5820],{"className":5821,"style":1941},[1940],[83,5823,5825],{"className":5824},[1945,1946,1947,1948],[83,5826,1855],{"className":5827},[1884,1948],[83,5829,1956],{"className":5830},[1955],[83,5832,5834],{"className":5833},[1928],[83,5835,5837],{"className":5836,"style":1963},[1932],[83,5838],{},[83,5840,243],{"className":5841},[5489],[83,5843],{"className":5844,"style":5493},[1892],[83,5846,5848,5852],{"className":5847},[1884],[83,5849,3414],{"className":5850,"style":5851},[1884,1914],"margin-right:0.0359em;",[83,5853,5855],{"className":5854},[1919],[83,5856,5858,5879],{"className":5857},[1923,1924],[83,5859,5861,5876],{"className":5860},[1928],[83,5862,5864],{"className":5863,"style":1933},[1932],[83,5865,5867,5870],{"style":5866},"top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;",[83,5868],{"className":5869,"style":1941},[1940],[83,5871,5873],{"className":5872},[1945,1946,1947,1948],[83,5874,1855],{"className":5875},[1884,1948],[83,5877,1956],{"className":5878},[1955],[83,5880,5882],{"className":5881},[1928],[83,5883,5885],{"className":5884,"style":1963},[1932],[83,5886],{},[83,5888,505],{"className":5889},[5890],"mclose",[83,5892,243],{"className":5893},[5489],[83,5895],{"className":5896,"style":5493},[1892],[83,5898,180],{"className":5899},[5796],[83,5901,5903,5906],{"className":5902},[1884],[83,5904,1311],{"className":5905},[1884,1914],[83,5907,5909],{"className":5908},[1919],[83,5910,5912,5932],{"className":5911},[1923,1924],[83,5913,5915,5929],{"className":5914},[1928],[83,5916,5918],{"className":5917,"style":1933},[1932],[83,5919,5920,5923],{"style":5818},[83,5921],{"className":5922,"style":1941},[1940],[83,5924,5926],{"className":5925},[1945,1946,1947,1948],[83,5927,2096],{"className":5928},[1884,1948],[83,5930,1956],{"className":5931},[1955],[83,5933,5935],{"className":5934},[1928],[83,5936,5938],{"className":5937,"style":1963},[1932],[83,5939],{},[83,5941,243],{"className":5942},[5489],[83,5944],{"className":5945,"style":5493},[1892],[83,5947,5949,5952],{"className":5948},[1884],[83,5950,3414],{"className":5951,"style":5851},[1884,1914],[83,5953,5955],{"className":5954},[1919],[83,5956,5958,5978],{"className":5957},[1923,1924],[83,5959,5961,5975],{"className":5960},[1928],[83,5962,5964],{"className":5963,"style":1933},[1932],[83,5965,5966,5969],{"style":5866},[83,5967],{"className":5968,"style":1941},[1940],[83,5970,5972],{"className":5971},[1945,1946,1947,1948],[83,5973,2096],{"className":5974},[1884,1948],[83,5976,1956],{"className":5977},[1955],[83,5979,5981],{"className":5980},[1928],[83,5982,5984],{"className":5983,"style":1963},[1932],[83,5985],{},[83,5987,505],{"className":5988},[5890],[83,5990,243],{"className":5991},[5489],[83,5993],{"className":5994,"style":5493},[1892],[83,5996,5998],{"className":5997},[1884],"...",[83,6000,243],{"className":6001},[5489],[83,6003],{"className":6004,"style":5493},[1892],[83,6006,180],{"className":6007},[5796],[83,6009,6011,6014],{"className":6010},[1884],[83,6012,1311],{"className":6013},[1884,1914],[83,6015,6017],{"className":6016},[1919],[83,6018,6020,6041],{"className":6019},[1923,1924],[83,6021,6023,6038],{"className":6022},[1928],[83,6024,6027],{"className":6025,"style":6026},[1932],"height:0.1514em;",[83,6028,6029,6032],{"style":5818},[83,6030],{"className":6031,"style":1941},[1940],[83,6033,6035],{"className":6034},[1945,1946,1947,1948],[83,6036,300],{"className":6037},[1884,1914,1948],[83,6039,1956],{"className":6040},[1955],[83,6042,6044],{"className":6043},[1928],[83,6045,6047],{"className":6046,"style":1963},[1932],[83,6048],{},[83,6050,243],{"className":6051},[5489],[83,6053],{"className":6054,"style":5493},[1892],[83,6056,6058,6061],{"className":6057},[1884],[83,6059,3414],{"className":6060,"style":5851},[1884,1914],[83,6062,6064],{"className":6063},[1919],[83,6065,6067,6087],{"className":6066},[1923,1924],[83,6068,6070,6084],{"className":6069},[1928],[83,6071,6073],{"className":6072,"style":6026},[1932],[83,6074,6075,6078],{"style":5866},[83,6076],{"className":6077,"style":1941},[1940],[83,6079,6081],{"className":6080},[1945,1946,1947,1948],[83,6082,300],{"className":6083},[1884,1914,1948],[83,6085,1956],{"className":6086},[1955],[83,6088,6090],{"className":6089},[1928],[83,6091,6093],{"className":6092,"style":1963},[1932],[83,6094],{},[83,6096,6098],{"className":6097},[5890],")}",", where ",[83,6101,6103,6122],{"className":6102},[1813],[83,6104,6106],{"className":6105},[1817],[1819,6107,6108],{"xmlns":1821},[1824,6109,6110,6119],{},[1827,6111,6112],{},[1837,6113,6114,6116],{},[1840,6115,1311],{},[1840,6117,6118],{},"i",[1863,6120,6121],{"encoding":1865},"x_i",[83,6123,6125],{"className":6124,"ariaHidden":1871},[1870],[83,6126,6128,6132],{"className":6127},[1875],[83,6129],{"className":6130,"style":6131},[1879],"height:0.5806em;vertical-align:-0.15em;",[83,6133,6135,6138],{"className":6134},[1884],[83,6136,1311],{"className":6137},[1884,1914],[83,6139,6141],{"className":6140},[1919],[83,6142,6144,6165],{"className":6143},[1923,1924],[83,6145,6147,6162],{"className":6146},[1928],[83,6148,6151],{"className":6149,"style":6150},[1932],"height:0.3117em;",[83,6152,6153,6156],{"style":5818},[83,6154],{"className":6155,"style":1941},[1940],[83,6157,6159],{"className":6158},[1945,1946,1947,1948],[83,6160,6118],{"className":6161},[1884,1914,1948],[83,6163,1956],{"className":6164},[1955],[83,6166,6168],{"className":6167},[1928],[83,6169,6171],{"className":6170,"style":1963},[1932],[83,6172],{}," is the input and ",[83,6175,6177,6195],{"className":6176},[1813],[83,6178,6180],{"className":6179},[1817],[1819,6181,6182],{"xmlns":1821},[1824,6183,6184,6192],{},[1827,6185,6186],{},[1837,6187,6188,6190],{},[1840,6189,3414],{},[1840,6191,6118],{},[1863,6193,6194],{"encoding":1865},"y_i",[83,6196,6198],{"className":6197,"ariaHidden":1871},[1870],[83,6199,6201,6205],{"className":6200},[1875],[83,6202],{"className":6203,"style":6204},[1879],"height:0.625em;vertical-align:-0.1944em;",[83,6206,6208,6211],{"className":6207},[1884],[83,6209,3414],{"className":6210,"style":5851},[1884,1914],[83,6212,6214],{"className":6213},[1919],[83,6215,6217,6237],{"className":6216},[1923,1924],[83,6218,6220,6234],{"className":6219},[1928],[83,6221,6223],{"className":6222,"style":6150},[1932],[83,6224,6225,6228],{"style":5866},[83,6226],{"className":6227,"style":1941},[1940],[83,6229,6231],{"className":6230},[1945,1946,1947,1948],[83,6232,6118],{"className":6233},[1884,1914,1948],[83,6235,1956],{"className":6236},[1955],[83,6238,6240],{"className":6239},[1928],[83,6241,6243],{"className":6242,"style":1963},[1932],[83,6244],{}," is the corresponding label. The supervised learning model attempts to find a function f that can predict the output Y from the input X:",[83,6247,6249],{"className":6248},[1809],[83,6250,6252,6276],{"className":6251},[1813],[83,6253,6255],{"className":6254},[1817],[1819,6256,6257],{"xmlns":1821,"display":1822},[1824,6258,6259,6273],{},[1827,6260,6261,6263,6265,6267,6270],{},[1840,6262,3162],{},[1834,6264,589],{},[1840,6266,2975],{},[1834,6268,6269],{},"→",[1840,6271,6272],{},"Y",[1863,6274,6275],{"encoding":1865},"f: X \\rightarrow Y",[83,6277,6279,6298,6317],{"className":6278,"ariaHidden":1871},[1870],[83,6280,6282,6285,6289,6292,6295],{"className":6281},[1875],[83,6283],{"className":6284,"style":1907},[1879],[83,6286,3162],{"className":6287,"style":6288},[1884,1914],"margin-right:0.1076em;",[83,6290],{"className":6291,"style":1893},[1892],[83,6293,589],{"className":6294},[1897],[83,6296],{"className":6297,"style":1893},[1892],[83,6299,6301,6304,6308,6311,6314],{"className":6300},[1875],[83,6302],{"className":6303,"style":2038},[1879],[83,6305,2975],{"className":6306,"style":6307},[1884,1914],"margin-right:0.0785em;",[83,6309],{"className":6310,"style":1893},[1892],[83,6312,6269],{"className":6313},[1897],[83,6315],{"className":6316,"style":1893},[1892],[83,6318,6320,6323],{"className":6319},[1875],[83,6321],{"className":6322,"style":2038},[1879],[83,6324,6272],{"className":6325,"style":1969},[1884,1914],[12,6327,6328],{},"Depending on the type of output, supervised learning can be divided into:",[1030,6330,6331,6337],{},[1033,6332,6333,6336],{},[40,6334,6335],{},"Classification",": When the output Y is a discrete category (that is, a categorical value). For example, classifying whether an image contains a cat or a dog, whether a number is even or odd, or whether an email is spam or not spam.",[1033,6338,6339,6342],{},[40,6340,6341],{},"Regression",": When the output Y is a continuous value (that is, a real number). For example, making predictions about future sales based on historical data, predicting the price of a house based on its features, or estimating the temperature of a city based on climatic factors.",[29,6344],{},[53,6346,6348],{"id":6347},"unsupervised-learning","Unsupervised Learning",[12,6350,6351,6352,6557],{},"In unsupervised learning, the model receives only the inputs X without associated labels: ",[83,6353,6355,6401],{"className":6354},[1813],[83,6356,6358],{"className":6357},[1817],[1819,6359,6360],{"xmlns":1821},[1824,6361,6362,6398],{},[1827,6363,6364,6366,6372,6374,6380,6382,6384,6386,6388,6390,6396],{},[1834,6365,3169],{"stretchy":5711},[1837,6367,6368,6370],{},[1840,6369,1311],{},[1844,6371,1855],{},[1834,6373,243],{"separator":1871},[1837,6375,6376,6378],{},[1840,6377,1311],{},[1844,6379,2096],{},[1834,6381,243],{"separator":1871},[1840,6383,133],{"mathvariant":648},[1840,6385,133],{"mathvariant":648},[1840,6387,133],{"mathvariant":648},[1834,6389,243],{"separator":1871},[1837,6391,6392,6394],{},[1840,6393,1311],{},[1840,6395,300],{},[1834,6397,3178],{"stretchy":5711},[1863,6399,6400],{"encoding":1865},"\\{x_1, x_2, ..., x_n\\}",[83,6402,6404],{"className":6403,"ariaHidden":1871},[1870],[83,6405,6407,6410,6413,6453,6456,6459,6499,6502,6505,6508,6511,6514,6554],{"className":6406},[1875],[83,6408],{"className":6409,"style":5792},[1879],[83,6411,3169],{"className":6412},[5796],[83,6414,6416,6419],{"className":6415},[1884],[83,6417,1311],{"className":6418},[1884,1914],[83,6420,6422],{"className":6421},[1919],[83,6423,6425,6445],{"className":6424},[1923,1924],[83,6426,6428,6442],{"className":6427},[1928],[83,6429,6431],{"className":6430,"style":1933},[1932],[83,6432,6433,6436],{"style":5818},[83,6434],{"className":6435,"style":1941},[1940],[83,6437,6439],{"className":6438},[1945,1946,1947,1948],[83,6440,1855],{"className":6441},[1884,1948],[83,6443,1956],{"className":6444},[1955],[83,6446,6448],{"className":6447},[1928],[83,6449,6451],{"className":6450,"style":1963},[1932],[83,6452],{},[83,6454,243],{"className":6455},[5489],[83,6457],{"className":6458,"style":5493},[1892],[83,6460,6462,6465],{"className":6461},[1884],[83,6463,1311],{"className":6464},[1884,1914],[83,6466,6468],{"className":6467},[1919],[83,6469,6471,6491],{"className":6470},[1923,1924],[83,6472,6474,6488],{"className":6473},[1928],[83,6475,6477],{"className":6476,"style":1933},[1932],[83,6478,6479,6482],{"style":5818},[83,6480],{"className":6481,"style":1941},[1940],[83,6483,6485],{"className":6484},[1945,1946,1947,1948],[83,6486,2096],{"className":6487},[1884,1948],[83,6489,1956],{"className":6490},[1955],[83,6492,6494],{"className":6493},[1928],[83,6495,6497],{"className":6496,"style":1963},[1932],[83,6498],{},[83,6500,243],{"className":6501},[5489],[83,6503],{"className":6504,"style":5493},[1892],[83,6506,5998],{"className":6507},[1884],[83,6509,243],{"className":6510},[5489],[83,6512],{"className":6513,"style":5493},[1892],[83,6515,6517,6520],{"className":6516},[1884],[83,6518,1311],{"className":6519},[1884,1914],[83,6521,6523],{"className":6522},[1919],[83,6524,6526,6546],{"className":6525},[1923,1924],[83,6527,6529,6543],{"className":6528},[1928],[83,6530,6532],{"className":6531,"style":6026},[1932],[83,6533,6534,6537],{"style":5818},[83,6535],{"className":6536,"style":1941},[1940],[83,6538,6540],{"className":6539},[1945,1946,1947,1948],[83,6541,300],{"className":6542},[1884,1914,1948],[83,6544,1956],{"className":6545},[1955],[83,6547,6549],{"className":6548},[1928],[83,6550,6552],{"className":6551,"style":1963},[1932],[83,6553],{},[83,6555,3178],{"className":6556},[5890],". The objective is to find underlying patterns or structures in the data.\nSome examples of unsupervised learning techniques include:",[1030,6559,6560,6566],{},[1033,6561,6562,6565],{},[40,6563,6564],{},"Clustering",": Grouping similar data points into clusters. For example, segmenting customers into groups based on their purchasing behaviors.",[1033,6567,6568,6571],{},[40,6569,6570],{},"Dimensionality Reduction",": Reducing the number of variables in a dataset while preserving as much information as possible. For example, using PCA (Principal Component Analysis) to visualize data in 2D or 3D.",[29,6573],{},[53,6575,6577],{"id":6576},"reinforcement-learning","Reinforcement Learning",[12,6579,6580],{},"Reinforcement learning is based on the idea that an agent learns to make decisions by interacting with an environment. The agent receives rewards or penalties based on the actions it takes, and its objective is to maximize the accumulated reward over time.\nIn this paradigm, the agent learns an action policy that allows it to make optimal decisions based on the current state of the environment. A classic example of reinforcement learning is the game of chess, where the agent learns to play better as it plays more games and receives feedback about its moves.",[1077,6582,6583,6589,6595,6601],{},[1033,6584,6585,6588],{},[40,6586,6587],{},"Agent",": The system that makes decisions.",[1033,6590,6591,6594],{},[40,6592,6593],{},"Environment",": The world with which the agent interacts.",[1033,6596,6597,6600],{},[40,6598,6599],{},"Reward",": The feedback that the agent receives after taking an action.",[1033,6602,6603,6606],{},[40,6604,6605],{},"Policy",": The strategy that the agent follows to make decisions.",[12,6608,6609],{},"Its applications include games, robotics, and recommendation systems.",[29,6611],{},[32,6613,6615],{"id":6614},"mathematical-foundations","Mathematical Foundations",[12,6617,6618,6619,6622,6623,133],{},"It is important to understand that machine learning is based on concepts from linear algebra, calculus, probability, and statistics. These fundamentals are essential for understanding how ",[40,6620,6621],{},"models work"," and how they are ",[40,6624,6625],{},"optimized",[53,6627,6341],{"id":6628},"regression",[12,6630,6631],{},"What is a regression problem? It is a type of problem where the objective is to predict a continuous value by finding the best line (or plane) that fits the data. We have already discussed application examples such as price calculation, sales forecasting, etc.",[12,6633,6634],{},"The simplest form of regression is linear regression, which can be mathematically expressed as:",[83,6636,6638],{"className":6637},[1809],[83,6639,6641,6718],{"className":6640},[1813],[83,6642,6644],{"className":6643},[1817],[1819,6645,6646],{"xmlns":1821,"display":1822},[1824,6647,6648,6715],{},[1827,6649,6650,6652,6654,6660,6662,6668,6674,6676,6682,6688,6690,6692,6694,6696,6698,6704,6710,6712],{},[1840,6651,3414],{},[1834,6653,216],{},[1837,6655,6656,6658],{},[1840,6657,1842],{},[1844,6659,398],{},[1834,6661,1848],{},[1837,6663,6664,6666],{},[1840,6665,1842],{},[1844,6667,1855],{},[1837,6669,6670,6672],{},[1840,6671,1311],{},[1844,6673,1855],{},[1834,6675,1848],{},[1837,6677,6678,6680],{},[1840,6679,1842],{},[1844,6681,2096],{},[1837,6683,6684,6686],{},[1840,6685,1311],{},[1844,6687,2096],{},[1834,6689,1848],{},[1840,6691,133],{"mathvariant":648},[1840,6693,133],{"mathvariant":648},[1840,6695,133],{"mathvariant":648},[1834,6697,1848],{},[1837,6699,6700,6702],{},[1840,6701,1842],{},[1840,6703,12],{},[1837,6705,6706,6708],{},[1840,6707,1311],{},[1840,6709,12],{},[1834,6711,1848],{},[1840,6713,6714],{},"ϵ",[1863,6716,6717],{"encoding":1865},"y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + ... + \\beta_p x_p + \\epsilon",[83,6719,6721,6739,6794,6889,6984,7003,7100],{"className":6720,"ariaHidden":1871},[1870],[83,6722,6724,6727,6730,6733,6736],{"className":6723},[1875],[83,6725],{"className":6726,"style":6204},[1879],[83,6728,3414],{"className":6729,"style":5851},[1884,1914],[83,6731],{"className":6732,"style":1893},[1892],[83,6734,216],{"className":6735},[1897],[83,6737],{"className":6738,"style":1893},[1892],[83,6740,6742,6745,6785,6788,6791],{"className":6741},[1875],[83,6743],{"className":6744,"style":1907},[1879],[83,6746,6748,6751],{"className":6747},[1884],[83,6749,1842],{"className":6750,"style":1915},[1884,1914],[83,6752,6754],{"className":6753},[1919],[83,6755,6757,6777],{"className":6756},[1923,1924],[83,6758,6760,6774],{"className":6759},[1928],[83,6761,6763],{"className":6762,"style":1933},[1932],[83,6764,6765,6768],{"style":1936},[83,6766],{"className":6767,"style":1941},[1940],[83,6769,6771],{"className":6770},[1945,1946,1947,1948],[83,6772,398],{"className":6773},[1884,1948],[83,6775,1956],{"className":6776},[1955],[83,6778,6780],{"className":6779},[1928],[83,6781,6783],{"className":6782,"style":1963},[1932],[83,6784],{},[83,6786],{"className":6787,"style":1969},[1892],[83,6789,1848],{"className":6790},[1973],[83,6792],{"className":6793,"style":1969},[1892],[83,6795,6797,6800,6840,6880,6883,6886],{"className":6796},[1875],[83,6798],{"className":6799,"style":1907},[1879],[83,6801,6803,6806],{"className":6802},[1884],[83,6804,1842],{"className":6805,"style":1915},[1884,1914],[83,6807,6809],{"className":6808},[1919],[83,6810,6812,6832],{"className":6811},[1923,1924],[83,6813,6815,6829],{"className":6814},[1928],[83,6816,6818],{"className":6817,"style":1933},[1932],[83,6819,6820,6823],{"style":1936},[83,6821],{"className":6822,"style":1941},[1940],[83,6824,6826],{"className":6825},[1945,1946,1947,1948],[83,6827,1855],{"className":6828},[1884,1948],[83,6830,1956],{"className":6831},[1955],[83,6833,6835],{"className":6834},[1928],[83,6836,6838],{"className":6837,"style":1963},[1932],[83,6839],{},[83,6841,6843,6846],{"className":6842},[1884],[83,6844,1311],{"className":6845},[1884,1914],[83,6847,6849],{"className":6848},[1919],[83,6850,6852,6872],{"className":6851},[1923,1924],[83,6853,6855,6869],{"className":6854},[1928],[83,6856,6858],{"className":6857,"style":1933},[1932],[83,6859,6860,6863],{"style":5818},[83,6861],{"className":6862,"style":1941},[1940],[83,6864,6866],{"className":6865},[1945,1946,1947,1948],[83,6867,1855],{"className":6868},[1884,1948],[83,6870,1956],{"className":6871},[1955],[83,6873,6875],{"className":6874},[1928],[83,6876,6878],{"className":6877,"style":1963},[1932],[83,6879],{},[83,6881],{"className":6882,"style":1969},[1892],[83,6884,1848],{"className":6885},[1973],[83,6887],{"className":6888,"style":1969},[1892],[83,6890,6892,6895,6935,6975,6978,6981],{"className":6891},[1875],[83,6893],{"className":6894,"style":1907},[1879],[83,6896,6898,6901],{"className":6897},[1884],[83,6899,1842],{"className":6900,"style":1915},[1884,1914],[83,6902,6904],{"className":6903},[1919],[83,6905,6907,6927],{"className":6906},[1923,1924],[83,6908,6910,6924],{"className":6909},[1928],[83,6911,6913],{"className":6912,"style":1933},[1932],[83,6914,6915,6918],{"style":1936},[83,6916],{"className":6917,"style":1941},[1940],[83,6919,6921],{"className":6920},[1945,1946,1947,1948],[83,6922,2096],{"className":6923},[1884,1948],[83,6925,1956],{"className":6926},[1955],[83,6928,6930],{"className":6929},[1928],[83,6931,6933],{"className":6932,"style":1963},[1932],[83,6934],{},[83,6936,6938,6941],{"className":6937},[1884],[83,6939,1311],{"className":6940},[1884,1914],[83,6942,6944],{"className":6943},[1919],[83,6945,6947,6967],{"className":6946},[1923,1924],[83,6948,6950,6964],{"className":6949},[1928],[83,6951,6953],{"className":6952,"style":1933},[1932],[83,6954,6955,6958],{"style":5818},[83,6956],{"className":6957,"style":1941},[1940],[83,6959,6961],{"className":6960},[1945,1946,1947,1948],[83,6962,2096],{"className":6963},[1884,1948],[83,6965,1956],{"className":6966},[1955],[83,6968,6970],{"className":6969},[1928],[83,6971,6973],{"className":6972,"style":1963},[1932],[83,6974],{},[83,6976],{"className":6977,"style":1969},[1892],[83,6979,1848],{"className":6980},[1973],[83,6982],{"className":6983,"style":1969},[1892],[83,6985,6987,6991,6994,6997,7000],{"className":6986},[1875],[83,6988],{"className":6989,"style":6990},[1879],"height:0.6667em;vertical-align:-0.0833em;",[83,6992,5998],{"className":6993},[1884],[83,6995],{"className":6996,"style":1969},[1892],[83,6998,1848],{"className":6999},[1973],[83,7001],{"className":7002,"style":1969},[1892],[83,7004,7006,7010,7051,7091,7094,7097],{"className":7005},[1875],[83,7007],{"className":7008,"style":7009},[1879],"height:0.9805em;vertical-align:-0.2861em;",[83,7011,7013,7016],{"className":7012},[1884],[83,7014,1842],{"className":7015,"style":1915},[1884,1914],[83,7017,7019],{"className":7018},[1919],[83,7020,7022,7042],{"className":7021},[1923,1924],[83,7023,7025,7039],{"className":7024},[1928],[83,7026,7028],{"className":7027,"style":6026},[1932],[83,7029,7030,7033],{"style":1936},[83,7031],{"className":7032,"style":1941},[1940],[83,7034,7036],{"className":7035},[1945,1946,1947,1948],[83,7037,12],{"className":7038},[1884,1914,1948],[83,7040,1956],{"className":7041},[1955],[83,7043,7045],{"className":7044},[1928],[83,7046,7049],{"className":7047,"style":7048},[1932],"height:0.2861em;",[83,7050],{},[83,7052,7054,7057],{"className":7053},[1884],[83,7055,1311],{"className":7056},[1884,1914],[83,7058,7060],{"className":7059},[1919],[83,7061,7063,7083],{"className":7062},[1923,1924],[83,7064,7066,7080],{"className":7065},[1928],[83,7067,7069],{"className":7068,"style":6026},[1932],[83,7070,7071,7074],{"style":5818},[83,7072],{"className":7073,"style":1941},[1940],[83,7075,7077],{"className":7076},[1945,1946,1947,1948],[83,7078,12],{"className":7079},[1884,1914,1948],[83,7081,1956],{"className":7082},[1955],[83,7084,7086],{"className":7085},[1928],[83,7087,7089],{"className":7088,"style":7048},[1932],[83,7090],{},[83,7092],{"className":7093,"style":1969},[1892],[83,7095,1848],{"className":7096},[1973],[83,7098],{"className":7099,"style":1969},[1892],[83,7101,7103,7107],{"className":7102},[1875],[83,7104],{"className":7105,"style":7106},[1879],"height:0.4306em;",[83,7108,6714],{"className":7109},[1884,1914],[12,7111,7112],{},"Where:",[1030,7114,7115,7146,7345,7476,7674],{},[1033,7116,7117,7145],{},[83,7118,7120,7133],{"className":7119},[1813],[83,7121,7123],{"className":7122},[1817],[1819,7124,7125],{"xmlns":1821},[1824,7126,7127,7131],{},[1827,7128,7129],{},[1840,7130,3414],{},[1863,7132,3414],{"encoding":1865},[83,7134,7136],{"className":7135,"ariaHidden":1871},[1870],[83,7137,7139,7142],{"className":7138},[1875],[83,7140],{"className":7141,"style":6204},[1879],[83,7143,3414],{"className":7144,"style":5851},[1884,1914]," is the dependent variable (what we want to predict).",[1033,7147,7148,7344],{},[83,7149,7151,7193],{"className":7150},[1813],[83,7152,7154],{"className":7153},[1817],[1819,7155,7156],{"xmlns":1821},[1824,7157,7158,7190],{},[1827,7159,7160,7166,7168,7174,7176,7178,7180,7182,7184],{},[1837,7161,7162,7164],{},[1840,7163,1311],{},[1844,7165,1855],{},[1834,7167,243],{"separator":1871},[1837,7169,7170,7172],{},[1840,7171,1311],{},[1844,7173,2096],{},[1834,7175,243],{"separator":1871},[1840,7177,133],{"mathvariant":648},[1840,7179,133],{"mathvariant":648},[1840,7181,133],{"mathvariant":648},[1834,7183,243],{"separator":1871},[1837,7185,7186,7188],{},[1840,7187,1311],{},[1840,7189,12],{},[1863,7191,7192],{"encoding":1865},"x_1, x_2, ..., x_p",[83,7194,7196],{"className":7195,"ariaHidden":1871},[1870],[83,7197,7199,7203,7243,7246,7249,7289,7292,7295,7298,7301,7304],{"className":7198},[1875],[83,7200],{"className":7201,"style":7202},[1879],"height:0.7167em;vertical-align:-0.2861em;",[83,7204,7206,7209],{"className":7205},[1884],[83,7207,1311],{"className":7208},[1884,1914],[83,7210,7212],{"className":7211},[1919],[83,7213,7215,7235],{"className":7214},[1923,1924],[83,7216,7218,7232],{"className":7217},[1928],[83,7219,7221],{"className":7220,"style":1933},[1932],[83,7222,7223,7226],{"style":5818},[83,7224],{"className":7225,"style":1941},[1940],[83,7227,7229],{"className":7228},[1945,1946,1947,1948],[83,7230,1855],{"className":7231},[1884,1948],[83,7233,1956],{"className":7234},[1955],[83,7236,7238],{"className":7237},[1928],[83,7239,7241],{"className":7240,"style":1963},[1932],[83,7242],{},[83,7244,243],{"className":7245},[5489],[83,7247],{"className":7248,"style":5493},[1892],[83,7250,7252,7255],{"className":7251},[1884],[83,7253,1311],{"className":7254},[1884,1914],[83,7256,7258],{"className":7257},[1919],[83,7259,7261,7281],{"className":7260},[1923,1924],[83,7262,7264,7278],{"className":7263},[1928],[83,7265,7267],{"className":7266,"style":1933},[1932],[83,7268,7269,7272],{"style":5818},[83,7270],{"className":7271,"style":1941},[1940],[83,7273,7275],{"className":7274},[1945,1946,1947,1948],[83,7276,2096],{"className":7277},[1884,1948],[83,7279,1956],{"className":7280},[1955],[83,7282,7284],{"className":7283},[1928],[83,7285,7287],{"className":7286,"style":1963},[1932],[83,7288],{},[83,7290,243],{"className":7291},[5489],[83,7293],{"className":7294,"style":5493},[1892],[83,7296,5998],{"className":7297},[1884],[83,7299,243],{"className":7300},[5489],[83,7302],{"className":7303,"style":5493},[1892],[83,7305,7307,7310],{"className":7306},[1884],[83,7308,1311],{"className":7309},[1884,1914],[83,7311,7313],{"className":7312},[1919],[83,7314,7316,7336],{"className":7315},[1923,1924],[83,7317,7319,7333],{"className":7318},[1928],[83,7320,7322],{"className":7321,"style":6026},[1932],[83,7323,7324,7327],{"style":5818},[83,7325],{"className":7326,"style":1941},[1940],[83,7328,7330],{"className":7329},[1945,1946,1947,1948],[83,7331,12],{"className":7332},[1884,1914,1948],[83,7334,1956],{"className":7335},[1955],[83,7337,7339],{"className":7338},[1928],[83,7340,7342],{"className":7341,"style":7048},[1932],[83,7343],{}," are the independent variables (the features).",[1033,7346,7347,7417,7418,7446,7447,7475],{},[83,7348,7350,7368],{"className":7349},[1813],[83,7351,7353],{"className":7352},[1817],[1819,7354,7355],{"xmlns":1821},[1824,7356,7357,7365],{},[1827,7358,7359],{},[1837,7360,7361,7363],{},[1840,7362,1842],{},[1844,7364,398],{},[1863,7366,7367],{"encoding":1865},"\\beta_0",[83,7369,7371],{"className":7370,"ariaHidden":1871},[1870],[83,7372,7374,7377],{"className":7373},[1875],[83,7375],{"className":7376,"style":1907},[1879],[83,7378,7380,7383],{"className":7379},[1884],[83,7381,1842],{"className":7382,"style":1915},[1884,1914],[83,7384,7386],{"className":7385},[1919],[83,7387,7389,7409],{"className":7388},[1923,1924],[83,7390,7392,7406],{"className":7391},[1928],[83,7393,7395],{"className":7394,"style":1933},[1932],[83,7396,7397,7400],{"style":1936},[83,7398],{"className":7399,"style":1941},[1940],[83,7401,7403],{"className":7402},[1945,1946,1947,1948],[83,7404,398],{"className":7405},[1884,1948],[83,7407,1956],{"className":7408},[1955],[83,7410,7412],{"className":7411},[1928],[83,7413,7415],{"className":7414,"style":1963},[1932],[83,7416],{}," is the intercept (the value of ",[83,7419,7421,7434],{"className":7420},[1813],[83,7422,7424],{"className":7423},[1817],[1819,7425,7426],{"xmlns":1821},[1824,7427,7428,7432],{},[1827,7429,7430],{},[1840,7431,3414],{},[1863,7433,3414],{"encoding":1865},[83,7435,7437],{"className":7436,"ariaHidden":1871},[1870],[83,7438,7440,7443],{"className":7439},[1875],[83,7441],{"className":7442,"style":6204},[1879],[83,7444,3414],{"className":7445,"style":5851},[1884,1914]," when all ",[83,7448,7450,7463],{"className":7449},[1813],[83,7451,7453],{"className":7452},[1817],[1819,7454,7455],{"xmlns":1821},[1824,7456,7457,7461],{},[1827,7458,7459],{},[1840,7460,1311],{},[1863,7462,1311],{"encoding":1865},[83,7464,7466],{"className":7465,"ariaHidden":1871},[1870],[83,7467,7469,7472],{"className":7468},[1875],[83,7470],{"className":7471,"style":7106},[1879],[83,7473,1311],{"className":7474},[1884,1914]," are 0).",[1033,7477,7478,7673],{},[83,7479,7481,7523],{"className":7480},[1813],[83,7482,7484],{"className":7483},[1817],[1819,7485,7486],{"xmlns":1821},[1824,7487,7488,7520],{},[1827,7489,7490,7496,7498,7504,7506,7508,7510,7512,7514],{},[1837,7491,7492,7494],{},[1840,7493,1842],{},[1844,7495,1855],{},[1834,7497,243],{"separator":1871},[1837,7499,7500,7502],{},[1840,7501,1842],{},[1844,7503,2096],{},[1834,7505,243],{"separator":1871},[1840,7507,133],{"mathvariant":648},[1840,7509,133],{"mathvariant":648},[1840,7511,133],{"mathvariant":648},[1834,7513,243],{"separator":1871},[1837,7515,7516,7518],{},[1840,7517,1842],{},[1840,7519,12],{},[1863,7521,7522],{"encoding":1865},"\\beta_1, \\beta_2, ..., \\beta_p",[83,7524,7526],{"className":7525,"ariaHidden":1871},[1870],[83,7527,7529,7532,7572,7575,7578,7618,7621,7624,7627,7630,7633],{"className":7528},[1875],[83,7530],{"className":7531,"style":7009},[1879],[83,7533,7535,7538],{"className":7534},[1884],[83,7536,1842],{"className":7537,"style":1915},[1884,1914],[83,7539,7541],{"className":7540},[1919],[83,7542,7544,7564],{"className":7543},[1923,1924],[83,7545,7547,7561],{"className":7546},[1928],[83,7548,7550],{"className":7549,"style":1933},[1932],[83,7551,7552,7555],{"style":1936},[83,7553],{"className":7554,"style":1941},[1940],[83,7556,7558],{"className":7557},[1945,1946,1947,1948],[83,7559,1855],{"className":7560},[1884,1948],[83,7562,1956],{"className":7563},[1955],[83,7565,7567],{"className":7566},[1928],[83,7568,7570],{"className":7569,"style":1963},[1932],[83,7571],{},[83,7573,243],{"className":7574},[5489],[83,7576],{"className":7577,"style":5493},[1892],[83,7579,7581,7584],{"className":7580},[1884],[83,7582,1842],{"className":7583,"style":1915},[1884,1914],[83,7585,7587],{"className":7586},[1919],[83,7588,7590,7610],{"className":7589},[1923,1924],[83,7591,7593,7607],{"className":7592},[1928],[83,7594,7596],{"className":7595,"style":1933},[1932],[83,7597,7598,7601],{"style":1936},[83,7599],{"className":7600,"style":1941},[1940],[83,7602,7604],{"className":7603},[1945,1946,1947,1948],[83,7605,2096],{"className":7606},[1884,1948],[83,7608,1956],{"className":7609},[1955],[83,7611,7613],{"className":7612},[1928],[83,7614,7616],{"className":7615,"style":1963},[1932],[83,7617],{},[83,7619,243],{"className":7620},[5489],[83,7622],{"className":7623,"style":5493},[1892],[83,7625,5998],{"className":7626},[1884],[83,7628,243],{"className":7629},[5489],[83,7631],{"className":7632,"style":5493},[1892],[83,7634,7636,7639],{"className":7635},[1884],[83,7637,1842],{"className":7638,"style":1915},[1884,1914],[83,7640,7642],{"className":7641},[1919],[83,7643,7645,7665],{"className":7644},[1923,1924],[83,7646,7648,7662],{"className":7647},[1928],[83,7649,7651],{"className":7650,"style":6026},[1932],[83,7652,7653,7656],{"style":1936},[83,7654],{"className":7655,"style":1941},[1940],[83,7657,7659],{"className":7658},[1945,1946,1947,1948],[83,7660,12],{"className":7661},[1884,1914,1948],[83,7663,1956],{"className":7664},[1955],[83,7666,7668],{"className":7667},[1928],[83,7669,7671],{"className":7670,"style":7048},[1932],[83,7672],{}," are the coefficients that represent the influence of each feature on the dependent variable.",[1033,7675,7676,7705,7706,7734],{},[83,7677,7679,7693],{"className":7678},[1813],[83,7680,7682],{"className":7681},[1817],[1819,7683,7684],{"xmlns":1821},[1824,7685,7686,7690],{},[1827,7687,7688],{},[1840,7689,6714],{},[1863,7691,7692],{"encoding":1865},"\\epsilon",[83,7694,7696],{"className":7695,"ariaHidden":1871},[1870],[83,7697,7699,7702],{"className":7698},[1875],[83,7700],{"className":7701,"style":7106},[1879],[83,7703,6714],{"className":7704},[1884,1914]," is the error or noise value, which represents the variability not explained by the model, that is, what affects ",[83,7707,7709,7722],{"className":7708},[1813],[83,7710,7712],{"className":7711},[1817],[1819,7713,7714],{"xmlns":1821},[1824,7715,7716,7720],{},[1827,7717,7718],{},[1840,7719,3414],{},[1863,7721,3414],{"encoding":1865},[83,7723,7725],{"className":7724,"ariaHidden":1871},[1870],[83,7726,7728,7731],{"className":7727},[1875],[83,7729],{"className":7730,"style":6204},[1879],[83,7732,3414],{"className":7733,"style":5851},[1884,1914]," but is not included in the independent variables.",[12,7736,7737,7738,7767,7768,7796],{},"The objective of the regression model is to find the values of the coefficients ",[83,7739,7741,7755],{"className":7740},[1813],[83,7742,7744],{"className":7743},[1817],[1819,7745,7746],{"xmlns":1821},[1824,7747,7748,7752],{},[1827,7749,7750],{},[1840,7751,1842],{},[1863,7753,7754],{"encoding":1865},"\\beta",[83,7756,7758],{"className":7757,"ariaHidden":1871},[1870],[83,7759,7761,7764],{"className":7760},[1875],[83,7762],{"className":7763,"style":1907},[1879],[83,7765,1842],{"className":7766,"style":1915},[1884,1914]," that minimize the difference between the model's predictions and the real values of ",[83,7769,7771,7784],{"className":7770},[1813],[83,7772,7774],{"className":7773},[1817],[1819,7775,7776],{"xmlns":1821},[1824,7777,7778,7782],{},[1827,7779,7780],{},[1840,7781,3414],{},[1863,7783,3414],{"encoding":1865},[83,7785,7787],{"className":7786,"ariaHidden":1871},[1870],[83,7788,7790,7793],{"className":7789},[1875],[83,7791],{"className":7792,"style":6204},[1879],[83,7794,3414],{"className":7795,"style":5851},[1884,1914],". This can be achieved using techniques such as the least squares method.",[12,7798,7799,7800,7803,7804,7842,7843,7876,7877,7907],{},"The ",[40,7801,7802],{},"intercept"," is represented as the first element of the coefficient vector ",[83,7805,7807,7822],{"className":7806},[1813],[83,7808,7810],{"className":7809},[1817],[1819,7811,7812],{"xmlns":1821},[1824,7813,7814,7819],{},[1827,7815,7816],{},[1840,7817,1842],{"mathvariant":7818},"bold-italic",[1863,7820,7821],{"encoding":1865},"\\boldsymbol{\\beta}",[83,7823,7825],{"className":7824,"ariaHidden":1871},[1870],[83,7826,7828,7831],{"className":7827},[1875],[83,7829],{"className":7830,"style":1907},[1879],[83,7832,7834],{"className":7833},[1884],[83,7835,7837],{"className":7836},[1884],[83,7838,1842],{"className":7839,"style":7841},[1884,7840],"boldsymbol","margin-right:0.034em;",", and it is the value of ",[83,7844,7846,7861],{"className":7845},[1813],[83,7847,7849],{"className":7848},[1817],[1819,7850,7851],{"xmlns":1821},[1824,7852,7853,7858],{},[1827,7854,7855],{},[1840,7856,3414],{"mathvariant":7857},"bold",[1863,7859,7860],{"encoding":1865},"\\mathbf{y}",[83,7862,7864],{"className":7863,"ariaHidden":1871},[1870],[83,7865,7867,7871],{"className":7866},[1875],[83,7868],{"className":7869,"style":7870},[1879],"height:0.6389em;vertical-align:-0.1944em;",[83,7872,3414],{"className":7873,"style":7875},[1884,7874],"mathbf","margin-right:0.016em;"," when all the independent variables in ",[83,7878,7880,7894],{"className":7879},[1813],[83,7881,7883],{"className":7882},[1817],[1819,7884,7885],{"xmlns":1821},[1824,7886,7887,7891],{},[1827,7888,7889],{},[1840,7890,2975],{"mathvariant":7857},[1863,7892,7893],{"encoding":1865},"\\mathbf{X}",[83,7895,7897],{"className":7896,"ariaHidden":1871},[1870],[83,7898,7900,7904],{"className":7899},[1875],[83,7901],{"className":7902,"style":7903},[1879],"height:0.6861em;",[83,7905,2975],{"className":7906},[1884,7874]," are zero, that is, it represents the point where the regression line crosses the Y-axis.",[12,7909,7799,7910,7913,7914,7948,7949,7977,7978,8006],{},[40,7911,7912],{},"slope"," is represented by the remaining coefficients in the vector ",[83,7915,7917,7930],{"className":7916},[1813],[83,7918,7920],{"className":7919},[1817],[1819,7921,7922],{"xmlns":1821},[1824,7923,7924,7928],{},[1827,7925,7926],{},[1840,7927,1842],{"mathvariant":7818},[1863,7929,7821],{"encoding":1865},[83,7931,7933],{"className":7932,"ariaHidden":1871},[1870],[83,7934,7936,7939],{"className":7935},[1875],[83,7937],{"className":7938,"style":1907},[1879],[83,7940,7942],{"className":7941},[1884],[83,7943,7945],{"className":7944},[1884],[83,7946,1842],{"className":7947,"style":7841},[1884,7840],", and each coefficient indicates the amount of change in the dependent variable ",[83,7950,7952,7965],{"className":7951},[1813],[83,7953,7955],{"className":7954},[1817],[1819,7956,7957],{"xmlns":1821},[1824,7958,7959,7963],{},[1827,7960,7961],{},[1840,7962,3414],{"mathvariant":7857},[1863,7964,7860],{"encoding":1865},[83,7966,7968],{"className":7967,"ariaHidden":1871},[1870],[83,7969,7971,7974],{"className":7970},[1875],[83,7972],{"className":7973,"style":7870},[1879],[83,7975,3414],{"className":7976,"style":7875},[1884,7874]," for each unit change in the corresponding independent variable in ",[83,7979,7981,7994],{"className":7980},[1813],[83,7982,7984],{"className":7983},[1817],[1819,7985,7986],{"xmlns":1821},[1824,7987,7988,7992],{},[1827,7989,7990],{},[1840,7991,2975],{"mathvariant":7857},[1863,7993,7893],{"encoding":1865},[83,7995,7997],{"className":7996,"ariaHidden":1871},[1870],[83,7998,8000,8003],{"className":7999},[1875],[83,8001],{"className":8002,"style":7903},[1879],[83,8004,2975],{"className":8005},[1884,7874],", keeping all other independent variables constant.\nGraphically we can see it as follows:",[12,8008,8009,8013],{},[1554,8010],{"alt":8011,"src":8012},"Linear regression graph","\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations\u002Fshared\u002Fregression-model.webp",[1559,8014,8015],{},"Linear Regression Graph",[12,8017,8018],{},"Each black point represents a training data point, and the red line represents the model.",[12,8020,8021,8022,8025,8026,8060,8061,8089],{},"The key point here is to understand that ",[40,8023,8024],{},"the main objective"," is to find the values of the coefficients ",[83,8027,8029,8042],{"className":8028},[1813],[83,8030,8032],{"className":8031},[1817],[1819,8033,8034],{"xmlns":1821},[1824,8035,8036,8040],{},[1827,8037,8038],{},[1840,8039,1842],{"mathvariant":7818},[1863,8041,7821],{"encoding":1865},[83,8043,8045],{"className":8044,"ariaHidden":1871},[1870],[83,8046,8048,8051],{"className":8047},[1875],[83,8049],{"className":8050,"style":1907},[1879],[83,8052,8054],{"className":8053},[1884],[83,8055,8057],{"className":8056},[1884],[83,8058,1842],{"className":8059,"style":7841},[1884,7840]," that make the predictions ",[83,8062,8064,8077],{"className":8063},[1813],[83,8065,8067],{"className":8066},[1817],[1819,8068,8069],{"xmlns":1821},[1824,8070,8071,8075],{},[1827,8072,8073],{},[1840,8074,3414],{"mathvariant":7857},[1863,8076,7860],{"encoding":1865},[83,8078,8080],{"className":8079,"ariaHidden":1871},[1870],[83,8081,8083,8086],{"className":8082},[1875],[83,8084],{"className":8085,"style":7870},[1879],[83,8087,3414],{"className":8088,"style":7875},[1884,7874]," (the red line) as close as possible to the actual values.",[12,8091,8092,8093,8129],{},"That is, we do not seek to predict with perfect accuracy, as (in reality) there will always be some error or difference between what the model predicts and what actually happens. The term ",[83,8094,8096,8110],{"className":8095},[1813],[83,8097,8099],{"className":8098},[1817],[1819,8100,8101],{"xmlns":1821},[1824,8102,8103,8107],{},[1827,8104,8105],{},[1840,8106,6714],{"mathvariant":7818},[1863,8108,8109],{"encoding":1865},"\\boldsymbol{\\epsilon}",[83,8111,8113],{"className":8112,"ariaHidden":1871},[1870],[83,8114,8116,8120],{"className":8115},[1875],[83,8117],{"className":8118,"style":8119},[1879],"height:0.4444em;",[83,8121,8123],{"className":8122},[1884],[83,8124,8126],{"className":8125},[1884],[83,8127,6714],{"className":8128},[1884,7840]," is the difference between the values predicted by the model and the actual values:",[83,8131,8133],{"className":8132},[1809],[83,8134,8136,8178],{"className":8135},[1813],[83,8137,8139],{"className":8138},[1817],[1819,8140,8141],{"xmlns":1821,"display":1822},[1824,8142,8143,8175],{},[1827,8144,8145,8153,8155,8161,8163],{},[1840,8146,8147],{},[1837,8148,8149,8151],{},[1840,8150,6714],{"mathvariant":7818},[1840,8152,6118],{"mathvariant":7818},[1834,8154,216],{},[1837,8156,8157,8159],{},[1840,8158,3414],{"mathvariant":7857},[1840,8160,6118],{"mathvariant":7857},[1834,8162,5469],{},[8164,8165,8166,8172],"mover",{"accent":1871},[1837,8167,8168,8170],{},[1840,8169,3414],{"mathvariant":7857},[1840,8171,6118],{"mathvariant":7857},[1834,8173,8174],{},"^",[1863,8176,8177],{"encoding":1865},"\\boldsymbol{\\epsilon _i} = \\mathbf{y_i} - \\hat{\\mathbf{y_i}}",[83,8179,8181,8244,8302],{"className":8180,"ariaHidden":1871},[1870],[83,8182,8184,8188,8235,8238,8241],{"className":8183},[1875],[83,8185],{"className":8186,"style":8187},[1879],"height:0.5944em;vertical-align:-0.15em;",[83,8189,8191],{"className":8190},[1884],[83,8192,8194],{"className":8193},[1884],[83,8195,8197,8200],{"className":8196},[1884],[83,8198,6714],{"className":8199},[1884,7840],[83,8201,8203],{"className":8202},[1919],[83,8204,8206,8227],{"className":8205},[1923,1924],[83,8207,8209,8224],{"className":8208},[1928],[83,8210,8213],{"className":8211,"style":8212},[1932],"height:0.3353em;",[83,8214,8215,8218],{"style":5818},[83,8216],{"className":8217,"style":1941},[1940],[83,8219,8221],{"className":8220},[1945,1946,1947,1948],[83,8222,6118],{"className":8223},[1884,7840,1948],[83,8225,1956],{"className":8226},[1955],[83,8228,8230],{"className":8229},[1928],[83,8231,8233],{"className":8232,"style":1963},[1932],[83,8234],{},[83,8236],{"className":8237,"style":1893},[1892],[83,8239,216],{"className":8240},[1897],[83,8242],{"className":8243,"style":1893},[1892],[83,8245,8247,8251,8293,8296,8299],{"className":8246},[1875],[83,8248],{"className":8249,"style":8250},[1879],"height:0.7778em;vertical-align:-0.1944em;",[83,8252,8254,8257],{"className":8253},[1884],[83,8255,3414],{"className":8256,"style":7875},[1884,7874],[83,8258,8260],{"className":8259},[1919],[83,8261,8263,8285],{"className":8262},[1923,1924],[83,8264,8266,8282],{"className":8265},[1928],[83,8267,8270],{"className":8268,"style":8269},[1932],"height:0.3361em;",[83,8271,8273,8276],{"style":8272},"top:-2.55em;margin-left:-0.016em;margin-right:0.05em;",[83,8274],{"className":8275,"style":1941},[1940],[83,8277,8279],{"className":8278},[1945,1946,1947,1948],[83,8280,6118],{"className":8281},[1884,7874,1948],[83,8283,1956],{"className":8284},[1955],[83,8286,8288],{"className":8287},[1928],[83,8289,8291],{"className":8290,"style":1963},[1932],[83,8292],{},[83,8294],{"className":8295,"style":1969},[1892],[83,8297,5469],{"className":8298},[1973],[83,8300],{"className":8301,"style":1969},[1892],[83,8303,8305,8309],{"className":8304},[1875],[83,8306],{"className":8307,"style":8308},[1879],"height:0.9023em;vertical-align:-0.1944em;",[83,8310,8313],{"className":8311},[1884,8312],"accent",[83,8314,8316,8387],{"className":8315},[1923,1924],[83,8317,8319,8384],{"className":8318},[1928],[83,8320,8323,8370],{"className":8321,"style":8322},[1932],"height:0.7079em;",[83,8324,8326,8330],{"style":8325},"top:-3em;",[83,8327],{"className":8328,"style":8329},[1940],"height:3em;",[83,8331,8333,8336],{"className":8332},[1884],[83,8334,3414],{"className":8335,"style":7875},[1884,7874],[83,8337,8339],{"className":8338},[1919],[83,8340,8342,8362],{"className":8341},[1923,1924],[83,8343,8345,8359],{"className":8344},[1928],[83,8346,8348],{"className":8347,"style":8269},[1932],[83,8349,8350,8353],{"style":8272},[83,8351],{"className":8352,"style":1941},[1940],[83,8354,8356],{"className":8355},[1945,1946,1947,1948],[83,8357,6118],{"className":8358},[1884,7874,1948],[83,8360,1956],{"className":8361},[1955],[83,8363,8365],{"className":8364},[1928],[83,8366,8368],{"className":8367,"style":1963},[1932],[83,8369],{},[83,8371,8373,8376],{"style":8372},"top:-3.0134em;",[83,8374],{"className":8375,"style":8329},[1940],[83,8377,8381],{"className":8378,"style":8380},[8379],"accent-body","left:-0.25em;",[83,8382,8174],{"className":8383},[1884],[83,8385,1956],{"className":8386},[1955],[83,8388,8390],{"className":8389},[1928],[83,8391,8394],{"className":8392,"style":8393},[1932],"height:0.1944em;",[83,8395],{},[12,8397,8398],{},"Which can also be expressed as:",[83,8400,8402],{"className":8401},[1809],[83,8403,8405,8461],{"className":8404},[1813],[83,8406,8408],{"className":8407},[1817],[1819,8409,8410],{"xmlns":1821,"display":1822},[1824,8411,8412,8458],{},[1827,8413,8414,8422,8424,8430,8432,8434,8442,8444,8450,8456],{},[1840,8415,8416],{},[1837,8417,8418,8420],{},[1840,8419,6714],{"mathvariant":7818},[1840,8421,6118],{"mathvariant":7818},[1834,8423,216],{},[1837,8425,8426,8428],{},[1840,8427,3414],{"mathvariant":7857},[1840,8429,6118],{"mathvariant":7857},[1834,8431,5469],{},[1834,8433,180],{"stretchy":5711},[1840,8435,8436],{},[1837,8437,8438,8440],{},[1840,8439,1842],{"mathvariant":7818},[1844,8441,398],{"mathvariant":7857},[1834,8443,1848],{},[1837,8445,8446,8448],{},[1840,8447,1842],{},[1844,8449,1855],{},[1837,8451,8452,8454],{},[1840,8453,1311],{},[1840,8455,6118],{},[1834,8457,505],{"stretchy":5711},[1863,8459,8460],{"encoding":1865},"\\boldsymbol{\\epsilon _i} = \\mathbf{y_i} - (\\boldsymbol{\\beta_0} + \\beta_1 x_{i})",[83,8462,8464,8525,8580,8645],{"className":8463,"ariaHidden":1871},[1870],[83,8465,8467,8470,8516,8519,8522],{"className":8466},[1875],[83,8468],{"className":8469,"style":8187},[1879],[83,8471,8473],{"className":8472},[1884],[83,8474,8476],{"className":8475},[1884],[83,8477,8479,8482],{"className":8478},[1884],[83,8480,6714],{"className":8481},[1884,7840],[83,8483,8485],{"className":8484},[1919],[83,8486,8488,8508],{"className":8487},[1923,1924],[83,8489,8491,8505],{"className":8490},[1928],[83,8492,8494],{"className":8493,"style":8212},[1932],[83,8495,8496,8499],{"style":5818},[83,8497],{"className":8498,"style":1941},[1940],[83,8500,8502],{"className":8501},[1945,1946,1947,1948],[83,8503,6118],{"className":8504},[1884,7840,1948],[83,8506,1956],{"className":8507},[1955],[83,8509,8511],{"className":8510},[1928],[83,8512,8514],{"className":8513,"style":1963},[1932],[83,8515],{},[83,8517],{"className":8518,"style":1893},[1892],[83,8520,216],{"className":8521},[1897],[83,8523],{"className":8524,"style":1893},[1892],[83,8526,8528,8531,8571,8574,8577],{"className":8527},[1875],[83,8529],{"className":8530,"style":8250},[1879],[83,8532,8534,8537],{"className":8533},[1884],[83,8535,3414],{"className":8536,"style":7875},[1884,7874],[83,8538,8540],{"className":8539},[1919],[83,8541,8543,8563],{"className":8542},[1923,1924],[83,8544,8546,8560],{"className":8545},[1928],[83,8547,8549],{"className":8548,"style":8269},[1932],[83,8550,8551,8554],{"style":8272},[83,8552],{"className":8553,"style":1941},[1940],[83,8555,8557],{"className":8556},[1945,1946,1947,1948],[83,8558,6118],{"className":8559},[1884,7874,1948],[83,8561,1956],{"className":8562},[1955],[83,8564,8566],{"className":8565},[1928],[83,8567,8569],{"className":8568,"style":1963},[1932],[83,8570],{},[83,8572],{"className":8573,"style":1969},[1892],[83,8575,5469],{"className":8576},[1973],[83,8578],{"className":8579,"style":1969},[1892],[83,8581,8583,8586,8589,8636,8639,8642],{"className":8582},[1875],[83,8584],{"className":8585,"style":5792},[1879],[83,8587,180],{"className":8588},[5796],[83,8590,8592],{"className":8591},[1884],[83,8593,8595],{"className":8594},[1884],[83,8596,8598,8601],{"className":8597},[1884],[83,8599,1842],{"className":8600,"style":7841},[1884,7840],[83,8602,8604],{"className":8603},[1919],[83,8605,8607,8628],{"className":8606},[1923,1924],[83,8608,8610,8625],{"className":8609},[1928],[83,8611,8613],{"className":8612,"style":1933},[1932],[83,8614,8616,8619],{"style":8615},"top:-2.55em;margin-left:-0.034em;margin-right:0.05em;",[83,8617],{"className":8618,"style":1941},[1940],[83,8620,8622],{"className":8621},[1945,1946,1947,1948],[83,8623,398],{"className":8624},[1884,7874,1948],[83,8626,1956],{"className":8627},[1955],[83,8629,8631],{"className":8630},[1928],[83,8632,8634],{"className":8633,"style":1963},[1932],[83,8635],{},[83,8637],{"className":8638,"style":1969},[1892],[83,8640,1848],{"className":8641},[1973],[83,8643],{"className":8644,"style":1969},[1892],[83,8646,8648,8651,8691,8734],{"className":8647},[1875],[83,8649],{"className":8650,"style":5792},[1879],[83,8652,8654,8657],{"className":8653},[1884],[83,8655,1842],{"className":8656,"style":1915},[1884,1914],[83,8658,8660],{"className":8659},[1919],[83,8661,8663,8683],{"className":8662},[1923,1924],[83,8664,8666,8680],{"className":8665},[1928],[83,8667,8669],{"className":8668,"style":1933},[1932],[83,8670,8671,8674],{"style":1936},[83,8672],{"className":8673,"style":1941},[1940],[83,8675,8677],{"className":8676},[1945,1946,1947,1948],[83,8678,1855],{"className":8679},[1884,1948],[83,8681,1956],{"className":8682},[1955],[83,8684,8686],{"className":8685},[1928],[83,8687,8689],{"className":8688,"style":1963},[1932],[83,8690],{},[83,8692,8694,8697],{"className":8693},[1884],[83,8695,1311],{"className":8696},[1884,1914],[83,8698,8700],{"className":8699},[1919],[83,8701,8703,8726],{"className":8702},[1923,1924],[83,8704,8706,8723],{"className":8705},[1928],[83,8707,8709],{"className":8708,"style":6150},[1932],[83,8710,8711,8714],{"style":5818},[83,8712],{"className":8713,"style":1941},[1940],[83,8715,8717],{"className":8716},[1945,1946,1947,1948],[83,8718,8720],{"className":8719},[1884,1948],[83,8721,6118],{"className":8722},[1884,1914,1948],[83,8724,1956],{"className":8725},[1955],[83,8727,8729],{"className":8728},[1928],[83,8730,8732],{"className":8731,"style":1963},[1932],[83,8733],{},[83,8735,505],{"className":8736},[5890],[12,8738,8739],{},"To measure the error we can use a loss function. In the case of linear regression, a commonly used loss function is the mean squared error (MSE, for its acronym in English), which is defined as:",[83,8741,8743],{"className":8742},[1809],[83,8744,8746,8818],{"className":8745},[1813],[83,8747,8749],{"className":8748},[1817],[1819,8750,8751],{"xmlns":1821,"display":1822},[1824,8752,8753,8815],{},[1827,8754,8755,8758,8761,8764,8766,8773,8789,8791,8797,8799,8809],{},[1840,8756,8757],{},"M",[1840,8759,8760],{},"S",[1840,8762,8763],{},"E",[1834,8765,216],{},[8767,8768,8769,8771],"mfrac",{},[1844,8770,1855],{},[1840,8772,300],{},[8774,8775,8776,8779,8787],"munderover",{},[1834,8777,8778],{},"∑",[1827,8780,8781,8783,8785],{},[1840,8782,6118],{},[1834,8784,216],{},[1844,8786,1855],{},[1840,8788,300],{},[1834,8790,180],{"stretchy":5711},[1837,8792,8793,8795],{},[1840,8794,3414],{},[1840,8796,6118],{},[1834,8798,5469],{},[8164,8800,8801,8807],{"accent":1871},[1837,8802,8803,8805],{},[1840,8804,3414],{},[1840,8806,6118],{},[1834,8808,8174],{},[3261,8810,8811,8813],{},[1834,8812,505],{"stretchy":5711},[1844,8814,2096],{},[1863,8816,8817],{"encoding":1865},"MSE = \\frac{1}{n} \\sum_{i=1}^{n} (y_i - \\hat{y_i})^2",[83,8819,8821,8847,9056],{"className":8820,"ariaHidden":1871},[1870],[83,8822,8824,8827,8831,8835,8838,8841,8844],{"className":8823},[1875],[83,8825],{"className":8826,"style":2038},[1879],[83,8828,8757],{"className":8829,"style":8830},[1884,1914],"margin-right:0.109em;",[83,8832,8760],{"className":8833,"style":8834},[1884,1914],"margin-right:0.0576em;",[83,8836,8763],{"className":8837,"style":8834},[1884,1914],[83,8839],{"className":8840,"style":1893},[1892],[83,8842,216],{"className":8843},[1897],[83,8845],{"className":8846,"style":1893},[1892],[83,8848,8850,8854,8924,8927,9004,9007,9047,9050,9053],{"className":8849},[1875],[83,8851],{"className":8852,"style":8853},[1879],"height:2.9291em;vertical-align:-1.2777em;",[83,8855,8857,8861,8921],{"className":8856},[1884],[83,8858],{"className":8859},[5796,8860],"nulldelimiter",[83,8862,8864],{"className":8863},[8767],[83,8865,8867,8912],{"className":8866},[1923,1924],[83,8868,8870,8909],{"className":8869},[1928],[83,8871,8874,8886,8897],{"className":8872,"style":8873},[1932],"height:1.3214em;",[83,8875,8877,8880],{"style":8876},"top:-2.314em;",[83,8878],{"className":8879,"style":8329},[1940],[83,8881,8883],{"className":8882},[1884],[83,8884,300],{"className":8885},[1884,1914],[83,8887,8889,8892],{"style":8888},"top:-3.23em;",[83,8890],{"className":8891,"style":8329},[1940],[83,8893],{"className":8894,"style":8896},[8895],"frac-line","border-bottom-width:0.04em;",[83,8898,8900,8903],{"style":8899},"top:-3.677em;",[83,8901],{"className":8902,"style":8329},[1940],[83,8904,8906],{"className":8905},[1884],[83,8907,1855],{"className":8908},[1884],[83,8910,1956],{"className":8911},[1955],[83,8913,8915],{"className":8914},[1928],[83,8916,8919],{"className":8917,"style":8918},[1932],"height:0.686em;",[83,8920],{},[83,8922],{"className":8923},[5890,8860],[83,8925],{"className":8926,"style":5493},[1892],[83,8928,8932],{"className":8929},[8930,8931],"mop","op-limits",[83,8933,8935,8995],{"className":8934},[1923,1924],[83,8936,8938,8992],{"className":8937},[1928],[83,8939,8942,8964,8977],{"className":8940,"style":8941},[1932],"height:1.6514em;",[83,8943,8945,8949],{"style":8944},"top:-1.8723em;margin-left:0em;",[83,8946],{"className":8947,"style":8948},[1940],"height:3.05em;",[83,8950,8952],{"className":8951},[1945,1946,1947,1948],[83,8953,8955,8958,8961],{"className":8954},[1884,1948],[83,8956,6118],{"className":8957},[1884,1914,1948],[83,8959,216],{"className":8960},[1897,1948],[83,8962,1855],{"className":8963},[1884,1948],[83,8965,8967,8970],{"style":8966},"top:-3.05em;",[83,8968],{"className":8969,"style":8948},[1940],[83,8971,8972],{},[83,8973,8778],{"className":8974},[8930,8975,8976],"op-symbol","large-op",[83,8978,8980,8983],{"style":8979},"top:-4.3em;margin-left:0em;",[83,8981],{"className":8982,"style":8948},[1940],[83,8984,8986],{"className":8985},[1945,1946,1947,1948],[83,8987,8989],{"className":8988},[1884,1948],[83,8990,300],{"className":8991},[1884,1914,1948],[83,8993,1956],{"className":8994},[1955],[83,8996,8998],{"className":8997},[1928],[83,8999,9002],{"className":9000,"style":9001},[1932],"height:1.2777em;",[83,9003],{},[83,9005,180],{"className":9006},[5796],[83,9008,9010,9013],{"className":9009},[1884],[83,9011,3414],{"className":9012,"style":5851},[1884,1914],[83,9014,9016],{"className":9015},[1919],[83,9017,9019,9039],{"className":9018},[1923,1924],[83,9020,9022,9036],{"className":9021},[1928],[83,9023,9025],{"className":9024,"style":6150},[1932],[83,9026,9027,9030],{"style":5866},[83,9028],{"className":9029,"style":1941},[1940],[83,9031,9033],{"className":9032},[1945,1946,1947,1948],[83,9034,6118],{"className":9035},[1884,1914,1948],[83,9037,1956],{"className":9038},[1955],[83,9040,9042],{"className":9041},[1928],[83,9043,9045],{"className":9044,"style":1963},[1932],[83,9046],{},[83,9048],{"className":9049,"style":1969},[1892],[83,9051,5469],{"className":9052},[1973],[83,9054],{"className":9055,"style":1969},[1892],[83,9057,9059,9063,9142],{"className":9058},[1875],[83,9060],{"className":9061,"style":9062},[1879],"height:1.1141em;vertical-align:-0.25em;",[83,9064,9066],{"className":9065},[1884,8312],[83,9067,9069,9134],{"className":9068},[1923,1924],[83,9070,9072,9131],{"className":9071},[1928],[83,9073,9075,9120],{"className":9074,"style":1880},[1932],[83,9076,9077,9080],{"style":8325},[83,9078],{"className":9079,"style":8329},[1940],[83,9081,9083,9086],{"className":9082},[1884],[83,9084,3414],{"className":9085,"style":5851},[1884,1914],[83,9087,9089],{"className":9088},[1919],[83,9090,9092,9112],{"className":9091},[1923,1924],[83,9093,9095,9109],{"className":9094},[1928],[83,9096,9098],{"className":9097,"style":6150},[1932],[83,9099,9100,9103],{"style":5866},[83,9101],{"className":9102,"style":1941},[1940],[83,9104,9106],{"className":9105},[1945,1946,1947,1948],[83,9107,6118],{"className":9108},[1884,1914,1948],[83,9110,1956],{"className":9111},[1955],[83,9113,9115],{"className":9114},[1928],[83,9116,9118],{"className":9117,"style":1963},[1932],[83,9119],{},[83,9121,9122,9125],{"style":8325},[83,9123],{"className":9124,"style":8329},[1940],[83,9126,9128],{"className":9127,"style":8380},[8379],[83,9129,8174],{"className":9130},[1884],[83,9132,1956],{"className":9133},[1955],[83,9135,9137],{"className":9136},[1928],[83,9138,9140],{"className":9139,"style":8393},[1932],[83,9141],{},[83,9143,9145,9148],{"className":9144},[5890],[83,9146,505],{"className":9147},[5890],[83,9149,9151],{"className":9150},[1919],[83,9152,9154],{"className":9153},[1923],[83,9155,9157],{"className":9156},[1928],[83,9158,9161],{"className":9159,"style":9160},[1932],"height:0.8641em;",[83,9162,9164,9167],{"style":9163},"top:-3.113em;margin-right:0.05em;",[83,9165],{"className":9166,"style":1941},[1940],[83,9168,9170],{"className":9169},[1945,1946,1947,1948],[83,9171,2096],{"className":9172},[1884,1948],[12,9174,7112],{},[1030,9176,9177,9208,9309],{},[1033,9178,9179,9207],{},[83,9180,9182,9195],{"className":9181},[1813],[83,9183,9185],{"className":9184},[1817],[1819,9186,9187],{"xmlns":1821},[1824,9188,9189,9193],{},[1827,9190,9191],{},[1840,9192,300],{},[1863,9194,300],{"encoding":1865},[83,9196,9198],{"className":9197,"ariaHidden":1871},[1870],[83,9199,9201,9204],{"className":9200},[1875],[83,9202],{"className":9203,"style":7106},[1879],[83,9205,300],{"className":9206},[1884,1914]," is the number of examples in the dataset.",[1033,9209,9210,9279,9280,133],{},[83,9211,9213,9230],{"className":9212},[1813],[83,9214,9216],{"className":9215},[1817],[1819,9217,9218],{"xmlns":1821},[1824,9219,9220,9228],{},[1827,9221,9222],{},[1837,9223,9224,9226],{},[1840,9225,3414],{},[1840,9227,6118],{},[1863,9229,6194],{"encoding":1865},[83,9231,9233],{"className":9232,"ariaHidden":1871},[1870],[83,9234,9236,9239],{"className":9235},[1875],[83,9237],{"className":9238,"style":6204},[1879],[83,9240,9242,9245],{"className":9241},[1884],[83,9243,3414],{"className":9244,"style":5851},[1884,1914],[83,9246,9248],{"className":9247},[1919],[83,9249,9251,9271],{"className":9250},[1923,1924],[83,9252,9254,9268],{"className":9253},[1928],[83,9255,9257],{"className":9256,"style":6150},[1932],[83,9258,9259,9262],{"style":5866},[83,9260],{"className":9261,"style":1941},[1940],[83,9263,9265],{"className":9264},[1945,1946,1947,1948],[83,9266,6118],{"className":9267},[1884,1914,1948],[83,9269,1956],{"className":9270},[1955],[83,9272,9274],{"className":9273},[1928],[83,9275,9277],{"className":9276,"style":1963},[1932],[83,9278],{}," is the actual value of the dependent variable for example ",[83,9281,9283,9296],{"className":9282},[1813],[83,9284,9286],{"className":9285},[1817],[1819,9287,9288],{"xmlns":1821},[1824,9289,9290,9294],{},[1827,9291,9292],{},[1840,9293,6118],{},[1863,9295,6118],{"encoding":1865},[83,9297,9299],{"className":9298,"ariaHidden":1871},[1870],[83,9300,9302,9306],{"className":9301},[1875],[83,9303],{"className":9304,"style":9305},[1879],"height:0.6595em;",[83,9307,6118],{"className":9308},[1884,1914],[1033,9310,9311,9425,9426,133],{},[83,9312,9314,9336],{"className":9313},[1813],[83,9315,9317],{"className":9316},[1817],[1819,9318,9319],{"xmlns":1821},[1824,9320,9321,9333],{},[1827,9322,9323],{},[1837,9324,9325,9331],{},[8164,9326,9327,9329],{"accent":1871},[1840,9328,3414],{},[1834,9330,8174],{},[1840,9332,6118],{},[1863,9334,9335],{"encoding":1865},"\\hat{y}_i",[83,9337,9339],{"className":9338,"ariaHidden":1871},[1870],[83,9340,9342,9345],{"className":9341},[1875],[83,9343],{"className":9344,"style":1907},[1879],[83,9346,9348,9391],{"className":9347},[1884],[83,9349,9351],{"className":9350},[1884,8312],[83,9352,9354,9383],{"className":9353},[1923,1924],[83,9355,9357,9380],{"className":9356},[1928],[83,9358,9360,9368],{"className":9359,"style":1880},[1932],[83,9361,9362,9365],{"style":8325},[83,9363],{"className":9364,"style":8329},[1940],[83,9366,3414],{"className":9367,"style":5851},[1884,1914],[83,9369,9370,9373],{"style":8325},[83,9371],{"className":9372,"style":8329},[1940],[83,9374,9377],{"className":9375,"style":9376},[8379],"left:-0.1944em;",[83,9378,8174],{"className":9379},[1884],[83,9381,1956],{"className":9382},[1955],[83,9384,9386],{"className":9385},[1928],[83,9387,9389],{"className":9388,"style":8393},[1932],[83,9390],{},[83,9392,9394],{"className":9393},[1919],[83,9395,9397,9417],{"className":9396},[1923,1924],[83,9398,9400,9414],{"className":9399},[1928],[83,9401,9403],{"className":9402,"style":6150},[1932],[83,9404,9405,9408],{"style":5866},[83,9406],{"className":9407,"style":1941},[1940],[83,9409,9411],{"className":9410},[1945,1946,1947,1948],[83,9412,6118],{"className":9413},[1884,1914,1948],[83,9415,1956],{"className":9416},[1955],[83,9418,9420],{"className":9419},[1928],[83,9421,9423],{"className":9422,"style":1963},[1932],[83,9424],{}," is the model's prediction for example ",[83,9427,9429,9442],{"className":9428},[1813],[83,9430,9432],{"className":9431},[1817],[1819,9433,9434],{"xmlns":1821},[1824,9435,9436,9440],{},[1827,9437,9438],{},[1840,9439,6118],{},[1863,9441,6118],{"encoding":1865},[83,9443,9445],{"className":9444,"ariaHidden":1871},[1870],[83,9446,9448,9451],{"className":9447},[1875],[83,9449],{"className":9450,"style":9305},[1879],[83,9452,6118],{"className":9453},[1884,1914],[12,9455,9456],{},"Minimizing the MSE is equivalent to minimizing the sum of squared errors:",[83,9458,9460],{"className":9459},[1809],[83,9461,9463,9515],{"className":9462},[1813],[83,9464,9466],{"className":9465},[1817],[1819,9467,9468],{"xmlns":1821,"display":1822},[1824,9469,9470,9512],{},[1827,9471,9472,9486,9488,9494,9496,9506],{},[8774,9473,9474,9476,9484],{},[1834,9475,8778],{},[1827,9477,9478,9480,9482],{},[1840,9479,6118],{},[1834,9481,216],{},[1844,9483,1855],{},[1840,9485,300],{},[1834,9487,180],{"stretchy":5711},[1837,9489,9490,9492],{},[1840,9491,3414],{},[1840,9493,6118],{},[1834,9495,5469],{},[8164,9497,9498,9504],{"accent":1871},[1837,9499,9500,9502],{},[1840,9501,3414],{},[1840,9503,6118],{},[1834,9505,8174],{},[3261,9507,9508,9510],{},[1834,9509,505],{"stretchy":5711},[1844,9511,2096],{},[1863,9513,9514],{"encoding":1865},"\\sum_{i=1}^{n} (y_i - \\hat{y_i})^2",[83,9516,9518,9643],{"className":9517,"ariaHidden":1871},[1870],[83,9519,9521,9524,9591,9594,9634,9637,9640],{"className":9520},[1875],[83,9522],{"className":9523,"style":8853},[1879],[83,9525,9527],{"className":9526},[8930,8931],[83,9528,9530,9583],{"className":9529},[1923,1924],[83,9531,9533,9580],{"className":9532},[1928],[83,9534,9536,9556,9566],{"className":9535,"style":8941},[1932],[83,9537,9538,9541],{"style":8944},[83,9539],{"className":9540,"style":8948},[1940],[83,9542,9544],{"className":9543},[1945,1946,1947,1948],[83,9545,9547,9550,9553],{"className":9546},[1884,1948],[83,9548,6118],{"className":9549},[1884,1914,1948],[83,9551,216],{"className":9552},[1897,1948],[83,9554,1855],{"className":9555},[1884,1948],[83,9557,9558,9561],{"style":8966},[83,9559],{"className":9560,"style":8948},[1940],[83,9562,9563],{},[83,9564,8778],{"className":9565},[8930,8975,8976],[83,9567,9568,9571],{"style":8979},[83,9569],{"className":9570,"style":8948},[1940],[83,9572,9574],{"className":9573},[1945,1946,1947,1948],[83,9575,9577],{"className":9576},[1884,1948],[83,9578,300],{"className":9579},[1884,1914,1948],[83,9581,1956],{"className":9582},[1955],[83,9584,9586],{"className":9585},[1928],[83,9587,9589],{"className":9588,"style":9001},[1932],[83,9590],{},[83,9592,180],{"className":9593},[5796],[83,9595,9597,9600],{"className":9596},[1884],[83,9598,3414],{"className":9599,"style":5851},[1884,1914],[83,9601,9603],{"className":9602},[1919],[83,9604,9606,9626],{"className":9605},[1923,1924],[83,9607,9609,9623],{"className":9608},[1928],[83,9610,9612],{"className":9611,"style":6150},[1932],[83,9613,9614,9617],{"style":5866},[83,9615],{"className":9616,"style":1941},[1940],[83,9618,9620],{"className":9619},[1945,1946,1947,1948],[83,9621,6118],{"className":9622},[1884,1914,1948],[83,9624,1956],{"className":9625},[1955],[83,9627,9629],{"className":9628},[1928],[83,9630,9632],{"className":9631,"style":1963},[1932],[83,9633],{},[83,9635],{"className":9636,"style":1969},[1892],[83,9638,5469],{"className":9639},[1973],[83,9641],{"className":9642,"style":1969},[1892],[83,9644,9646,9649,9728],{"className":9645},[1875],[83,9647],{"className":9648,"style":9062},[1879],[83,9650,9652],{"className":9651},[1884,8312],[83,9653,9655,9720],{"className":9654},[1923,1924],[83,9656,9658,9717],{"className":9657},[1928],[83,9659,9661,9706],{"className":9660,"style":1880},[1932],[83,9662,9663,9666],{"style":8325},[83,9664],{"className":9665,"style":8329},[1940],[83,9667,9669,9672],{"className":9668},[1884],[83,9670,3414],{"className":9671,"style":5851},[1884,1914],[83,9673,9675],{"className":9674},[1919],[83,9676,9678,9698],{"className":9677},[1923,1924],[83,9679,9681,9695],{"className":9680},[1928],[83,9682,9684],{"className":9683,"style":6150},[1932],[83,9685,9686,9689],{"style":5866},[83,9687],{"className":9688,"style":1941},[1940],[83,9690,9692],{"className":9691},[1945,1946,1947,1948],[83,9693,6118],{"className":9694},[1884,1914,1948],[83,9696,1956],{"className":9697},[1955],[83,9699,9701],{"className":9700},[1928],[83,9702,9704],{"className":9703,"style":1963},[1932],[83,9705],{},[83,9707,9708,9711],{"style":8325},[83,9709],{"className":9710,"style":8329},[1940],[83,9712,9714],{"className":9713,"style":8380},[8379],[83,9715,8174],{"className":9716},[1884],[83,9718,1956],{"className":9719},[1955],[83,9721,9723],{"className":9722},[1928],[83,9724,9726],{"className":9725,"style":8393},[1932],[83,9727],{},[83,9729,9731,9734],{"className":9730},[5890],[83,9732,505],{"className":9733},[5890],[83,9735,9737],{"className":9736},[1919],[83,9738,9740],{"className":9739},[1923],[83,9741,9743],{"className":9742},[1928],[83,9744,9746],{"className":9745,"style":9160},[1932],[83,9747,9748,9751],{"style":9163},[83,9749],{"className":9750,"style":1941},[1940],[83,9752,9754],{"className":9753},[1945,1946,1947,1948],[83,9755,2096],{"className":9756},[1884,1948],[12,9758,9759],{},"Or also:",[83,9761,9763],{"className":9762},[1809],[83,9764,9766,9832],{"className":9765},[1813],[83,9767,9769],{"className":9768},[1817],[1819,9770,9771],{"xmlns":1821,"display":1822},[1824,9772,9773,9829],{},[1827,9774,9775,9789,9791,9797,9799,9801,9807,9809,9815,9821,9823],{},[8774,9776,9777,9779,9787],{},[1834,9778,8778],{},[1827,9780,9781,9783,9785],{},[1840,9782,6118],{},[1834,9784,216],{},[1844,9786,1855],{},[1840,9788,300],{},[1834,9790,180],{"stretchy":5711},[1837,9792,9793,9795],{},[1840,9794,3414],{},[1840,9796,6118],{},[1834,9798,5469],{},[1834,9800,180],{"stretchy":5711},[1837,9802,9803,9805],{},[1840,9804,1842],{},[1844,9806,398],{},[1834,9808,1848],{},[1837,9810,9811,9813],{},[1840,9812,1842],{},[1844,9814,1855],{},[1837,9816,9817,9819],{},[1840,9818,1311],{},[1840,9820,6118],{},[1834,9822,505],{"stretchy":5711},[3261,9824,9825,9827],{},[1834,9826,505],{"stretchy":5711},[1844,9828,2096],{},[1863,9830,9831],{"encoding":1865},"\\sum_{i=1}^{n} (y_i - (\\beta_0 + \\beta_1 x_i))^2",[83,9833,9835,9960,10018],{"className":9834,"ariaHidden":1871},[1870],[83,9836,9838,9841,9908,9911,9951,9954,9957],{"className":9837},[1875],[83,9839],{"className":9840,"style":8853},[1879],[83,9842,9844],{"className":9843},[8930,8931],[83,9845,9847,9900],{"className":9846},[1923,1924],[83,9848,9850,9897],{"className":9849},[1928],[83,9851,9853,9873,9883],{"className":9852,"style":8941},[1932],[83,9854,9855,9858],{"style":8944},[83,9856],{"className":9857,"style":8948},[1940],[83,9859,9861],{"className":9860},[1945,1946,1947,1948],[83,9862,9864,9867,9870],{"className":9863},[1884,1948],[83,9865,6118],{"className":9866},[1884,1914,1948],[83,9868,216],{"className":9869},[1897,1948],[83,9871,1855],{"className":9872},[1884,1948],[83,9874,9875,9878],{"style":8966},[83,9876],{"className":9877,"style":8948},[1940],[83,9879,9880],{},[83,9881,8778],{"className":9882},[8930,8975,8976],[83,9884,9885,9888],{"style":8979},[83,9886],{"className":9887,"style":8948},[1940],[83,9889,9891],{"className":9890},[1945,1946,1947,1948],[83,9892,9894],{"className":9893},[1884,1948],[83,9895,300],{"className":9896},[1884,1914,1948],[83,9898,1956],{"className":9899},[1955],[83,9901,9903],{"className":9902},[1928],[83,9904,9906],{"className":9905,"style":9001},[1932],[83,9907],{},[83,9909,180],{"className":9910},[5796],[83,9912,9914,9917],{"className":9913},[1884],[83,9915,3414],{"className":9916,"style":5851},[1884,1914],[83,9918,9920],{"className":9919},[1919],[83,9921,9923,9943],{"className":9922},[1923,1924],[83,9924,9926,9940],{"className":9925},[1928],[83,9927,9929],{"className":9928,"style":6150},[1932],[83,9930,9931,9934],{"style":5866},[83,9932],{"className":9933,"style":1941},[1940],[83,9935,9937],{"className":9936},[1945,1946,1947,1948],[83,9938,6118],{"className":9939},[1884,1914,1948],[83,9941,1956],{"className":9942},[1955],[83,9944,9946],{"className":9945},[1928],[83,9947,9949],{"className":9948,"style":1963},[1932],[83,9950],{},[83,9952],{"className":9953,"style":1969},[1892],[83,9955,5469],{"className":9956},[1973],[83,9958],{"className":9959,"style":1969},[1892],[83,9961,9963,9966,9969,10009,10012,10015],{"className":9962},[1875],[83,9964],{"className":9965,"style":5792},[1879],[83,9967,180],{"className":9968},[5796],[83,9970,9972,9975],{"className":9971},[1884],[83,9973,1842],{"className":9974,"style":1915},[1884,1914],[83,9976,9978],{"className":9977},[1919],[83,9979,9981,10001],{"className":9980},[1923,1924],[83,9982,9984,9998],{"className":9983},[1928],[83,9985,9987],{"className":9986,"style":1933},[1932],[83,9988,9989,9992],{"style":1936},[83,9990],{"className":9991,"style":1941},[1940],[83,9993,9995],{"className":9994},[1945,1946,1947,1948],[83,9996,398],{"className":9997},[1884,1948],[83,9999,1956],{"className":10000},[1955],[83,10002,10004],{"className":10003},[1928],[83,10005,10007],{"className":10006,"style":1963},[1932],[83,10008],{},[83,10010],{"className":10011,"style":1969},[1892],[83,10013,1848],{"className":10014},[1973],[83,10016],{"className":10017,"style":1969},[1892],[83,10019,10021,10024,10064,10104,10107],{"className":10020},[1875],[83,10022],{"className":10023,"style":9062},[1879],[83,10025,10027,10030],{"className":10026},[1884],[83,10028,1842],{"className":10029,"style":1915},[1884,1914],[83,10031,10033],{"className":10032},[1919],[83,10034,10036,10056],{"className":10035},[1923,1924],[83,10037,10039,10053],{"className":10038},[1928],[83,10040,10042],{"className":10041,"style":1933},[1932],[83,10043,10044,10047],{"style":1936},[83,10045],{"className":10046,"style":1941},[1940],[83,10048,10050],{"className":10049},[1945,1946,1947,1948],[83,10051,1855],{"className":10052},[1884,1948],[83,10054,1956],{"className":10055},[1955],[83,10057,10059],{"className":10058},[1928],[83,10060,10062],{"className":10061,"style":1963},[1932],[83,10063],{},[83,10065,10067,10070],{"className":10066},[1884],[83,10068,1311],{"className":10069},[1884,1914],[83,10071,10073],{"className":10072},[1919],[83,10074,10076,10096],{"className":10075},[1923,1924],[83,10077,10079,10093],{"className":10078},[1928],[83,10080,10082],{"className":10081,"style":6150},[1932],[83,10083,10084,10087],{"style":5818},[83,10085],{"className":10086,"style":1941},[1940],[83,10088,10090],{"className":10089},[1945,1946,1947,1948],[83,10091,6118],{"className":10092},[1884,1914,1948],[83,10094,1956],{"className":10095},[1955],[83,10097,10099],{"className":10098},[1928],[83,10100,10102],{"className":10101,"style":1963},[1932],[83,10103],{},[83,10105,505],{"className":10106},[5890],[83,10108,10110,10113],{"className":10109},[5890],[83,10111,505],{"className":10112},[5890],[83,10114,10116],{"className":10115},[1919],[83,10117,10119],{"className":10118},[1923],[83,10120,10122],{"className":10121},[1928],[83,10123,10125],{"className":10124,"style":9160},[1932],[83,10126,10127,10130],{"style":9163},[83,10128],{"className":10129,"style":1941},[1940],[83,10131,10133],{"className":10132},[1945,1946,1947,1948],[83,10134,2096],{"className":10135},[1884,1948],[12,10137,10138,10139,10142,10143,10177],{},"This is known as the ",[40,10140,10141],{},"least squares method",", and it is a commonly used technique to find the coefficients ",[83,10144,10146,10159],{"className":10145},[1813],[83,10147,10149],{"className":10148},[1817],[1819,10150,10151],{"xmlns":1821},[1824,10152,10153,10157],{},[1827,10154,10155],{},[1840,10156,1842],{"mathvariant":7818},[1863,10158,7821],{"encoding":1865},[83,10160,10162],{"className":10161,"ariaHidden":1871},[1870],[83,10163,10165,10168],{"className":10164},[1875],[83,10166],{"className":10167,"style":1907},[1879],[83,10169,10171],{"className":10170},[1884],[83,10172,10174],{"className":10173},[1884],[83,10175,1842],{"className":10176,"style":7841},[1884,7840]," that best fit the data.",[1734,10179,10180],{},[12,10181,10182],{},"Why are squares used? Because by squaring the differences, larger errors are penalized more, which helps to find a better fitting line for the data.",[12,10184,10185,10186,10220,10221,1626,10290,10360],{},"Let's now see how we obtain those coefficients ",[83,10187,10189,10202],{"className":10188},[1813],[83,10190,10192],{"className":10191},[1817],[1819,10193,10194],{"xmlns":1821},[1824,10195,10196,10200],{},[1827,10197,10198],{},[1840,10199,1842],{"mathvariant":7818},[1863,10201,7821],{"encoding":1865},[83,10203,10205],{"className":10204,"ariaHidden":1871},[1870],[83,10206,10208,10211],{"className":10207},[1875],[83,10209],{"className":10210,"style":1907},[1879],[83,10212,10214],{"className":10213},[1884],[83,10215,10217],{"className":10216},[1884],[83,10218,1842],{"className":10219,"style":7841},[1884,7840]," using the least squares method. To find the values of ",[83,10222,10224,10241],{"className":10223},[1813],[83,10225,10227],{"className":10226},[1817],[1819,10228,10229],{"xmlns":1821},[1824,10230,10231,10239],{},[1827,10232,10233],{},[1837,10234,10235,10237],{},[1840,10236,1842],{},[1844,10238,398],{},[1863,10240,7367],{"encoding":1865},[83,10242,10244],{"className":10243,"ariaHidden":1871},[1870],[83,10245,10247,10250],{"className":10246},[1875],[83,10248],{"className":10249,"style":1907},[1879],[83,10251,10253,10256],{"className":10252},[1884],[83,10254,1842],{"className":10255,"style":1915},[1884,1914],[83,10257,10259],{"className":10258},[1919],[83,10260,10262,10282],{"className":10261},[1923,1924],[83,10263,10265,10279],{"className":10264},[1928],[83,10266,10268],{"className":10267,"style":1933},[1932],[83,10269,10270,10273],{"style":1936},[83,10271],{"className":10272,"style":1941},[1940],[83,10274,10276],{"className":10275},[1945,1946,1947,1948],[83,10277,398],{"className":10278},[1884,1948],[83,10280,1956],{"className":10281},[1955],[83,10283,10285],{"className":10284},[1928],[83,10286,10288],{"className":10287,"style":1963},[1932],[83,10289],{},[83,10291,10293,10311],{"className":10292},[1813],[83,10294,10296],{"className":10295},[1817],[1819,10297,10298],{"xmlns":1821},[1824,10299,10300,10308],{},[1827,10301,10302],{},[1837,10303,10304,10306],{},[1840,10305,1842],{},[1844,10307,1855],{},[1863,10309,10310],{"encoding":1865},"\\beta_1",[83,10312,10314],{"className":10313,"ariaHidden":1871},[1870],[83,10315,10317,10320],{"className":10316},[1875],[83,10318],{"className":10319,"style":1907},[1879],[83,10321,10323,10326],{"className":10322},[1884],[83,10324,1842],{"className":10325,"style":1915},[1884,1914],[83,10327,10329],{"className":10328},[1919],[83,10330,10332,10352],{"className":10331},[1923,1924],[83,10333,10335,10349],{"className":10334},[1928],[83,10336,10338],{"className":10337,"style":1933},[1932],[83,10339,10340,10343],{"style":1936},[83,10341],{"className":10342,"style":1941},[1940],[83,10344,10346],{"className":10345},[1945,1946,1947,1948],[83,10347,1855],{"className":10348},[1884,1948],[83,10350,1956],{"className":10351},[1955],[83,10353,10355],{"className":10354},[1928],[83,10356,10358],{"className":10357,"style":1963},[1932],[83,10359],{},", we can use the following formulas, which are obtained by taking the derivative of the MSE loss function with respect to the coefficients and setting the derivatives equal to zero:",[83,10362,10364],{"className":10363},[1809],[83,10365,10367,10466],{"className":10366},[1813],[83,10368,10370],{"className":10369},[1817],[1819,10371,10372],{"xmlns":1821,"display":1822},[1824,10373,10374,10463],{},[1827,10375,10376,10382,10384],{},[1837,10377,10378,10380],{},[1840,10379,1842],{},[1844,10381,1855],{},[1834,10383,216],{},[8767,10385,10386,10426],{},[1827,10387,10388,10390,10392,10394,10400,10406,10408,10410,10412,10418,10420],{},[1840,10389,300],{},[1834,10391,8778],{},[1834,10393,180],{"stretchy":5711},[1837,10395,10396,10398],{},[1840,10397,1311],{},[1840,10399,6118],{},[1837,10401,10402,10404],{},[1840,10403,3414],{},[1840,10405,6118],{},[1834,10407,505],{"stretchy":5711},[1834,10409,5469],{},[1834,10411,8778],{},[1837,10413,10414,10416],{},[1840,10415,1311],{},[1840,10417,6118],{},[1834,10419,8778],{},[1837,10421,10422,10424],{},[1840,10423,3414],{},[1840,10425,6118],{},[1827,10427,10428,10430,10432,10434,10443,10445,10447,10449,10451,10457],{},[1840,10429,300],{},[1834,10431,8778],{},[1834,10433,180],{"stretchy":5711},[10435,10436,10437,10439,10441],"msubsup",{},[1840,10438,1311],{},[1840,10440,6118],{},[1844,10442,2096],{},[1834,10444,505],{"stretchy":5711},[1834,10446,5469],{},[1834,10448,180],{"stretchy":5711},[1834,10450,8778],{},[1837,10452,10453,10455],{},[1840,10454,1311],{},[1840,10456,6118],{},[3261,10458,10459,10461],{},[1834,10460,505],{"stretchy":5711},[1844,10462,2096],{},[1863,10464,10465],{"encoding":1865},"\\beta_1 = \\frac{n \\sum (x_i y_i) - \\sum x_i \\sum y_i}{n \\sum (x_i^2) - (\\sum x_i)^2}",[83,10467,10469,10524],{"className":10468,"ariaHidden":1871},[1870],[83,10470,10472,10475,10515,10518,10521],{"className":10471},[1875],[83,10473],{"className":10474,"style":1907},[1879],[83,10476,10478,10481],{"className":10477},[1884],[83,10479,1842],{"className":10480,"style":1915},[1884,1914],[83,10482,10484],{"className":10483},[1919],[83,10485,10487,10507],{"className":10486},[1923,1924],[83,10488,10490,10504],{"className":10489},[1928],[83,10491,10493],{"className":10492,"style":1933},[1932],[83,10494,10495,10498],{"style":1936},[83,10496],{"className":10497,"style":1941},[1940],[83,10499,10501],{"className":10500},[1945,1946,1947,1948],[83,10502,1855],{"className":10503},[1884,1948],[83,10505,1956],{"className":10506},[1955],[83,10508,10510],{"className":10509},[1928],[83,10511,10513],{"className":10512,"style":1963},[1932],[83,10514],{},[83,10516],{"className":10517,"style":1893},[1892],[83,10519,216],{"className":10520},[1897],[83,10522],{"className":10523,"style":1893},[1892],[83,10525,10527,10531],{"className":10526},[1875],[83,10528],{"className":10529,"style":10530},[1879],"height:2.3899em;vertical-align:-0.9629em;",[83,10532,10534,10537,10946],{"className":10533},[1884],[83,10535],{"className":10536},[5796,8860],[83,10538,10540],{"className":10539},[8767],[83,10541,10543,10937],{"className":10542},[1923,1924],[83,10544,10546,10934],{"className":10545},[1928],[83,10547,10550,10719,10727],{"className":10548,"style":10549},[1932],"height:1.427em;",[83,10551,10552,10555],{"style":8876},[83,10553],{"className":10554,"style":8329},[1940],[83,10556,10558,10561,10564,10569,10572,10627,10630,10633,10636,10639,10642,10645,10648,10688],{"className":10557},[1884],[83,10559,300],{"className":10560},[1884,1914],[83,10562],{"className":10563,"style":5493},[1892],[83,10565,8778],{"className":10566,"style":10568},[8930,8975,10567],"small-op","position:relative;top:0em;",[83,10570,180],{"className":10571},[5796],[83,10573,10575,10578],{"className":10574},[1884],[83,10576,1311],{"className":10577},[1884,1914],[83,10579,10581],{"className":10580},[1919],[83,10582,10584,10618],{"className":10583},[1923,1924],[83,10585,10587,10615],{"className":10586},[1928],[83,10588,10591,10603],{"className":10589,"style":10590},[1932],"height:0.7959em;",[83,10592,10594,10597],{"style":10593},"top:-2.4231em;margin-left:0em;margin-right:0.05em;",[83,10595],{"className":10596,"style":1941},[1940],[83,10598,10600],{"className":10599},[1945,1946,1947,1948],[83,10601,6118],{"className":10602},[1884,1914,1948],[83,10604,10606,10609],{"style":10605},"top:-3.0448em;margin-right:0.05em;",[83,10607],{"className":10608,"style":1941},[1940],[83,10610,10612],{"className":10611},[1945,1946,1947,1948],[83,10613,2096],{"className":10614},[1884,1948],[83,10616,1956],{"className":10617},[1955],[83,10619,10621],{"className":10620},[1928],[83,10622,10625],{"className":10623,"style":10624},[1932],"height:0.2769em;",[83,10626],{},[83,10628,505],{"className":10629},[5890],[83,10631],{"className":10632,"style":1969},[1892],[83,10634,5469],{"className":10635},[1973],[83,10637],{"className":10638,"style":1969},[1892],[83,10640,180],{"className":10641},[5796],[83,10643,8778],{"className":10644,"style":10568},[8930,8975,10567],[83,10646],{"className":10647,"style":5493},[1892],[83,10649,10651,10654],{"className":10650},[1884],[83,10652,1311],{"className":10653},[1884,1914],[83,10655,10657],{"className":10656},[1919],[83,10658,10660,10680],{"className":10659},[1923,1924],[83,10661,10663,10677],{"className":10662},[1928],[83,10664,10666],{"className":10665,"style":6150},[1932],[83,10667,10668,10671],{"style":5818},[83,10669],{"className":10670,"style":1941},[1940],[83,10672,10674],{"className":10673},[1945,1946,1947,1948],[83,10675,6118],{"className":10676},[1884,1914,1948],[83,10678,1956],{"className":10679},[1955],[83,10681,10683],{"className":10682},[1928],[83,10684,10686],{"className":10685,"style":1963},[1932],[83,10687],{},[83,10689,10691,10694],{"className":10690},[5890],[83,10692,505],{"className":10693},[5890],[83,10695,10697],{"className":10696},[1919],[83,10698,10700],{"className":10699},[1923],[83,10701,10703],{"className":10702},[1928],[83,10704,10707],{"className":10705,"style":10706},[1932],"height:0.7401em;",[83,10708,10710,10713],{"style":10709},"top:-2.989em;margin-right:0.05em;",[83,10711],{"className":10712,"style":1941},[1940],[83,10714,10716],{"className":10715},[1945,1946,1947,1948],[83,10717,2096],{"className":10718},[1884,1948],[83,10720,10721,10724],{"style":8888},[83,10722],{"className":10723,"style":8329},[1940],[83,10725],{"className":10726,"style":8896},[8895],[83,10728,10729,10732],{"style":8899},[83,10730],{"className":10731,"style":8329},[1940],[83,10733,10735,10738,10741,10744,10747,10787,10827,10830,10833,10836,10839,10842,10845,10885,10888,10891,10894],{"className":10734},[1884],[83,10736,300],{"className":10737},[1884,1914],[83,10739],{"className":10740,"style":5493},[1892],[83,10742,8778],{"className":10743,"style":10568},[8930,8975,10567],[83,10745,180],{"className":10746},[5796],[83,10748,10750,10753],{"className":10749},[1884],[83,10751,1311],{"className":10752},[1884,1914],[83,10754,10756],{"className":10755},[1919],[83,10757,10759,10779],{"className":10758},[1923,1924],[83,10760,10762,10776],{"className":10761},[1928],[83,10763,10765],{"className":10764,"style":6150},[1932],[83,10766,10767,10770],{"style":5818},[83,10768],{"className":10769,"style":1941},[1940],[83,10771,10773],{"className":10772},[1945,1946,1947,1948],[83,10774,6118],{"className":10775},[1884,1914,1948],[83,10777,1956],{"className":10778},[1955],[83,10780,10782],{"className":10781},[1928],[83,10783,10785],{"className":10784,"style":1963},[1932],[83,10786],{},[83,10788,10790,10793],{"className":10789},[1884],[83,10791,3414],{"className":10792,"style":5851},[1884,1914],[83,10794,10796],{"className":10795},[1919],[83,10797,10799,10819],{"className":10798},[1923,1924],[83,10800,10802,10816],{"className":10801},[1928],[83,10803,10805],{"className":10804,"style":6150},[1932],[83,10806,10807,10810],{"style":5866},[83,10808],{"className":10809,"style":1941},[1940],[83,10811,10813],{"className":10812},[1945,1946,1947,1948],[83,10814,6118],{"className":10815},[1884,1914,1948],[83,10817,1956],{"className":10818},[1955],[83,10820,10822],{"className":10821},[1928],[83,10823,10825],{"className":10824,"style":1963},[1932],[83,10826],{},[83,10828,505],{"className":10829},[5890],[83,10831],{"className":10832,"style":1969},[1892],[83,10834,5469],{"className":10835},[1973],[83,10837],{"className":10838,"style":1969},[1892],[83,10840,8778],{"className":10841,"style":10568},[8930,8975,10567],[83,10843],{"className":10844,"style":5493},[1892],[83,10846,10848,10851],{"className":10847},[1884],[83,10849,1311],{"className":10850},[1884,1914],[83,10852,10854],{"className":10853},[1919],[83,10855,10857,10877],{"className":10856},[1923,1924],[83,10858,10860,10874],{"className":10859},[1928],[83,10861,10863],{"className":10862,"style":6150},[1932],[83,10864,10865,10868],{"style":5818},[83,10866],{"className":10867,"style":1941},[1940],[83,10869,10871],{"className":10870},[1945,1946,1947,1948],[83,10872,6118],{"className":10873},[1884,1914,1948],[83,10875,1956],{"className":10876},[1955],[83,10878,10880],{"className":10879},[1928],[83,10881,10883],{"className":10882,"style":1963},[1932],[83,10884],{},[83,10886],{"className":10887,"style":5493},[1892],[83,10889,8778],{"className":10890,"style":10568},[8930,8975,10567],[83,10892],{"className":10893,"style":5493},[1892],[83,10895,10897,10900],{"className":10896},[1884],[83,10898,3414],{"className":10899,"style":5851},[1884,1914],[83,10901,10903],{"className":10902},[1919],[83,10904,10906,10926],{"className":10905},[1923,1924],[83,10907,10909,10923],{"className":10908},[1928],[83,10910,10912],{"className":10911,"style":6150},[1932],[83,10913,10914,10917],{"style":5866},[83,10915],{"className":10916,"style":1941},[1940],[83,10918,10920],{"className":10919},[1945,1946,1947,1948],[83,10921,6118],{"className":10922},[1884,1914,1948],[83,10924,1956],{"className":10925},[1955],[83,10927,10929],{"className":10928},[1928],[83,10930,10932],{"className":10931,"style":1963},[1932],[83,10933],{},[83,10935,1956],{"className":10936},[1955],[83,10938,10940],{"className":10939},[1928],[83,10941,10944],{"className":10942,"style":10943},[1932],"height:0.9629em;",[83,10945],{},[83,10947],{"className":10948},[5890,8860],[83,10950,10952],{"className":10951},[1809],[83,10953,10955,10996],{"className":10954},[1813],[83,10956,10958],{"className":10957},[1817],[1819,10959,10960],{"xmlns":1821,"display":1822},[1824,10961,10962,10993],{},[1827,10963,10964,10970,10972,10979,10981,10987],{},[1837,10965,10966,10968],{},[1840,10967,1842],{},[1844,10969,398],{},[1834,10971,216],{},[8164,10973,10974,10976],{"accent":1871},[1840,10975,3414],{},[1834,10977,10978],{},"ˉ",[1834,10980,5469],{},[1837,10982,10983,10985],{},[1840,10984,1842],{},[1844,10986,1855],{},[8164,10988,10989,10991],{"accent":1871},[1840,10990,1311],{},[1834,10992,10978],{},[1863,10994,10995],{"encoding":1865},"\\beta_0 = \\bar{y} - \\beta_1 \\bar{x}",[83,10997,10999,11054,11112],{"className":10998,"ariaHidden":1871},[1870],[83,11000,11002,11005,11045,11048,11051],{"className":11001},[1875],[83,11003],{"className":11004,"style":1907},[1879],[83,11006,11008,11011],{"className":11007},[1884],[83,11009,1842],{"className":11010,"style":1915},[1884,1914],[83,11012,11014],{"className":11013},[1919],[83,11015,11017,11037],{"className":11016},[1923,1924],[83,11018,11020,11034],{"className":11019},[1928],[83,11021,11023],{"className":11022,"style":1933},[1932],[83,11024,11025,11028],{"style":1936},[83,11026],{"className":11027,"style":1941},[1940],[83,11029,11031],{"className":11030},[1945,1946,1947,1948],[83,11032,398],{"className":11033},[1884,1948],[83,11035,1956],{"className":11036},[1955],[83,11038,11040],{"className":11039},[1928],[83,11041,11043],{"className":11042,"style":1963},[1932],[83,11044],{},[83,11046],{"className":11047,"style":1893},[1892],[83,11049,216],{"className":11050},[1897],[83,11052],{"className":11053,"style":1893},[1892],[83,11055,11057,11060,11103,11106,11109],{"className":11056},[1875],[83,11058],{"className":11059,"style":8250},[1879],[83,11061,11063],{"className":11062},[1884,8312],[83,11064,11066,11095],{"className":11065},[1923,1924],[83,11067,11069,11092],{"className":11068},[1928],[83,11070,11073,11081],{"className":11071,"style":11072},[1932],"height:0.5678em;",[83,11074,11075,11078],{"style":8325},[83,11076],{"className":11077,"style":8329},[1940],[83,11079,3414],{"className":11080,"style":5851},[1884,1914],[83,11082,11083,11086],{"style":8325},[83,11084],{"className":11085,"style":8329},[1940],[83,11087,11089],{"className":11088,"style":9376},[8379],[83,11090,10978],{"className":11091},[1884],[83,11093,1956],{"className":11094},[1955],[83,11096,11098],{"className":11097},[1928],[83,11099,11101],{"className":11100,"style":8393},[1932],[83,11102],{},[83,11104],{"className":11105,"style":1969},[1892],[83,11107,5469],{"className":11108},[1973],[83,11110],{"className":11111,"style":1969},[1892],[83,11113,11115,11118,11158],{"className":11114},[1875],[83,11116],{"className":11117,"style":1907},[1879],[83,11119,11121,11124],{"className":11120},[1884],[83,11122,1842],{"className":11123,"style":1915},[1884,1914],[83,11125,11127],{"className":11126},[1919],[83,11128,11130,11150],{"className":11129},[1923,1924],[83,11131,11133,11147],{"className":11132},[1928],[83,11134,11136],{"className":11135,"style":1933},[1932],[83,11137,11138,11141],{"style":1936},[83,11139],{"className":11140,"style":1941},[1940],[83,11142,11144],{"className":11143},[1945,1946,1947,1948],[83,11145,1855],{"className":11146},[1884,1948],[83,11148,1956],{"className":11149},[1955],[83,11151,11153],{"className":11152},[1928],[83,11154,11156],{"className":11155,"style":1963},[1932],[83,11157],{},[83,11159,11161],{"className":11160},[1884,8312],[83,11162,11164],{"className":11163},[1923],[83,11165,11167],{"className":11166},[1928],[83,11168,11170,11178],{"className":11169,"style":11072},[1932],[83,11171,11172,11175],{"style":8325},[83,11173],{"className":11174,"style":8329},[1940],[83,11176,1311],{"className":11177},[1884,1914],[83,11179,11180,11183],{"style":8325},[83,11181],{"className":11182,"style":8329},[1940],[83,11184,11187],{"className":11185,"style":11186},[8379],"left:-0.2222em;",[83,11188,10978],{"className":11189},[1884],[12,11191,7112],{},[1030,11193,11194,11224,11365],{},[1033,11195,11196,9207],{},[83,11197,11199,11212],{"className":11198},[1813],[83,11200,11202],{"className":11201},[1817],[1819,11203,11204],{"xmlns":1821},[1824,11205,11206,11210],{},[1827,11207,11208],{},[1840,11209,300],{},[1863,11211,300],{"encoding":1865},[83,11213,11215],{"className":11214,"ariaHidden":1871},[1870],[83,11216,11218,11221],{"className":11217},[1875],[83,11219],{"className":11220,"style":7106},[1879],[83,11222,300],{"className":11223},[1884,1914],[1033,11225,11226,1626,11295,11364],{},[83,11227,11229,11246],{"className":11228},[1813],[83,11230,11232],{"className":11231},[1817],[1819,11233,11234],{"xmlns":1821},[1824,11235,11236,11244],{},[1827,11237,11238],{},[1837,11239,11240,11242],{},[1840,11241,1311],{},[1840,11243,6118],{},[1863,11245,6121],{"encoding":1865},[83,11247,11249],{"className":11248,"ariaHidden":1871},[1870],[83,11250,11252,11255],{"className":11251},[1875],[83,11253],{"className":11254,"style":6131},[1879],[83,11256,11258,11261],{"className":11257},[1884],[83,11259,1311],{"className":11260},[1884,1914],[83,11262,11264],{"className":11263},[1919],[83,11265,11267,11287],{"className":11266},[1923,1924],[83,11268,11270,11284],{"className":11269},[1928],[83,11271,11273],{"className":11272,"style":6150},[1932],[83,11274,11275,11278],{"style":5818},[83,11276],{"className":11277,"style":1941},[1940],[83,11279,11281],{"className":11280},[1945,1946,1947,1948],[83,11282,6118],{"className":11283},[1884,1914,1948],[83,11285,1956],{"className":11286},[1955],[83,11288,11290],{"className":11289},[1928],[83,11291,11293],{"className":11292,"style":1963},[1932],[83,11294],{},[83,11296,11298,11315],{"className":11297},[1813],[83,11299,11301],{"className":11300},[1817],[1819,11302,11303],{"xmlns":1821},[1824,11304,11305,11313],{},[1827,11306,11307],{},[1837,11308,11309,11311],{},[1840,11310,3414],{},[1840,11312,6118],{},[1863,11314,6194],{"encoding":1865},[83,11316,11318],{"className":11317,"ariaHidden":1871},[1870],[83,11319,11321,11324],{"className":11320},[1875],[83,11322],{"className":11323,"style":6204},[1879],[83,11325,11327,11330],{"className":11326},[1884],[83,11328,3414],{"className":11329,"style":5851},[1884,1914],[83,11331,11333],{"className":11332},[1919],[83,11334,11336,11356],{"className":11335},[1923,1924],[83,11337,11339,11353],{"className":11338},[1928],[83,11340,11342],{"className":11341,"style":6150},[1932],[83,11343,11344,11347],{"style":5866},[83,11345],{"className":11346,"style":1941},[1940],[83,11348,11350],{"className":11349},[1945,1946,1947,1948],[83,11351,6118],{"className":11352},[1884,1914,1948],[83,11354,1956],{"className":11355},[1955],[83,11357,11359],{"className":11358},[1928],[83,11360,11362],{"className":11361,"style":1963},[1932],[83,11363],{}," are the values of the independent and dependent variables for each example.",[1033,11366,11367,1626,11428,11501],{},[83,11368,11370,11388],{"className":11369},[1813],[83,11371,11373],{"className":11372},[1817],[1819,11374,11375],{"xmlns":1821},[1824,11376,11377,11385],{},[1827,11378,11379],{},[8164,11380,11381,11383],{"accent":1871},[1840,11382,1311],{},[1834,11384,10978],{},[1863,11386,11387],{"encoding":1865},"\\bar{x}",[83,11389,11391],{"className":11390,"ariaHidden":1871},[1870],[83,11392,11394,11397],{"className":11393},[1875],[83,11395],{"className":11396,"style":11072},[1879],[83,11398,11400],{"className":11399},[1884,8312],[83,11401,11403],{"className":11402},[1923],[83,11404,11406],{"className":11405},[1928],[83,11407,11409,11417],{"className":11408,"style":11072},[1932],[83,11410,11411,11414],{"style":8325},[83,11412],{"className":11413,"style":8329},[1940],[83,11415,1311],{"className":11416},[1884,1914],[83,11418,11419,11422],{"style":8325},[83,11420],{"className":11421,"style":8329},[1940],[83,11423,11425],{"className":11424,"style":11186},[8379],[83,11426,10978],{"className":11427},[1884],[83,11429,11431,11449],{"className":11430},[1813],[83,11432,11434],{"className":11433},[1817],[1819,11435,11436],{"xmlns":1821},[1824,11437,11438,11446],{},[1827,11439,11440],{},[8164,11441,11442,11444],{"accent":1871},[1840,11443,3414],{},[1834,11445,10978],{},[1863,11447,11448],{"encoding":1865},"\\bar{y}",[83,11450,11452],{"className":11451,"ariaHidden":1871},[1870],[83,11453,11455,11459],{"className":11454},[1875],[83,11456],{"className":11457,"style":11458},[1879],"height:0.7622em;vertical-align:-0.1944em;",[83,11460,11462],{"className":11461},[1884,8312],[83,11463,11465,11493],{"className":11464},[1923,1924],[83,11466,11468,11490],{"className":11467},[1928],[83,11469,11471,11479],{"className":11470,"style":11072},[1932],[83,11472,11473,11476],{"style":8325},[83,11474],{"className":11475,"style":8329},[1940],[83,11477,3414],{"className":11478,"style":5851},[1884,1914],[83,11480,11481,11484],{"style":8325},[83,11482],{"className":11483,"style":8329},[1940],[83,11485,11487],{"className":11486,"style":9376},[8379],[83,11488,10978],{"className":11489},[1884],[83,11491,1956],{"className":11492},[1955],[83,11494,11496],{"className":11495},[1928],[83,11497,11499],{"className":11498,"style":8393},[1932],[83,11500],{}," are the means (or averages) of the independent and dependent variables, respectively.",[12,11503,11504],{},"Let's do an example to understand how to apply it. Suppose we have a dataset with the following characteristics:",[2626,11506,11507,11517],{},[2629,11508,11509],{},[2632,11510,11511,11514],{},[2635,11512,11513],{},"Size (m²)",[2635,11515,11516],{},"Price (USD)",[2642,11518,11519,11527,11535],{},[2632,11520,11521,11524],{},[2647,11522,11523],{},"50",[2647,11525,11526],{},"100,000",[2632,11528,11529,11532],{},[2647,11530,11531],{},"100",[2647,11533,11534],{},"200,000",[2632,11536,11537,11540],{},[2647,11538,11539],{},"150",[2647,11541,11542],{},"300,000",[12,11544,11545,11546,11549],{},"We want to build a linear regression model to ",[40,11547,11548],{},"predict the price"," of a house based on its size. In this case, the independent variable is the size (X) and the dependent variable is the price (Y). The linear regression model can be expressed as:",[83,11551,11553],{"className":11552},[1809],[83,11554,11556,11592],{"className":11555},[1813],[83,11557,11559],{"className":11558},[1817],[1819,11560,11561],{"xmlns":1821,"display":1822},[1824,11562,11563,11589],{},[1827,11564,11565,11567,11569,11575,11577,11583,11585,11587],{},[1840,11566,3414],{},[1834,11568,216],{},[1837,11570,11571,11573],{},[1840,11572,1842],{},[1844,11574,398],{},[1834,11576,1848],{},[1837,11578,11579,11581],{},[1840,11580,1842],{},[1844,11582,1855],{},[1840,11584,1311],{},[1834,11586,1848],{},[1840,11588,6714],{},[1863,11590,11591],{"encoding":1865},"y = \\beta_0 + \\beta_1 x + \\epsilon",[83,11593,11595,11613,11668,11726],{"className":11594,"ariaHidden":1871},[1870],[83,11596,11598,11601,11604,11607,11610],{"className":11597},[1875],[83,11599],{"className":11600,"style":6204},[1879],[83,11602,3414],{"className":11603,"style":5851},[1884,1914],[83,11605],{"className":11606,"style":1893},[1892],[83,11608,216],{"className":11609},[1897],[83,11611],{"className":11612,"style":1893},[1892],[83,11614,11616,11619,11659,11662,11665],{"className":11615},[1875],[83,11617],{"className":11618,"style":1907},[1879],[83,11620,11622,11625],{"className":11621},[1884],[83,11623,1842],{"className":11624,"style":1915},[1884,1914],[83,11626,11628],{"className":11627},[1919],[83,11629,11631,11651],{"className":11630},[1923,1924],[83,11632,11634,11648],{"className":11633},[1928],[83,11635,11637],{"className":11636,"style":1933},[1932],[83,11638,11639,11642],{"style":1936},[83,11640],{"className":11641,"style":1941},[1940],[83,11643,11645],{"className":11644},[1945,1946,1947,1948],[83,11646,398],{"className":11647},[1884,1948],[83,11649,1956],{"className":11650},[1955],[83,11652,11654],{"className":11653},[1928],[83,11655,11657],{"className":11656,"style":1963},[1932],[83,11658],{},[83,11660],{"className":11661,"style":1969},[1892],[83,11663,1848],{"className":11664},[1973],[83,11666],{"className":11667,"style":1969},[1892],[83,11669,11671,11674,11714,11717,11720,11723],{"className":11670},[1875],[83,11672],{"className":11673,"style":1907},[1879],[83,11675,11677,11680],{"className":11676},[1884],[83,11678,1842],{"className":11679,"style":1915},[1884,1914],[83,11681,11683],{"className":11682},[1919],[83,11684,11686,11706],{"className":11685},[1923,1924],[83,11687,11689,11703],{"className":11688},[1928],[83,11690,11692],{"className":11691,"style":1933},[1932],[83,11693,11694,11697],{"style":1936},[83,11695],{"className":11696,"style":1941},[1940],[83,11698,11700],{"className":11699},[1945,1946,1947,1948],[83,11701,1855],{"className":11702},[1884,1948],[83,11704,1956],{"className":11705},[1955],[83,11707,11709],{"className":11708},[1928],[83,11710,11712],{"className":11711,"style":1963},[1932],[83,11713],{},[83,11715,1311],{"className":11716},[1884,1914],[83,11718],{"className":11719,"style":1969},[1892],[83,11721,1848],{"className":11722},[1973],[83,11724],{"className":11725,"style":1969},[1892],[83,11727,11729,11732],{"className":11728},[1875],[83,11730],{"className":11731,"style":7106},[1879],[83,11733,6714],{"className":11734},[1884,1914],[12,11736,7112],{},[1030,11738,11739,11770,11801,11873,11945],{},[1033,11740,11741,11769],{},[83,11742,11744,11757],{"className":11743},[1813],[83,11745,11747],{"className":11746},[1817],[1819,11748,11749],{"xmlns":1821},[1824,11750,11751,11755],{},[1827,11752,11753],{},[1840,11754,3414],{},[1863,11756,3414],{"encoding":1865},[83,11758,11760],{"className":11759,"ariaHidden":1871},[1870],[83,11761,11763,11766],{"className":11762},[1875],[83,11764],{"className":11765,"style":6204},[1879],[83,11767,3414],{"className":11768,"style":5851},[1884,1914]," is the price of the house.",[1033,11771,11772,11800],{},[83,11773,11775,11788],{"className":11774},[1813],[83,11776,11778],{"className":11777},[1817],[1819,11779,11780],{"xmlns":1821},[1824,11781,11782,11786],{},[1827,11783,11784],{},[1840,11785,1311],{},[1863,11787,1311],{"encoding":1865},[83,11789,11791],{"className":11790,"ariaHidden":1871},[1870],[83,11792,11794,11797],{"className":11793},[1875],[83,11795],{"className":11796,"style":7106},[1879],[83,11798,1311],{"className":11799},[1884,1914]," is the size of the house.",[1033,11802,11803,11872],{},[83,11804,11806,11823],{"className":11805},[1813],[83,11807,11809],{"className":11808},[1817],[1819,11810,11811],{"xmlns":1821},[1824,11812,11813,11821],{},[1827,11814,11815],{},[1837,11816,11817,11819],{},[1840,11818,1842],{},[1844,11820,398],{},[1863,11822,7367],{"encoding":1865},[83,11824,11826],{"className":11825,"ariaHidden":1871},[1870],[83,11827,11829,11832],{"className":11828},[1875],[83,11830],{"className":11831,"style":1907},[1879],[83,11833,11835,11838],{"className":11834},[1884],[83,11836,1842],{"className":11837,"style":1915},[1884,1914],[83,11839,11841],{"className":11840},[1919],[83,11842,11844,11864],{"className":11843},[1923,1924],[83,11845,11847,11861],{"className":11846},[1928],[83,11848,11850],{"className":11849,"style":1933},[1932],[83,11851,11852,11855],{"style":1936},[83,11853],{"className":11854,"style":1941},[1940],[83,11856,11858],{"className":11857},[1945,1946,1947,1948],[83,11859,398],{"className":11860},[1884,1948],[83,11862,1956],{"className":11863},[1955],[83,11865,11867],{"className":11866},[1928],[83,11868,11870],{"className":11869,"style":1963},[1932],[83,11871],{}," is the y-intercept.",[1033,11874,11875,11944],{},[83,11876,11878,11895],{"className":11877},[1813],[83,11879,11881],{"className":11880},[1817],[1819,11882,11883],{"xmlns":1821},[1824,11884,11885,11893],{},[1827,11886,11887],{},[1837,11888,11889,11891],{},[1840,11890,1842],{},[1844,11892,1855],{},[1863,11894,10310],{"encoding":1865},[83,11896,11898],{"className":11897,"ariaHidden":1871},[1870],[83,11899,11901,11904],{"className":11900},[1875],[83,11902],{"className":11903,"style":1907},[1879],[83,11905,11907,11910],{"className":11906},[1884],[83,11908,1842],{"className":11909,"style":1915},[1884,1914],[83,11911,11913],{"className":11912},[1919],[83,11914,11916,11936],{"className":11915},[1923,1924],[83,11917,11919,11933],{"className":11918},[1928],[83,11920,11922],{"className":11921,"style":1933},[1932],[83,11923,11924,11927],{"style":1936},[83,11925],{"className":11926,"style":1941},[1940],[83,11928,11930],{"className":11929},[1945,1946,1947,1948],[83,11931,1855],{"className":11932},[1884,1948],[83,11934,1956],{"className":11935},[1955],[83,11937,11939],{"className":11938},[1928],[83,11940,11942],{"className":11941,"style":1963},[1932],[83,11943],{}," is the slope.",[1033,11946,11947,11975],{},[83,11948,11950,11963],{"className":11949},[1813],[83,11951,11953],{"className":11952},[1817],[1819,11954,11955],{"xmlns":1821},[1824,11956,11957,11961],{},[1827,11958,11959],{},[1840,11960,6714],{},[1863,11962,7692],{"encoding":1865},[83,11964,11966],{"className":11965,"ariaHidden":1871},[1870],[83,11967,11969,11972],{"className":11968},[1875],[83,11970],{"className":11971,"style":7106},[1879],[83,11973,6714],{"className":11974},[1884,1914]," is the error or noise, which for this example we will assume is zero for simplicity.",[12,11977,11978,11979,1626,12048,12117],{},"To find the values of ",[83,11980,11982,11999],{"className":11981},[1813],[83,11983,11985],{"className":11984},[1817],[1819,11986,11987],{"xmlns":1821},[1824,11988,11989,11997],{},[1827,11990,11991],{},[1837,11992,11993,11995],{},[1840,11994,1842],{},[1844,11996,398],{},[1863,11998,7367],{"encoding":1865},[83,12000,12002],{"className":12001,"ariaHidden":1871},[1870],[83,12003,12005,12008],{"className":12004},[1875],[83,12006],{"className":12007,"style":1907},[1879],[83,12009,12011,12014],{"className":12010},[1884],[83,12012,1842],{"className":12013,"style":1915},[1884,1914],[83,12015,12017],{"className":12016},[1919],[83,12018,12020,12040],{"className":12019},[1923,1924],[83,12021,12023,12037],{"className":12022},[1928],[83,12024,12026],{"className":12025,"style":1933},[1932],[83,12027,12028,12031],{"style":1936},[83,12029],{"className":12030,"style":1941},[1940],[83,12032,12034],{"className":12033},[1945,1946,1947,1948],[83,12035,398],{"className":12036},[1884,1948],[83,12038,1956],{"className":12039},[1955],[83,12041,12043],{"className":12042},[1928],[83,12044,12046],{"className":12045,"style":1963},[1932],[83,12047],{},[83,12049,12051,12068],{"className":12050},[1813],[83,12052,12054],{"className":12053},[1817],[1819,12055,12056],{"xmlns":1821},[1824,12057,12058,12066],{},[1827,12059,12060],{},[1837,12061,12062,12064],{},[1840,12063,1842],{},[1844,12065,1855],{},[1863,12067,10310],{"encoding":1865},[83,12069,12071],{"className":12070,"ariaHidden":1871},[1870],[83,12072,12074,12077],{"className":12073},[1875],[83,12075],{"className":12076,"style":1907},[1879],[83,12078,12080,12083],{"className":12079},[1884],[83,12081,1842],{"className":12082,"style":1915},[1884,1914],[83,12084,12086],{"className":12085},[1919],[83,12087,12089,12109],{"className":12088},[1923,1924],[83,12090,12092,12106],{"className":12091},[1928],[83,12093,12095],{"className":12094,"style":1933},[1932],[83,12096,12097,12100],{"style":1936},[83,12098],{"className":12099,"style":1941},[1940],[83,12101,12103],{"className":12102},[1945,1946,1947,1948],[83,12104,1855],{"className":12105},[1884,1948],[83,12107,1956],{"className":12108},[1955],[83,12110,12112],{"className":12111},[1928],[83,12113,12115],{"className":12114,"style":1963},[1932],[83,12116],{},", we can use the least squares method with the formula we mentioned earlier:",[83,12119,12121],{"className":12120},[1809],[83,12122,12124,12221],{"className":12123},[1813],[83,12125,12127],{"className":12126},[1817],[1819,12128,12129],{"xmlns":1821,"display":1822},[1824,12130,12131,12219],{},[1827,12132,12133,12139,12141],{},[1837,12134,12135,12137],{},[1840,12136,1842],{},[1844,12138,1855],{},[1834,12140,216],{},[8767,12142,12143,12183],{},[1827,12144,12145,12147,12149,12151,12157,12163,12165,12167,12169,12175,12177],{},[1840,12146,300],{},[1834,12148,8778],{},[1834,12150,180],{"stretchy":5711},[1837,12152,12153,12155],{},[1840,12154,1311],{},[1840,12156,6118],{},[1837,12158,12159,12161],{},[1840,12160,3414],{},[1840,12162,6118],{},[1834,12164,505],{"stretchy":5711},[1834,12166,5469],{},[1834,12168,8778],{},[1837,12170,12171,12173],{},[1840,12172,1311],{},[1840,12174,6118],{},[1834,12176,8778],{},[1837,12178,12179,12181],{},[1840,12180,3414],{},[1840,12182,6118],{},[1827,12184,12185,12187,12189,12191,12199,12201,12203,12205,12207,12213],{},[1840,12186,300],{},[1834,12188,8778],{},[1834,12190,180],{"stretchy":5711},[10435,12192,12193,12195,12197],{},[1840,12194,1311],{},[1840,12196,6118],{},[1844,12198,2096],{},[1834,12200,505],{"stretchy":5711},[1834,12202,5469],{},[1834,12204,180],{"stretchy":5711},[1834,12206,8778],{},[1837,12208,12209,12211],{},[1840,12210,1311],{},[1840,12212,6118],{},[3261,12214,12215,12217],{},[1834,12216,505],{"stretchy":5711},[1844,12218,2096],{},[1863,12220,10465],{"encoding":1865},[83,12222,12224,12279],{"className":12223,"ariaHidden":1871},[1870],[83,12225,12227,12230,12270,12273,12276],{"className":12226},[1875],[83,12228],{"className":12229,"style":1907},[1879],[83,12231,12233,12236],{"className":12232},[1884],[83,12234,1842],{"className":12235,"style":1915},[1884,1914],[83,12237,12239],{"className":12238},[1919],[83,12240,12242,12262],{"className":12241},[1923,1924],[83,12243,12245,12259],{"className":12244},[1928],[83,12246,12248],{"className":12247,"style":1933},[1932],[83,12249,12250,12253],{"style":1936},[83,12251],{"className":12252,"style":1941},[1940],[83,12254,12256],{"className":12255},[1945,1946,1947,1948],[83,12257,1855],{"className":12258},[1884,1948],[83,12260,1956],{"className":12261},[1955],[83,12263,12265],{"className":12264},[1928],[83,12266,12268],{"className":12267,"style":1963},[1932],[83,12269],{},[83,12271],{"className":12272,"style":1893},[1892],[83,12274,216],{"className":12275},[1897],[83,12277],{"className":12278,"style":1893},[1892],[83,12280,12282,12285],{"className":12281},[1875],[83,12283],{"className":12284,"style":10530},[1879],[83,12286,12288,12291,12690],{"className":12287},[1884],[83,12289],{"className":12290},[5796,8860],[83,12292,12294],{"className":12293},[8767],[83,12295,12297,12682],{"className":12296},[1923,1924],[83,12298,12300,12679],{"className":12299},[1928],[83,12301,12303,12464,12472],{"className":12302,"style":10549},[1932],[83,12304,12305,12308],{"style":8876},[83,12306],{"className":12307,"style":8329},[1940],[83,12309,12311,12314,12317,12320,12323,12374,12377,12380,12383,12386,12389,12392,12395,12435],{"className":12310},[1884],[83,12312,300],{"className":12313},[1884,1914],[83,12315],{"className":12316,"style":5493},[1892],[83,12318,8778],{"className":12319,"style":10568},[8930,8975,10567],[83,12321,180],{"className":12322},[5796],[83,12324,12326,12329],{"className":12325},[1884],[83,12327,1311],{"className":12328},[1884,1914],[83,12330,12332],{"className":12331},[1919],[83,12333,12335,12366],{"className":12334},[1923,1924],[83,12336,12338,12363],{"className":12337},[1928],[83,12339,12341,12352],{"className":12340,"style":10590},[1932],[83,12342,12343,12346],{"style":10593},[83,12344],{"className":12345,"style":1941},[1940],[83,12347,12349],{"className":12348},[1945,1946,1947,1948],[83,12350,6118],{"className":12351},[1884,1914,1948],[83,12353,12354,12357],{"style":10605},[83,12355],{"className":12356,"style":1941},[1940],[83,12358,12360],{"className":12359},[1945,1946,1947,1948],[83,12361,2096],{"className":12362},[1884,1948],[83,12364,1956],{"className":12365},[1955],[83,12367,12369],{"className":12368},[1928],[83,12370,12372],{"className":12371,"style":10624},[1932],[83,12373],{},[83,12375,505],{"className":12376},[5890],[83,12378],{"className":12379,"style":1969},[1892],[83,12381,5469],{"className":12382},[1973],[83,12384],{"className":12385,"style":1969},[1892],[83,12387,180],{"className":12388},[5796],[83,12390,8778],{"className":12391,"style":10568},[8930,8975,10567],[83,12393],{"className":12394,"style":5493},[1892],[83,12396,12398,12401],{"className":12397},[1884],[83,12399,1311],{"className":12400},[1884,1914],[83,12402,12404],{"className":12403},[1919],[83,12405,12407,12427],{"className":12406},[1923,1924],[83,12408,12410,12424],{"className":12409},[1928],[83,12411,12413],{"className":12412,"style":6150},[1932],[83,12414,12415,12418],{"style":5818},[83,12416],{"className":12417,"style":1941},[1940],[83,12419,12421],{"className":12420},[1945,1946,1947,1948],[83,12422,6118],{"className":12423},[1884,1914,1948],[83,12425,1956],{"className":12426},[1955],[83,12428,12430],{"className":12429},[1928],[83,12431,12433],{"className":12432,"style":1963},[1932],[83,12434],{},[83,12436,12438,12441],{"className":12437},[5890],[83,12439,505],{"className":12440},[5890],[83,12442,12444],{"className":12443},[1919],[83,12445,12447],{"className":12446},[1923],[83,12448,12450],{"className":12449},[1928],[83,12451,12453],{"className":12452,"style":10706},[1932],[83,12454,12455,12458],{"style":10709},[83,12456],{"className":12457,"style":1941},[1940],[83,12459,12461],{"className":12460},[1945,1946,1947,1948],[83,12462,2096],{"className":12463},[1884,1948],[83,12465,12466,12469],{"style":8888},[83,12467],{"className":12468,"style":8329},[1940],[83,12470],{"className":12471,"style":8896},[8895],[83,12473,12474,12477],{"style":8899},[83,12475],{"className":12476,"style":8329},[1940],[83,12478,12480,12483,12486,12489,12492,12532,12572,12575,12578,12581,12584,12587,12590,12630,12633,12636,12639],{"className":12479},[1884],[83,12481,300],{"className":12482},[1884,1914],[83,12484],{"className":12485,"style":5493},[1892],[83,12487,8778],{"className":12488,"style":10568},[8930,8975,10567],[83,12490,180],{"className":12491},[5796],[83,12493,12495,12498],{"className":12494},[1884],[83,12496,1311],{"className":12497},[1884,1914],[83,12499,12501],{"className":12500},[1919],[83,12502,12504,12524],{"className":12503},[1923,1924],[83,12505,12507,12521],{"className":12506},[1928],[83,12508,12510],{"className":12509,"style":6150},[1932],[83,12511,12512,12515],{"style":5818},[83,12513],{"className":12514,"style":1941},[1940],[83,12516,12518],{"className":12517},[1945,1946,1947,1948],[83,12519,6118],{"className":12520},[1884,1914,1948],[83,12522,1956],{"className":12523},[1955],[83,12525,12527],{"className":12526},[1928],[83,12528,12530],{"className":12529,"style":1963},[1932],[83,12531],{},[83,12533,12535,12538],{"className":12534},[1884],[83,12536,3414],{"className":12537,"style":5851},[1884,1914],[83,12539,12541],{"className":12540},[1919],[83,12542,12544,12564],{"className":12543},[1923,1924],[83,12545,12547,12561],{"className":12546},[1928],[83,12548,12550],{"className":12549,"style":6150},[1932],[83,12551,12552,12555],{"style":5866},[83,12553],{"className":12554,"style":1941},[1940],[83,12556,12558],{"className":12557},[1945,1946,1947,1948],[83,12559,6118],{"className":12560},[1884,1914,1948],[83,12562,1956],{"className":12563},[1955],[83,12565,12567],{"className":12566},[1928],[83,12568,12570],{"className":12569,"style":1963},[1932],[83,12571],{},[83,12573,505],{"className":12574},[5890],[83,12576],{"className":12577,"style":1969},[1892],[83,12579,5469],{"className":12580},[1973],[83,12582],{"className":12583,"style":1969},[1892],[83,12585,8778],{"className":12586,"style":10568},[8930,8975,10567],[83,12588],{"className":12589,"style":5493},[1892],[83,12591,12593,12596],{"className":12592},[1884],[83,12594,1311],{"className":12595},[1884,1914],[83,12597,12599],{"className":12598},[1919],[83,12600,12602,12622],{"className":12601},[1923,1924],[83,12603,12605,12619],{"className":12604},[1928],[83,12606,12608],{"className":12607,"style":6150},[1932],[83,12609,12610,12613],{"style":5818},[83,12611],{"className":12612,"style":1941},[1940],[83,12614,12616],{"className":12615},[1945,1946,1947,1948],[83,12617,6118],{"className":12618},[1884,1914,1948],[83,12620,1956],{"className":12621},[1955],[83,12623,12625],{"className":12624},[1928],[83,12626,12628],{"className":12627,"style":1963},[1932],[83,12629],{},[83,12631],{"className":12632,"style":5493},[1892],[83,12634,8778],{"className":12635,"style":10568},[8930,8975,10567],[83,12637],{"className":12638,"style":5493},[1892],[83,12640,12642,12645],{"className":12641},[1884],[83,12643,3414],{"className":12644,"style":5851},[1884,1914],[83,12646,12648],{"className":12647},[1919],[83,12649,12651,12671],{"className":12650},[1923,1924],[83,12652,12654,12668],{"className":12653},[1928],[83,12655,12657],{"className":12656,"style":6150},[1932],[83,12658,12659,12662],{"style":5866},[83,12660],{"className":12661,"style":1941},[1940],[83,12663,12665],{"className":12664},[1945,1946,1947,1948],[83,12666,6118],{"className":12667},[1884,1914,1948],[83,12669,1956],{"className":12670},[1955],[83,12672,12674],{"className":12673},[1928],[83,12675,12677],{"className":12676,"style":1963},[1932],[83,12678],{},[83,12680,1956],{"className":12681},[1955],[83,12683,12685],{"className":12684},[1928],[83,12686,12688],{"className":12687,"style":10943},[1932],[83,12689],{},[83,12691],{"className":12692},[5890,8860],[83,12694,12696],{"className":12695},[1809],[83,12697,12699,12738],{"className":12698},[1813],[83,12700,12702],{"className":12701},[1817],[1819,12703,12704],{"xmlns":1821,"display":1822},[1824,12705,12706,12736],{},[1827,12707,12708,12714,12716,12722,12724,12730],{},[1837,12709,12710,12712],{},[1840,12711,1842],{},[1844,12713,398],{},[1834,12715,216],{},[8164,12717,12718,12720],{"accent":1871},[1840,12719,3414],{},[1834,12721,10978],{},[1834,12723,5469],{},[1837,12725,12726,12728],{},[1840,12727,1842],{},[1844,12729,1855],{},[8164,12731,12732,12734],{"accent":1871},[1840,12733,1311],{},[1834,12735,10978],{},[1863,12737,10995],{"encoding":1865},[83,12739,12741,12796,12853],{"className":12740,"ariaHidden":1871},[1870],[83,12742,12744,12747,12787,12790,12793],{"className":12743},[1875],[83,12745],{"className":12746,"style":1907},[1879],[83,12748,12750,12753],{"className":12749},[1884],[83,12751,1842],{"className":12752,"style":1915},[1884,1914],[83,12754,12756],{"className":12755},[1919],[83,12757,12759,12779],{"className":12758},[1923,1924],[83,12760,12762,12776],{"className":12761},[1928],[83,12763,12765],{"className":12764,"style":1933},[1932],[83,12766,12767,12770],{"style":1936},[83,12768],{"className":12769,"style":1941},[1940],[83,12771,12773],{"className":12772},[1945,1946,1947,1948],[83,12774,398],{"className":12775},[1884,1948],[83,12777,1956],{"className":12778},[1955],[83,12780,12782],{"className":12781},[1928],[83,12783,12785],{"className":12784,"style":1963},[1932],[83,12786],{},[83,12788],{"className":12789,"style":1893},[1892],[83,12791,216],{"className":12792},[1897],[83,12794],{"className":12795,"style":1893},[1892],[83,12797,12799,12802,12844,12847,12850],{"className":12798},[1875],[83,12800],{"className":12801,"style":8250},[1879],[83,12803,12805],{"className":12804},[1884,8312],[83,12806,12808,12836],{"className":12807},[1923,1924],[83,12809,12811,12833],{"className":12810},[1928],[83,12812,12814,12822],{"className":12813,"style":11072},[1932],[83,12815,12816,12819],{"style":8325},[83,12817],{"className":12818,"style":8329},[1940],[83,12820,3414],{"className":12821,"style":5851},[1884,1914],[83,12823,12824,12827],{"style":8325},[83,12825],{"className":12826,"style":8329},[1940],[83,12828,12830],{"className":12829,"style":9376},[8379],[83,12831,10978],{"className":12832},[1884],[83,12834,1956],{"className":12835},[1955],[83,12837,12839],{"className":12838},[1928],[83,12840,12842],{"className":12841,"style":8393},[1932],[83,12843],{},[83,12845],{"className":12846,"style":1969},[1892],[83,12848,5469],{"className":12849},[1973],[83,12851],{"className":12852,"style":1969},[1892],[83,12854,12856,12859,12899],{"className":12855},[1875],[83,12857],{"className":12858,"style":1907},[1879],[83,12860,12862,12865],{"className":12861},[1884],[83,12863,1842],{"className":12864,"style":1915},[1884,1914],[83,12866,12868],{"className":12867},[1919],[83,12869,12871,12891],{"className":12870},[1923,1924],[83,12872,12874,12888],{"className":12873},[1928],[83,12875,12877],{"className":12876,"style":1933},[1932],[83,12878,12879,12882],{"style":1936},[83,12880],{"className":12881,"style":1941},[1940],[83,12883,12885],{"className":12884},[1945,1946,1947,1948],[83,12886,1855],{"className":12887},[1884,1948],[83,12889,1956],{"className":12890},[1955],[83,12892,12894],{"className":12893},[1928],[83,12895,12897],{"className":12896,"style":1963},[1932],[83,12898],{},[83,12900,12902],{"className":12901},[1884,8312],[83,12903,12905],{"className":12904},[1923],[83,12906,12908],{"className":12907},[1928],[83,12909,12911,12919],{"className":12910,"style":11072},[1932],[83,12912,12913,12916],{"style":8325},[83,12914],{"className":12915,"style":8329},[1940],[83,12917,1311],{"className":12918},[1884,1914],[83,12920,12921,12924],{"style":8325},[83,12922],{"className":12923,"style":8329},[1940],[83,12925,12927],{"className":12926,"style":11186},[8379],[83,12928,10978],{"className":12929},[1884],[12,12931,7112],{},[1030,12933,12934,12965,13106],{},[1033,12935,12936,12964],{},[83,12937,12939,12952],{"className":12938},[1813],[83,12940,12942],{"className":12941},[1817],[1819,12943,12944],{"xmlns":1821},[1824,12945,12946,12950],{},[1827,12947,12948],{},[1840,12949,300],{},[1863,12951,300],{"encoding":1865},[83,12953,12955],{"className":12954,"ariaHidden":1871},[1870],[83,12956,12958,12961],{"className":12957},[1875],[83,12959],{"className":12960,"style":7106},[1879],[83,12962,300],{"className":12963},[1884,1914]," is the number of examples (in this case, 3).",[1033,12966,12967,1626,13036,13105],{},[83,12968,12970,12987],{"className":12969},[1813],[83,12971,12973],{"className":12972},[1817],[1819,12974,12975],{"xmlns":1821},[1824,12976,12977,12985],{},[1827,12978,12979],{},[1837,12980,12981,12983],{},[1840,12982,1311],{},[1840,12984,6118],{},[1863,12986,6121],{"encoding":1865},[83,12988,12990],{"className":12989,"ariaHidden":1871},[1870],[83,12991,12993,12996],{"className":12992},[1875],[83,12994],{"className":12995,"style":6131},[1879],[83,12997,12999,13002],{"className":12998},[1884],[83,13000,1311],{"className":13001},[1884,1914],[83,13003,13005],{"className":13004},[1919],[83,13006,13008,13028],{"className":13007},[1923,1924],[83,13009,13011,13025],{"className":13010},[1928],[83,13012,13014],{"className":13013,"style":6150},[1932],[83,13015,13016,13019],{"style":5818},[83,13017],{"className":13018,"style":1941},[1940],[83,13020,13022],{"className":13021},[1945,1946,1947,1948],[83,13023,6118],{"className":13024},[1884,1914,1948],[83,13026,1956],{"className":13027},[1955],[83,13029,13031],{"className":13030},[1928],[83,13032,13034],{"className":13033,"style":1963},[1932],[83,13035],{},[83,13037,13039,13056],{"className":13038},[1813],[83,13040,13042],{"className":13041},[1817],[1819,13043,13044],{"xmlns":1821},[1824,13045,13046,13054],{},[1827,13047,13048],{},[1837,13049,13050,13052],{},[1840,13051,3414],{},[1840,13053,6118],{},[1863,13055,6194],{"encoding":1865},[83,13057,13059],{"className":13058,"ariaHidden":1871},[1870],[83,13060,13062,13065],{"className":13061},[1875],[83,13063],{"className":13064,"style":6204},[1879],[83,13066,13068,13071],{"className":13067},[1884],[83,13069,3414],{"className":13070,"style":5851},[1884,1914],[83,13072,13074],{"className":13073},[1919],[83,13075,13077,13097],{"className":13076},[1923,1924],[83,13078,13080,13094],{"className":13079},[1928],[83,13081,13083],{"className":13082,"style":6150},[1932],[83,13084,13085,13088],{"style":5866},[83,13086],{"className":13087,"style":1941},[1940],[83,13089,13091],{"className":13090},[1945,1946,1947,1948],[83,13092,6118],{"className":13093},[1884,1914,1948],[83,13095,1956],{"className":13096},[1955],[83,13098,13100],{"className":13099},[1928],[83,13101,13103],{"className":13102,"style":1963},[1932],[83,13104],{}," are the values of size and price for each example.",[1033,13107,13108,1626,13168,13239],{},[83,13109,13111,13128],{"className":13110},[1813],[83,13112,13114],{"className":13113},[1817],[1819,13115,13116],{"xmlns":1821},[1824,13117,13118,13126],{},[1827,13119,13120],{},[8164,13121,13122,13124],{"accent":1871},[1840,13123,1311],{},[1834,13125,10978],{},[1863,13127,11387],{"encoding":1865},[83,13129,13131],{"className":13130,"ariaHidden":1871},[1870],[83,13132,13134,13137],{"className":13133},[1875],[83,13135],{"className":13136,"style":11072},[1879],[83,13138,13140],{"className":13139},[1884,8312],[83,13141,13143],{"className":13142},[1923],[83,13144,13146],{"className":13145},[1928],[83,13147,13149,13157],{"className":13148,"style":11072},[1932],[83,13150,13151,13154],{"style":8325},[83,13152],{"className":13153,"style":8329},[1940],[83,13155,1311],{"className":13156},[1884,1914],[83,13158,13159,13162],{"style":8325},[83,13160],{"className":13161,"style":8329},[1940],[83,13163,13165],{"className":13164,"style":11186},[8379],[83,13166,10978],{"className":13167},[1884],[83,13169,13171,13188],{"className":13170},[1813],[83,13172,13174],{"className":13173},[1817],[1819,13175,13176],{"xmlns":1821},[1824,13177,13178,13186],{},[1827,13179,13180],{},[8164,13181,13182,13184],{"accent":1871},[1840,13183,3414],{},[1834,13185,10978],{},[1863,13187,11448],{"encoding":1865},[83,13189,13191],{"className":13190,"ariaHidden":1871},[1870],[83,13192,13194,13197],{"className":13193},[1875],[83,13195],{"className":13196,"style":11458},[1879],[83,13198,13200],{"className":13199},[1884,8312],[83,13201,13203,13231],{"className":13202},[1923,1924],[83,13204,13206,13228],{"className":13205},[1928],[83,13207,13209,13217],{"className":13208,"style":11072},[1932],[83,13210,13211,13214],{"style":8325},[83,13212],{"className":13213,"style":8329},[1940],[83,13215,3414],{"className":13216,"style":5851},[1884,1914],[83,13218,13219,13222],{"style":8325},[83,13220],{"className":13221,"style":8329},[1940],[83,13223,13225],{"className":13224,"style":9376},[8379],[83,13226,10978],{"className":13227},[1884],[83,13229,1956],{"className":13230},[1955],[83,13232,13234],{"className":13233},[1928],[83,13235,13237],{"className":13236,"style":8393},[1932],[83,13238],{}," are the means of the independent and dependent variables, respectively.",[12,13241,13242],{},"We have then for this case:",[83,13244,13246],{"className":13245},[1809],[83,13247,13249,13386],{"className":13248},[1813],[83,13250,13252],{"className":13251},[1817],[1819,13253,13254],{"xmlns":1821,"display":1822},[1824,13255,13256,13383],{},[1827,13257,13258,13264,13266],{},[1837,13259,13260,13262],{},[1840,13261,1842],{},[1844,13263,1855],{},[1834,13265,216],{},[8767,13267,13268,13333],{},[1827,13269,13270,13273,13275,13277,13280,13283,13285,13287,13289,13292,13294,13296,13298,13301,13303,13305,13307,13309,13311,13313,13315,13317,13319,13321,13323,13325,13327,13329,13331],{},[1844,13271,13272],{},"3",[1834,13274,180],{"stretchy":5711},[1844,13276,11523],{},[1834,13278,13279],{},"∗",[1844,13281,13282],{},"100000",[1834,13284,1848],{},[1844,13286,11531],{},[1834,13288,13279],{},[1844,13290,13291],{},"200000",[1834,13293,1848],{},[1844,13295,11539],{},[1834,13297,13279],{},[1844,13299,13300],{},"300000",[1834,13302,505],{"stretchy":5711},[1834,13304,5469],{},[1834,13306,180],{"stretchy":5711},[1844,13308,11523],{},[1834,13310,1848],{},[1844,13312,11531],{},[1834,13314,1848],{},[1844,13316,11539],{},[1834,13318,505],{"stretchy":5711},[1834,13320,180],{"stretchy":5711},[1844,13322,13282],{},[1834,13324,1848],{},[1844,13326,13291],{},[1834,13328,1848],{},[1844,13330,13300],{},[1834,13332,505],{"stretchy":5711},[1827,13334,13335,13337,13339,13345,13347,13353,13355,13361,13363,13365,13367,13369,13371,13373,13375,13377],{},[1844,13336,13272],{},[1834,13338,180],{"stretchy":5711},[3261,13340,13341,13343],{},[1844,13342,11523],{},[1844,13344,2096],{},[1834,13346,1848],{},[3261,13348,13349,13351],{},[1844,13350,11531],{},[1844,13352,2096],{},[1834,13354,1848],{},[3261,13356,13357,13359],{},[1844,13358,11539],{},[1844,13360,2096],{},[1834,13362,505],{"stretchy":5711},[1834,13364,5469],{},[1834,13366,180],{"stretchy":5711},[1844,13368,11523],{},[1834,13370,1848],{},[1844,13372,11531],{},[1834,13374,1848],{},[1844,13376,11539],{},[3261,13378,13379,13381],{},[1834,13380,505],{"stretchy":5711},[1844,13382,2096],{},[1863,13384,13385],{"encoding":1865},"\\beta_1 = \\frac{3(50*100000 + 100*200000 + 150*300000) - (50 + 100 + 150)(100000 + 200000 + 300000)}{3(50^2 + 100^2 + 150^2) - (50 + 100 + 150)^2}",[83,13387,13389,13444],{"className":13388,"ariaHidden":1871},[1870],[83,13390,13392,13395,13435,13438,13441],{"className":13391},[1875],[83,13393],{"className":13394,"style":1907},[1879],[83,13396,13398,13401],{"className":13397},[1884],[83,13399,1842],{"className":13400,"style":1915},[1884,1914],[83,13402,13404],{"className":13403},[1919],[83,13405,13407,13427],{"className":13406},[1923,1924],[83,13408,13410,13424],{"className":13409},[1928],[83,13411,13413],{"className":13412,"style":1933},[1932],[83,13414,13415,13418],{"style":1936},[83,13416],{"className":13417,"style":1941},[1940],[83,13419,13421],{"className":13420},[1945,1946,1947,1948],[83,13422,1855],{"className":13423},[1884,1948],[83,13425,1956],{"className":13426},[1955],[83,13428,13430],{"className":13429},[1928],[83,13431,13433],{"className":13432,"style":1963},[1932],[83,13434],{},[83,13436],{"className":13437,"style":1893},[1892],[83,13439,216],{"className":13440},[1897],[83,13442],{"className":13443,"style":1893},[1892],[83,13445,13447,13451],{"className":13446},[1875],[83,13448],{"className":13449,"style":13450},[1879],"height:2.363em;vertical-align:-0.936em;",[83,13452,13454,13457,13845],{"className":13453},[1884],[83,13455],{"className":13456},[5796,8860],[83,13458,13460],{"className":13459},[8767],[83,13461,13463,13836],{"className":13462},[1923,1924],[83,13464,13466,13833],{"className":13465},[1928],[83,13467,13469,13670,13678],{"className":13468,"style":10549},[1932],[83,13470,13471,13474],{"style":8876},[83,13472],{"className":13473,"style":8329},[1940],[83,13475,13477,13480,13483,13486,13515,13518,13521,13524,13528,13557,13560,13563,13566,13570,13599,13602,13605,13608,13611,13614,13617,13620,13623,13626,13629,13632,13635,13638,13641],{"className":13476},[1884],[83,13478,13272],{"className":13479},[1884],[83,13481,180],{"className":13482},[5796],[83,13484,1132],{"className":13485},[1884],[83,13487,13489,13492],{"className":13488},[1884],[83,13490,398],{"className":13491},[1884],[83,13493,13495],{"className":13494},[1919],[83,13496,13498],{"className":13497},[1923],[83,13499,13501],{"className":13500},[1928],[83,13502,13504],{"className":13503,"style":10706},[1932],[83,13505,13506,13509],{"style":10709},[83,13507],{"className":13508,"style":1941},[1940],[83,13510,13512],{"className":13511},[1945,1946,1947,1948],[83,13513,2096],{"className":13514},[1884,1948],[83,13516],{"className":13517,"style":1969},[1892],[83,13519,1848],{"className":13520},[1973],[83,13522],{"className":13523,"style":1969},[1892],[83,13525,13527],{"className":13526},[1884],"10",[83,13529,13531,13534],{"className":13530},[1884],[83,13532,398],{"className":13533},[1884],[83,13535,13537],{"className":13536},[1919],[83,13538,13540],{"className":13539},[1923],[83,13541,13543],{"className":13542},[1928],[83,13544,13546],{"className":13545,"style":10706},[1932],[83,13547,13548,13551],{"style":10709},[83,13549],{"className":13550,"style":1941},[1940],[83,13552,13554],{"className":13553},[1945,1946,1947,1948],[83,13555,2096],{"className":13556},[1884,1948],[83,13558],{"className":13559,"style":1969},[1892],[83,13561,1848],{"className":13562},[1973],[83,13564],{"className":13565,"style":1969},[1892],[83,13567,13569],{"className":13568},[1884],"15",[83,13571,13573,13576],{"className":13572},[1884],[83,13574,398],{"className":13575},[1884],[83,13577,13579],{"className":13578},[1919],[83,13580,13582],{"className":13581},[1923],[83,13583,13585],{"className":13584},[1928],[83,13586,13588],{"className":13587,"style":10706},[1932],[83,13589,13590,13593],{"style":10709},[83,13591],{"className":13592,"style":1941},[1940],[83,13594,13596],{"className":13595},[1945,1946,1947,1948],[83,13597,2096],{"className":13598},[1884,1948],[83,13600,505],{"className":13601},[5890],[83,13603],{"className":13604,"style":1969},[1892],[83,13606,5469],{"className":13607},[1973],[83,13609],{"className":13610,"style":1969},[1892],[83,13612,180],{"className":13613},[5796],[83,13615,11523],{"className":13616},[1884],[83,13618],{"className":13619,"style":1969},[1892],[83,13621,1848],{"className":13622},[1973],[83,13624],{"className":13625,"style":1969},[1892],[83,13627,11531],{"className":13628},[1884],[83,13630],{"className":13631,"style":1969},[1892],[83,13633,1848],{"className":13634},[1973],[83,13636],{"className":13637,"style":1969},[1892],[83,13639,11539],{"className":13640},[1884],[83,13642,13644,13647],{"className":13643},[5890],[83,13645,505],{"className":13646},[5890],[83,13648,13650],{"className":13649},[1919],[83,13651,13653],{"className":13652},[1923],[83,13654,13656],{"className":13655},[1928],[83,13657,13659],{"className":13658,"style":10706},[1932],[83,13660,13661,13664],{"style":10709},[83,13662],{"className":13663,"style":1941},[1940],[83,13665,13667],{"className":13666},[1945,1946,1947,1948],[83,13668,2096],{"className":13669},[1884,1948],[83,13671,13672,13675],{"style":8888},[83,13673],{"className":13674,"style":8329},[1940],[83,13676],{"className":13677,"style":8896},[8895],[83,13679,13680,13683],{"style":8899},[83,13681],{"className":13682,"style":8329},[1940],[83,13684,13686,13689,13692,13695,13698,13701,13704,13707,13710,13713,13716,13719,13722,13725,13728,13731,13734,13737,13740,13743,13746,13749,13752,13755,13758,13761,13764,13767,13770,13773,13776,13779,13782,13785,13788,13791,13794,13797,13800,13803,13806,13809,13812,13815,13818,13821,13824,13827,13830],{"className":13685},[1884],[83,13687,13272],{"className":13688},[1884],[83,13690,180],{"className":13691},[5796],[83,13693,11523],{"className":13694},[1884],[83,13696],{"className":13697,"style":1969},[1892],[83,13699,13279],{"className":13700},[1973],[83,13702],{"className":13703,"style":1969},[1892],[83,13705,13282],{"className":13706},[1884],[83,13708],{"className":13709,"style":1969},[1892],[83,13711,1848],{"className":13712},[1973],[83,13714],{"className":13715,"style":1969},[1892],[83,13717,11531],{"className":13718},[1884],[83,13720],{"className":13721,"style":1969},[1892],[83,13723,13279],{"className":13724},[1973],[83,13726],{"className":13727,"style":1969},[1892],[83,13729,13291],{"className":13730},[1884],[83,13732],{"className":13733,"style":1969},[1892],[83,13735,1848],{"className":13736},[1973],[83,13738],{"className":13739,"style":1969},[1892],[83,13741,11539],{"className":13742},[1884],[83,13744],{"className":13745,"style":1969},[1892],[83,13747,13279],{"className":13748},[1973],[83,13750],{"className":13751,"style":1969},[1892],[83,13753,13300],{"className":13754},[1884],[83,13756,505],{"className":13757},[5890],[83,13759],{"className":13760,"style":1969},[1892],[83,13762,5469],{"className":13763},[1973],[83,13765],{"className":13766,"style":1969},[1892],[83,13768,180],{"className":13769},[5796],[83,13771,11523],{"className":13772},[1884],[83,13774],{"className":13775,"style":1969},[1892],[83,13777,1848],{"className":13778},[1973],[83,13780],{"className":13781,"style":1969},[1892],[83,13783,11531],{"className":13784},[1884],[83,13786],{"className":13787,"style":1969},[1892],[83,13789,1848],{"className":13790},[1973],[83,13792],{"className":13793,"style":1969},[1892],[83,13795,11539],{"className":13796},[1884],[83,13798,505],{"className":13799},[5890],[83,13801,180],{"className":13802},[5796],[83,13804,13282],{"className":13805},[1884],[83,13807],{"className":13808,"style":1969},[1892],[83,13810,1848],{"className":13811},[1973],[83,13813],{"className":13814,"style":1969},[1892],[83,13816,13291],{"className":13817},[1884],[83,13819],{"className":13820,"style":1969},[1892],[83,13822,1848],{"className":13823},[1973],[83,13825],{"className":13826,"style":1969},[1892],[83,13828,13300],{"className":13829},[1884],[83,13831,505],{"className":13832},[5890],[83,13834,1956],{"className":13835},[1955],[83,13837,13839],{"className":13838},[1928],[83,13840,13843],{"className":13841,"style":13842},[1932],"height:0.936em;",[83,13844],{},[83,13846],{"className":13847},[5890,8860],[83,13849,13851],{"className":13850},[1809],[83,13852,13854,13914],{"className":13853},[1813],[83,13855,13857],{"className":13856},[1817],[1819,13858,13859],{"xmlns":1821,"display":1822},[1824,13860,13861,13911],{},[1827,13862,13863,13869,13871,13887,13889,13895],{},[1837,13864,13865,13867],{},[1840,13866,1842],{},[1844,13868,398],{},[1834,13870,216],{},[8767,13872,13873,13885],{},[1827,13874,13875,13877,13879,13881,13883],{},[1844,13876,13282],{},[1834,13878,1848],{},[1844,13880,13291],{},[1834,13882,1848],{},[1844,13884,13300],{},[1844,13886,13272],{},[1834,13888,5469],{},[1837,13890,13891,13893],{},[1840,13892,1842],{},[1844,13894,1855],{},[8767,13896,13897,13909],{},[1827,13898,13899,13901,13903,13905,13907],{},[1844,13900,11523],{},[1834,13902,1848],{},[1844,13904,11531],{},[1834,13906,1848],{},[1844,13908,11539],{},[1844,13910,13272],{},[1863,13912,13913],{"encoding":1865},"\\beta_0 = \\frac{100000 + 200000 + 300000}{3} - \\beta_1 \\frac{50 + 100 + 150}{3}",[83,13915,13917,13972,14074],{"className":13916,"ariaHidden":1871},[1870],[83,13918,13920,13923,13963,13966,13969],{"className":13919},[1875],[83,13921],{"className":13922,"style":1907},[1879],[83,13924,13926,13929],{"className":13925},[1884],[83,13927,1842],{"className":13928,"style":1915},[1884,1914],[83,13930,13932],{"className":13931},[1919],[83,13933,13935,13955],{"className":13934},[1923,1924],[83,13936,13938,13952],{"className":13937},[1928],[83,13939,13941],{"className":13940,"style":1933},[1932],[83,13942,13943,13946],{"style":1936},[83,13944],{"className":13945,"style":1941},[1940],[83,13947,13949],{"className":13948},[1945,1946,1947,1948],[83,13950,398],{"className":13951},[1884,1948],[83,13953,1956],{"className":13954},[1955],[83,13956,13958],{"className":13957},[1928],[83,13959,13961],{"className":13960,"style":1963},[1932],[83,13962],{},[83,13964],{"className":13965,"style":1893},[1892],[83,13967,216],{"className":13968},[1897],[83,13970],{"className":13971,"style":1893},[1892],[83,13973,13975,13979,14065,14068,14071],{"className":13974},[1875],[83,13976],{"className":13977,"style":13978},[1879],"height:2.0074em;vertical-align:-0.686em;",[83,13980,13982,13985,14062],{"className":13981},[1884],[83,13983],{"className":13984},[5796,8860],[83,13986,13988],{"className":13987},[8767],[83,13989,13991,14054],{"className":13990},[1923,1924],[83,13992,13994,14051],{"className":13993},[1928],[83,13995,13997,14008,14016],{"className":13996,"style":8873},[1932],[83,13998,13999,14002],{"style":8876},[83,14000],{"className":14001,"style":8329},[1940],[83,14003,14005],{"className":14004},[1884],[83,14006,13272],{"className":14007},[1884],[83,14009,14010,14013],{"style":8888},[83,14011],{"className":14012,"style":8329},[1940],[83,14014],{"className":14015,"style":8896},[8895],[83,14017,14018,14021],{"style":8899},[83,14019],{"className":14020,"style":8329},[1940],[83,14022,14024,14027,14030,14033,14036,14039,14042,14045,14048],{"className":14023},[1884],[83,14025,13282],{"className":14026},[1884],[83,14028],{"className":14029,"style":1969},[1892],[83,14031,1848],{"className":14032},[1973],[83,14034],{"className":14035,"style":1969},[1892],[83,14037,13291],{"className":14038},[1884],[83,14040],{"className":14041,"style":1969},[1892],[83,14043,1848],{"className":14044},[1973],[83,14046],{"className":14047,"style":1969},[1892],[83,14049,13300],{"className":14050},[1884],[83,14052,1956],{"className":14053},[1955],[83,14055,14057],{"className":14056},[1928],[83,14058,14060],{"className":14059,"style":8918},[1932],[83,14061],{},[83,14063],{"className":14064},[5890,8860],[83,14066],{"className":14067,"style":1969},[1892],[83,14069,5469],{"className":14070},[1973],[83,14072],{"className":14073,"style":1969},[1892],[83,14075,14077,14080,14120],{"className":14076},[1875],[83,14078],{"className":14079,"style":13978},[1879],[83,14081,14083,14086],{"className":14082},[1884],[83,14084,1842],{"className":14085,"style":1915},[1884,1914],[83,14087,14089],{"className":14088},[1919],[83,14090,14092,14112],{"className":14091},[1923,1924],[83,14093,14095,14109],{"className":14094},[1928],[83,14096,14098],{"className":14097,"style":1933},[1932],[83,14099,14100,14103],{"style":1936},[83,14101],{"className":14102,"style":1941},[1940],[83,14104,14106],{"className":14105},[1945,1946,1947,1948],[83,14107,1855],{"className":14108},[1884,1948],[83,14110,1956],{"className":14111},[1955],[83,14113,14115],{"className":14114},[1928],[83,14116,14118],{"className":14117,"style":1963},[1932],[83,14119],{},[83,14121,14123,14126,14203],{"className":14122},[1884],[83,14124],{"className":14125},[5796,8860],[83,14127,14129],{"className":14128},[8767],[83,14130,14132,14195],{"className":14131},[1923,1924],[83,14133,14135,14192],{"className":14134},[1928],[83,14136,14138,14149,14157],{"className":14137,"style":8873},[1932],[83,14139,14140,14143],{"style":8876},[83,14141],{"className":14142,"style":8329},[1940],[83,14144,14146],{"className":14145},[1884],[83,14147,13272],{"className":14148},[1884],[83,14150,14151,14154],{"style":8888},[83,14152],{"className":14153,"style":8329},[1940],[83,14155],{"className":14156,"style":8896},[8895],[83,14158,14159,14162],{"style":8899},[83,14160],{"className":14161,"style":8329},[1940],[83,14163,14165,14168,14171,14174,14177,14180,14183,14186,14189],{"className":14164},[1884],[83,14166,11523],{"className":14167},[1884],[83,14169],{"className":14170,"style":1969},[1892],[83,14172,1848],{"className":14173},[1973],[83,14175],{"className":14176,"style":1969},[1892],[83,14178,11531],{"className":14179},[1884],[83,14181],{"className":14182,"style":1969},[1892],[83,14184,1848],{"className":14185},[1973],[83,14187],{"className":14188,"style":1969},[1892],[83,14190,11539],{"className":14191},[1884],[83,14193,1956],{"className":14194},[1955],[83,14196,14198],{"className":14197},[1928],[83,14199,14201],{"className":14200,"style":8918},[1932],[83,14202],{},[83,14204],{"className":14205},[5890,8860],[12,14207,14208,14209,1626,14301,14394],{},"Solving these formulas, we obtain the values ​​of ",[83,14210,14212,14234],{"className":14211},[1813],[83,14213,14215],{"className":14214},[1817],[1819,14216,14217],{"xmlns":1821},[1824,14218,14219,14231],{},[1827,14220,14221,14227,14229],{},[1837,14222,14223,14225],{},[1840,14224,1842],{},[1844,14226,398],{},[1834,14228,216],{},[1844,14230,398],{},[1863,14232,14233],{"encoding":1865},"\\beta_0 = 0",[83,14235,14237,14292],{"className":14236,"ariaHidden":1871},[1870],[83,14238,14240,14243,14283,14286,14289],{"className":14239},[1875],[83,14241],{"className":14242,"style":1907},[1879],[83,14244,14246,14249],{"className":14245},[1884],[83,14247,1842],{"className":14248,"style":1915},[1884,1914],[83,14250,14252],{"className":14251},[1919],[83,14253,14255,14275],{"className":14254},[1923,1924],[83,14256,14258,14272],{"className":14257},[1928],[83,14259,14261],{"className":14260,"style":1933},[1932],[83,14262,14263,14266],{"style":1936},[83,14264],{"className":14265,"style":1941},[1940],[83,14267,14269],{"className":14268},[1945,1946,1947,1948],[83,14270,398],{"className":14271},[1884,1948],[83,14273,1956],{"className":14274},[1955],[83,14276,14278],{"className":14277},[1928],[83,14279,14281],{"className":14280,"style":1963},[1932],[83,14282],{},[83,14284],{"className":14285,"style":1893},[1892],[83,14287,216],{"className":14288},[1897],[83,14290],{"className":14291,"style":1893},[1892],[83,14293,14295,14298],{"className":14294},[1875],[83,14296],{"className":14297,"style":5380},[1879],[83,14299,398],{"className":14300},[1884],[83,14302,14304,14327],{"className":14303},[1813],[83,14305,14307],{"className":14306},[1817],[1819,14308,14309],{"xmlns":1821},[1824,14310,14311,14324],{},[1827,14312,14313,14319,14321],{},[1837,14314,14315,14317],{},[1840,14316,1842],{},[1844,14318,1855],{},[1834,14320,216],{},[1844,14322,14323],{},"2000",[1863,14325,14326],{"encoding":1865},"\\beta_1 = 2000",[83,14328,14330,14385],{"className":14329,"ariaHidden":1871},[1870],[83,14331,14333,14336,14376,14379,14382],{"className":14332},[1875],[83,14334],{"className":14335,"style":1907},[1879],[83,14337,14339,14342],{"className":14338},[1884],[83,14340,1842],{"className":14341,"style":1915},[1884,1914],[83,14343,14345],{"className":14344},[1919],[83,14346,14348,14368],{"className":14347},[1923,1924],[83,14349,14351,14365],{"className":14350},[1928],[83,14352,14354],{"className":14353,"style":1933},[1932],[83,14355,14356,14359],{"style":1936},[83,14357],{"className":14358,"style":1941},[1940],[83,14360,14362],{"className":14361},[1945,1946,1947,1948],[83,14363,1855],{"className":14364},[1884,1948],[83,14366,1956],{"className":14367},[1955],[83,14369,14371],{"className":14370},[1928],[83,14372,14374],{"className":14373,"style":1963},[1932],[83,14375],{},[83,14377],{"className":14378,"style":1893},[1892],[83,14380,216],{"className":14381},[1897],[83,14383],{"className":14384,"style":1893},[1892],[83,14386,14388,14391],{"className":14387},[1875],[83,14389],{"className":14390,"style":5380},[1879],[83,14392,14323],{"className":14393},[1884],", which allow us to build the following model:",[83,14396,14398],{"className":14397},[1809],[83,14399,14401,14429],{"className":14400},[1813],[83,14402,14404],{"className":14403},[1817],[1819,14405,14406],{"xmlns":1821,"display":1822},[1824,14407,14408,14426],{},[1827,14409,14410,14416,14418,14420,14422,14424],{},[8164,14411,14412,14414],{"accent":1871},[1840,14413,3414],{},[1834,14415,8174],{},[1834,14417,216],{},[1844,14419,398],{},[1834,14421,1848],{},[1844,14423,14323],{},[1840,14425,1311],{},[1863,14427,14428],{"encoding":1865},"\\hat{y} = 0 + 2000x",[83,14430,14432,14489,14508],{"className":14431,"ariaHidden":1871},[1870],[83,14433,14435,14438,14480,14483,14486],{"className":14434},[1875],[83,14436],{"className":14437,"style":1907},[1879],[83,14439,14441],{"className":14440},[1884,8312],[83,14442,14444,14472],{"className":14443},[1923,1924],[83,14445,14447,14469],{"className":14446},[1928],[83,14448,14450,14458],{"className":14449,"style":1880},[1932],[83,14451,14452,14455],{"style":8325},[83,14453],{"className":14454,"style":8329},[1940],[83,14456,3414],{"className":14457,"style":5851},[1884,1914],[83,14459,14460,14463],{"style":8325},[83,14461],{"className":14462,"style":8329},[1940],[83,14464,14466],{"className":14465,"style":9376},[8379],[83,14467,8174],{"className":14468},[1884],[83,14470,1956],{"className":14471},[1955],[83,14473,14475],{"className":14474},[1928],[83,14476,14478],{"className":14477,"style":8393},[1932],[83,14479],{},[83,14481],{"className":14482,"style":1893},[1892],[83,14484,216],{"className":14485},[1897],[83,14487],{"className":14488,"style":1893},[1892],[83,14490,14492,14496,14499,14502,14505],{"className":14491},[1875],[83,14493],{"className":14494,"style":14495},[1879],"height:0.7278em;vertical-align:-0.0833em;",[83,14497,398],{"className":14498},[1884],[83,14500],{"className":14501,"style":1969},[1892],[83,14503,1848],{"className":14504},[1973],[83,14506],{"className":14507,"style":1969},[1892],[83,14509,14511,14514,14517],{"className":14510},[1875],[83,14512],{"className":14513,"style":5380},[1879],[83,14515,14323],{"className":14516},[1884],[83,14518,1311],{"className":14519},[1884,1914],[83,14521,14523],{"className":14522},[1809],[83,14524,14526,14550],{"className":14525},[1813],[83,14527,14529],{"className":14528},[1817],[1819,14530,14531],{"xmlns":1821,"display":1822},[1824,14532,14533,14547],{},[1827,14534,14535,14541,14543,14545],{},[8164,14536,14537,14539],{"accent":1871},[1840,14538,3414],{},[1834,14540,8174],{},[1834,14542,216],{},[1844,14544,14323],{},[1840,14546,1311],{},[1863,14548,14549],{"encoding":1865},"\\hat{y} = 2000x",[83,14551,14553,14610],{"className":14552,"ariaHidden":1871},[1870],[83,14554,14556,14559,14601,14604,14607],{"className":14555},[1875],[83,14557],{"className":14558,"style":1907},[1879],[83,14560,14562],{"className":14561},[1884,8312],[83,14563,14565,14593],{"className":14564},[1923,1924],[83,14566,14568,14590],{"className":14567},[1928],[83,14569,14571,14579],{"className":14570,"style":1880},[1932],[83,14572,14573,14576],{"style":8325},[83,14574],{"className":14575,"style":8329},[1940],[83,14577,3414],{"className":14578,"style":5851},[1884,1914],[83,14580,14581,14584],{"style":8325},[83,14582],{"className":14583,"style":8329},[1940],[83,14585,14587],{"className":14586,"style":9376},[8379],[83,14588,8174],{"className":14589},[1884],[83,14591,1956],{"className":14592},[1955],[83,14594,14596],{"className":14595},[1928],[83,14597,14599],{"className":14598,"style":8393},[1932],[83,14600],{},[83,14602],{"className":14603,"style":1893},[1892],[83,14605,216],{"className":14606},[1897],[83,14608],{"className":14609,"style":1893},[1892],[83,14611,14613,14616,14619],{"className":14612},[1875],[83,14614],{"className":14615,"style":5380},[1879],[83,14617,14323],{"className":14618},[1884],[83,14620,1311],{"className":14621},[1884,1914],[12,14623,14624],{},"We can now make predictions for new size values. For example, for a 120 m² house, the model predicts a price of:",[83,14626,14628],{"className":14627},[1809],[83,14629,14631,14667],{"className":14630},[1813],[83,14632,14634],{"className":14633},[1817],[1819,14635,14636],{"xmlns":1821,"display":1822},[1824,14637,14638,14664],{},[1827,14639,14640,14646,14648,14650,14652,14655,14657,14660,14662],{},[8164,14641,14642,14644],{"accent":1871},[1840,14643,3414],{},[1834,14645,8174],{},[1834,14647,216],{},[1844,14649,14323],{},[1834,14651,13279],{},[1844,14653,14654],{},"120",[1834,14656,216],{},[1844,14658,14659],{},"240",[1834,14661,243],{"separator":1871},[1844,14663,5466],{},[1863,14665,14666],{"encoding":1865},"\\hat{y} = 2000 * 120 = 240,000",[83,14668,14670,14727,14745,14763],{"className":14669,"ariaHidden":1871},[1870],[83,14671,14673,14676,14718,14721,14724],{"className":14672},[1875],[83,14674],{"className":14675,"style":1907},[1879],[83,14677,14679],{"className":14678},[1884,8312],[83,14680,14682,14710],{"className":14681},[1923,1924],[83,14683,14685,14707],{"className":14684},[1928],[83,14686,14688,14696],{"className":14687,"style":1880},[1932],[83,14689,14690,14693],{"style":8325},[83,14691],{"className":14692,"style":8329},[1940],[83,14694,3414],{"className":14695,"style":5851},[1884,1914],[83,14697,14698,14701],{"style":8325},[83,14699],{"className":14700,"style":8329},[1940],[83,14702,14704],{"className":14703,"style":9376},[8379],[83,14705,8174],{"className":14706},[1884],[83,14708,1956],{"className":14709},[1955],[83,14711,14713],{"className":14712},[1928],[83,14714,14716],{"className":14715,"style":8393},[1932],[83,14717],{},[83,14719],{"className":14720,"style":1893},[1892],[83,14722,216],{"className":14723},[1897],[83,14725],{"className":14726,"style":1893},[1892],[83,14728,14730,14733,14736,14739,14742],{"className":14729},[1875],[83,14731],{"className":14732,"style":5380},[1879],[83,14734,14323],{"className":14735},[1884],[83,14737],{"className":14738,"style":1969},[1892],[83,14740,13279],{"className":14741},[1973],[83,14743],{"className":14744,"style":1969},[1892],[83,14746,14748,14751,14754,14757,14760],{"className":14747},[1875],[83,14749],{"className":14750,"style":5380},[1879],[83,14752,14654],{"className":14753},[1884],[83,14755],{"className":14756,"style":1893},[1892],[83,14758,216],{"className":14759},[1897],[83,14761],{"className":14762,"style":1893},[1892],[83,14764,14766,14769,14772,14775,14778],{"className":14765},[1875],[83,14767],{"className":14768,"style":5482},[1879],[83,14770,14659],{"className":14771},[1884],[83,14773,243],{"className":14774},[5489],[83,14776],{"className":14777,"style":5493},[1892],[83,14779,5466],{"className":14780},[1884],[12,14782,14783,14784,14787],{},"Our calculations have yielded the best coefficients that ",[40,14785,14786],{},"minimize"," the mean squared error (but do not eliminate it completely). To measure the error of our model, we can calculate the MSE using the formula mentioned earlier:",[83,14789,14791],{"className":14790},[1809],[83,14792,14794,14859],{"className":14793},[1813],[83,14795,14797],{"className":14796},[1817],[1819,14798,14799],{"xmlns":1821,"display":1822},[1824,14800,14801,14857],{},[1827,14802,14803,14805,14807,14809,14811,14817,14831,14833,14839,14841,14851],{},[1840,14804,8757],{},[1840,14806,8760],{},[1840,14808,8763],{},[1834,14810,216],{},[8767,14812,14813,14815],{},[1844,14814,1855],{},[1840,14816,300],{},[8774,14818,14819,14821,14829],{},[1834,14820,8778],{},[1827,14822,14823,14825,14827],{},[1840,14824,6118],{},[1834,14826,216],{},[1844,14828,1855],{},[1840,14830,300],{},[1834,14832,180],{"stretchy":5711},[1837,14834,14835,14837],{},[1840,14836,3414],{},[1840,14838,6118],{},[1834,14840,5469],{},[8164,14842,14843,14849],{"accent":1871},[1837,14844,14845,14847],{},[1840,14846,3414],{},[1840,14848,6118],{},[1834,14850,8174],{},[3261,14852,14853,14855],{},[1834,14854,505],{"stretchy":5711},[1844,14856,2096],{},[1863,14858,8817],{"encoding":1865},[83,14860,14862,14886,15076],{"className":14861,"ariaHidden":1871},[1870],[83,14863,14865,14868,14871,14874,14877,14880,14883],{"className":14864},[1875],[83,14866],{"className":14867,"style":2038},[1879],[83,14869,8757],{"className":14870,"style":8830},[1884,1914],[83,14872,8760],{"className":14873,"style":8834},[1884,1914],[83,14875,8763],{"className":14876,"style":8834},[1884,1914],[83,14878],{"className":14879,"style":1893},[1892],[83,14881,216],{"className":14882},[1897],[83,14884],{"className":14885,"style":1893},[1892],[83,14887,14889,14892,14954,14957,15024,15027,15067,15070,15073],{"className":14888},[1875],[83,14890],{"className":14891,"style":8853},[1879],[83,14893,14895,14898,14951],{"className":14894},[1884],[83,14896],{"className":14897},[5796,8860],[83,14899,14901],{"className":14900},[8767],[83,14902,14904,14943],{"className":14903},[1923,1924],[83,14905,14907,14940],{"className":14906},[1928],[83,14908,14910,14921,14929],{"className":14909,"style":8873},[1932],[83,14911,14912,14915],{"style":8876},[83,14913],{"className":14914,"style":8329},[1940],[83,14916,14918],{"className":14917},[1884],[83,14919,300],{"className":14920},[1884,1914],[83,14922,14923,14926],{"style":8888},[83,14924],{"className":14925,"style":8329},[1940],[83,14927],{"className":14928,"style":8896},[8895],[83,14930,14931,14934],{"style":8899},[83,14932],{"className":14933,"style":8329},[1940],[83,14935,14937],{"className":14936},[1884],[83,14938,1855],{"className":14939},[1884],[83,14941,1956],{"className":14942},[1955],[83,14944,14946],{"className":14945},[1928],[83,14947,14949],{"className":14948,"style":8918},[1932],[83,14950],{},[83,14952],{"className":14953},[5890,8860],[83,14955],{"className":14956,"style":5493},[1892],[83,14958,14960],{"className":14959},[8930,8931],[83,14961,14963,15016],{"className":14962},[1923,1924],[83,14964,14966,15013],{"className":14965},[1928],[83,14967,14969,14989,14999],{"className":14968,"style":8941},[1932],[83,14970,14971,14974],{"style":8944},[83,14972],{"className":14973,"style":8948},[1940],[83,14975,14977],{"className":14976},[1945,1946,1947,1948],[83,14978,14980,14983,14986],{"className":14979},[1884,1948],[83,14981,6118],{"className":14982},[1884,1914,1948],[83,14984,216],{"className":14985},[1897,1948],[83,14987,1855],{"className":14988},[1884,1948],[83,14990,14991,14994],{"style":8966},[83,14992],{"className":14993,"style":8948},[1940],[83,14995,14996],{},[83,14997,8778],{"className":14998},[8930,8975,8976],[83,15000,15001,15004],{"style":8979},[83,15002],{"className":15003,"style":8948},[1940],[83,15005,15007],{"className":15006},[1945,1946,1947,1948],[83,15008,15010],{"className":15009},[1884,1948],[83,15011,300],{"className":15012},[1884,1914,1948],[83,15014,1956],{"className":15015},[1955],[83,15017,15019],{"className":15018},[1928],[83,15020,15022],{"className":15021,"style":9001},[1932],[83,15023],{},[83,15025,180],{"className":15026},[5796],[83,15028,15030,15033],{"className":15029},[1884],[83,15031,3414],{"className":15032,"style":5851},[1884,1914],[83,15034,15036],{"className":15035},[1919],[83,15037,15039,15059],{"className":15038},[1923,1924],[83,15040,15042,15056],{"className":15041},[1928],[83,15043,15045],{"className":15044,"style":6150},[1932],[83,15046,15047,15050],{"style":5866},[83,15048],{"className":15049,"style":1941},[1940],[83,15051,15053],{"className":15052},[1945,1946,1947,1948],[83,15054,6118],{"className":15055},[1884,1914,1948],[83,15057,1956],{"className":15058},[1955],[83,15060,15062],{"className":15061},[1928],[83,15063,15065],{"className":15064,"style":1963},[1932],[83,15066],{},[83,15068],{"className":15069,"style":1969},[1892],[83,15071,5469],{"className":15072},[1973],[83,15074],{"className":15075,"style":1969},[1892],[83,15077,15079,15082,15161],{"className":15078},[1875],[83,15080],{"className":15081,"style":9062},[1879],[83,15083,15085],{"className":15084},[1884,8312],[83,15086,15088,15153],{"className":15087},[1923,1924],[83,15089,15091,15150],{"className":15090},[1928],[83,15092,15094,15139],{"className":15093,"style":1880},[1932],[83,15095,15096,15099],{"style":8325},[83,15097],{"className":15098,"style":8329},[1940],[83,15100,15102,15105],{"className":15101},[1884],[83,15103,3414],{"className":15104,"style":5851},[1884,1914],[83,15106,15108],{"className":15107},[1919],[83,15109,15111,15131],{"className":15110},[1923,1924],[83,15112,15114,15128],{"className":15113},[1928],[83,15115,15117],{"className":15116,"style":6150},[1932],[83,15118,15119,15122],{"style":5866},[83,15120],{"className":15121,"style":1941},[1940],[83,15123,15125],{"className":15124},[1945,1946,1947,1948],[83,15126,6118],{"className":15127},[1884,1914,1948],[83,15129,1956],{"className":15130},[1955],[83,15132,15134],{"className":15133},[1928],[83,15135,15137],{"className":15136,"style":1963},[1932],[83,15138],{},[83,15140,15141,15144],{"style":8325},[83,15142],{"className":15143,"style":8329},[1940],[83,15145,15147],{"className":15146,"style":8380},[8379],[83,15148,8174],{"className":15149},[1884],[83,15151,1956],{"className":15152},[1955],[83,15154,15156],{"className":15155},[1928],[83,15157,15159],{"className":15158,"style":8393},[1932],[83,15160],{},[83,15162,15164,15167],{"className":15163},[5890],[83,15165,505],{"className":15166},[5890],[83,15168,15170],{"className":15169},[1919],[83,15171,15173],{"className":15172},[1923],[83,15174,15176],{"className":15175},[1928],[83,15177,15179],{"className":15178,"style":9160},[1932],[83,15180,15181,15184],{"style":9163},[83,15182],{"className":15183,"style":1941},[1940],[83,15185,15187],{"className":15186},[1945,1946,1947,1948],[83,15188,2096],{"className":15189},[1884,1948],[12,15191,7112],{},[1030,15193,15194,15224,15296],{},[1033,15195,15196,12964],{},[83,15197,15199,15212],{"className":15198},[1813],[83,15200,15202],{"className":15201},[1817],[1819,15203,15204],{"xmlns":1821},[1824,15205,15206,15210],{},[1827,15207,15208],{},[1840,15209,300],{},[1863,15211,300],{"encoding":1865},[83,15213,15215],{"className":15214,"ariaHidden":1871},[1870],[83,15216,15218,15221],{"className":15217},[1875],[83,15219],{"className":15220,"style":7106},[1879],[83,15222,300],{"className":15223},[1884,1914],[1033,15225,15226,15295],{},[83,15227,15229,15246],{"className":15228},[1813],[83,15230,15232],{"className":15231},[1817],[1819,15233,15234],{"xmlns":1821},[1824,15235,15236,15244],{},[1827,15237,15238],{},[1837,15239,15240,15242],{},[1840,15241,3414],{},[1840,15243,6118],{},[1863,15245,6194],{"encoding":1865},[83,15247,15249],{"className":15248,"ariaHidden":1871},[1870],[83,15250,15252,15255],{"className":15251},[1875],[83,15253],{"className":15254,"style":6204},[1879],[83,15256,15258,15261],{"className":15257},[1884],[83,15259,3414],{"className":15260,"style":5851},[1884,1914],[83,15262,15264],{"className":15263},[1919],[83,15265,15267,15287],{"className":15266},[1923,1924],[83,15268,15270,15284],{"className":15269},[1928],[83,15271,15273],{"className":15272,"style":6150},[1932],[83,15274,15275,15278],{"style":5866},[83,15276],{"className":15277,"style":1941},[1940],[83,15279,15281],{"className":15280},[1945,1946,1947,1948],[83,15282,6118],{"className":15283},[1884,1914,1948],[83,15285,1956],{"className":15286},[1955],[83,15288,15290],{"className":15289},[1928],[83,15291,15293],{"className":15292,"style":1963},[1932],[83,15294],{}," are the real values of price for each example.",[1033,15297,15298,15410],{},[83,15299,15301,15322],{"className":15300},[1813],[83,15302,15304],{"className":15303},[1817],[1819,15305,15306],{"xmlns":1821},[1824,15307,15308,15320],{},[1827,15309,15310],{},[1837,15311,15312,15318],{},[8164,15313,15314,15316],{"accent":1871},[1840,15315,3414],{},[1834,15317,8174],{},[1840,15319,6118],{},[1863,15321,9335],{"encoding":1865},[83,15323,15325],{"className":15324,"ariaHidden":1871},[1870],[83,15326,15328,15331],{"className":15327},[1875],[83,15329],{"className":15330,"style":1907},[1879],[83,15332,15334,15376],{"className":15333},[1884],[83,15335,15337],{"className":15336},[1884,8312],[83,15338,15340,15368],{"className":15339},[1923,1924],[83,15341,15343,15365],{"className":15342},[1928],[83,15344,15346,15354],{"className":15345,"style":1880},[1932],[83,15347,15348,15351],{"style":8325},[83,15349],{"className":15350,"style":8329},[1940],[83,15352,3414],{"className":15353,"style":5851},[1884,1914],[83,15355,15356,15359],{"style":8325},[83,15357],{"className":15358,"style":8329},[1940],[83,15360,15362],{"className":15361,"style":9376},[8379],[83,15363,8174],{"className":15364},[1884],[83,15366,1956],{"className":15367},[1955],[83,15369,15371],{"className":15370},[1928],[83,15372,15374],{"className":15373,"style":8393},[1932],[83,15375],{},[83,15377,15379],{"className":15378},[1919],[83,15380,15382,15402],{"className":15381},[1923,1924],[83,15383,15385,15399],{"className":15384},[1928],[83,15386,15388],{"className":15387,"style":6150},[1932],[83,15389,15390,15393],{"style":5866},[83,15391],{"className":15392,"style":1941},[1940],[83,15394,15396],{"className":15395},[1945,1946,1947,1948],[83,15397,6118],{"className":15398},[1884,1914,1948],[83,15400,1956],{"className":15401},[1955],[83,15403,15405],{"className":15404},[1928],[83,15406,15408],{"className":15407,"style":1963},[1932],[83,15409],{}," are the model predictions for each example, which are calculated using the linear regression model.",[1077,15412,15413],{},[1033,15414,15415],{},"We calculate the predictions for each example:",[1030,15417,15418,15613,15809],{},[1033,15419,15420,15421],{},"For 50 m²: ",[83,15422,15424,15462],{"className":15423},[1813],[83,15425,15427],{"className":15426},[1817],[1819,15428,15429],{"xmlns":1821},[1824,15430,15431,15459],{},[1827,15432,15433,15443,15445,15447,15449,15451,15453,15455,15457],{},[8164,15434,15435,15441],{"accent":1871},[1837,15436,15437,15439],{},[1840,15438,3414],{},[1844,15440,1855],{},[1834,15442,8174],{},[1834,15444,216],{},[1844,15446,14323],{},[1834,15448,13279],{},[1844,15450,11523],{},[1834,15452,216],{},[1844,15454,11531],{},[1834,15456,243],{"separator":1871},[1844,15458,5466],{},[1863,15460,15461],{"encoding":1865},"\\hat{y_1} = 2000 * 50 = 100,000",[83,15463,15465,15559,15577,15595],{"className":15464,"ariaHidden":1871},[1870],[83,15466,15468,15471,15550,15553,15556],{"className":15467},[1875],[83,15469],{"className":15470,"style":1907},[1879],[83,15472,15474],{"className":15473},[1884,8312],[83,15475,15477,15542],{"className":15476},[1923,1924],[83,15478,15480,15539],{"className":15479},[1928],[83,15481,15483,15528],{"className":15482,"style":1880},[1932],[83,15484,15485,15488],{"style":8325},[83,15486],{"className":15487,"style":8329},[1940],[83,15489,15491,15494],{"className":15490},[1884],[83,15492,3414],{"className":15493,"style":5851},[1884,1914],[83,15495,15497],{"className":15496},[1919],[83,15498,15500,15520],{"className":15499},[1923,1924],[83,15501,15503,15517],{"className":15502},[1928],[83,15504,15506],{"className":15505,"style":1933},[1932],[83,15507,15508,15511],{"style":5866},[83,15509],{"className":15510,"style":1941},[1940],[83,15512,15514],{"className":15513},[1945,1946,1947,1948],[83,15515,1855],{"className":15516},[1884,1948],[83,15518,1956],{"className":15519},[1955],[83,15521,15523],{"className":15522},[1928],[83,15524,15526],{"className":15525,"style":1963},[1932],[83,15527],{},[83,15529,15530,15533],{"style":8325},[83,15531],{"className":15532,"style":8329},[1940],[83,15534,15536],{"className":15535,"style":8380},[8379],[83,15537,8174],{"className":15538},[1884],[83,15540,1956],{"className":15541},[1955],[83,15543,15545],{"className":15544},[1928],[83,15546,15548],{"className":15547,"style":8393},[1932],[83,15549],{},[83,15551],{"className":15552,"style":1893},[1892],[83,15554,216],{"className":15555},[1897],[83,15557],{"className":15558,"style":1893},[1892],[83,15560,15562,15565,15568,15571,15574],{"className":15561},[1875],[83,15563],{"className":15564,"style":5380},[1879],[83,15566,14323],{"className":15567},[1884],[83,15569],{"className":15570,"style":1969},[1892],[83,15572,13279],{"className":15573},[1973],[83,15575],{"className":15576,"style":1969},[1892],[83,15578,15580,15583,15586,15589,15592],{"className":15579},[1875],[83,15581],{"className":15582,"style":5380},[1879],[83,15584,11523],{"className":15585},[1884],[83,15587],{"className":15588,"style":1893},[1892],[83,15590,216],{"className":15591},[1897],[83,15593],{"className":15594,"style":1893},[1892],[83,15596,15598,15601,15604,15607,15610],{"className":15597},[1875],[83,15599],{"className":15600,"style":5482},[1879],[83,15602,11531],{"className":15603},[1884],[83,15605,243],{"className":15606},[5489],[83,15608],{"className":15609,"style":5493},[1892],[83,15611,5466],{"className":15612},[1884],[1033,15614,15615,15616],{},"For 100 m²: ",[83,15617,15619,15658],{"className":15618},[1813],[83,15620,15622],{"className":15621},[1817],[1819,15623,15624],{"xmlns":1821},[1824,15625,15626,15655],{},[1827,15627,15628,15638,15640,15642,15644,15646,15648,15651,15653],{},[8164,15629,15630,15636],{"accent":1871},[1837,15631,15632,15634],{},[1840,15633,3414],{},[1844,15635,2096],{},[1834,15637,8174],{},[1834,15639,216],{},[1844,15641,14323],{},[1834,15643,13279],{},[1844,15645,11531],{},[1834,15647,216],{},[1844,15649,15650],{},"200",[1834,15652,243],{"separator":1871},[1844,15654,5466],{},[1863,15656,15657],{"encoding":1865},"\\hat{y_2} = 2000 * 100 = 200,000",[83,15659,15661,15755,15773,15791],{"className":15660,"ariaHidden":1871},[1870],[83,15662,15664,15667,15746,15749,15752],{"className":15663},[1875],[83,15665],{"className":15666,"style":1907},[1879],[83,15668,15670],{"className":15669},[1884,8312],[83,15671,15673,15738],{"className":15672},[1923,1924],[83,15674,15676,15735],{"className":15675},[1928],[83,15677,15679,15724],{"className":15678,"style":1880},[1932],[83,15680,15681,15684],{"style":8325},[83,15682],{"className":15683,"style":8329},[1940],[83,15685,15687,15690],{"className":15686},[1884],[83,15688,3414],{"className":15689,"style":5851},[1884,1914],[83,15691,15693],{"className":15692},[1919],[83,15694,15696,15716],{"className":15695},[1923,1924],[83,15697,15699,15713],{"className":15698},[1928],[83,15700,15702],{"className":15701,"style":1933},[1932],[83,15703,15704,15707],{"style":5866},[83,15705],{"className":15706,"style":1941},[1940],[83,15708,15710],{"className":15709},[1945,1946,1947,1948],[83,15711,2096],{"className":15712},[1884,1948],[83,15714,1956],{"className":15715},[1955],[83,15717,15719],{"className":15718},[1928],[83,15720,15722],{"className":15721,"style":1963},[1932],[83,15723],{},[83,15725,15726,15729],{"style":8325},[83,15727],{"className":15728,"style":8329},[1940],[83,15730,15732],{"className":15731,"style":8380},[8379],[83,15733,8174],{"className":15734},[1884],[83,15736,1956],{"className":15737},[1955],[83,15739,15741],{"className":15740},[1928],[83,15742,15744],{"className":15743,"style":8393},[1932],[83,15745],{},[83,15747],{"className":15748,"style":1893},[1892],[83,15750,216],{"className":15751},[1897],[83,15753],{"className":15754,"style":1893},[1892],[83,15756,15758,15761,15764,15767,15770],{"className":15757},[1875],[83,15759],{"className":15760,"style":5380},[1879],[83,15762,14323],{"className":15763},[1884],[83,15765],{"className":15766,"style":1969},[1892],[83,15768,13279],{"className":15769},[1973],[83,15771],{"className":15772,"style":1969},[1892],[83,15774,15776,15779,15782,15785,15788],{"className":15775},[1875],[83,15777],{"className":15778,"style":5380},[1879],[83,15780,11531],{"className":15781},[1884],[83,15783],{"className":15784,"style":1893},[1892],[83,15786,216],{"className":15787},[1897],[83,15789],{"className":15790,"style":1893},[1892],[83,15792,15794,15797,15800,15803,15806],{"className":15793},[1875],[83,15795],{"className":15796,"style":5482},[1879],[83,15798,15650],{"className":15799},[1884],[83,15801,243],{"className":15802},[5489],[83,15804],{"className":15805,"style":5493},[1892],[83,15807,5466],{"className":15808},[1884],[1033,15810,15811,15812],{},"For 150 m²: ",[83,15813,15815,15854],{"className":15814},[1813],[83,15816,15818],{"className":15817},[1817],[1819,15819,15820],{"xmlns":1821},[1824,15821,15822,15851],{},[1827,15823,15824,15834,15836,15838,15840,15842,15844,15847,15849],{},[8164,15825,15826,15832],{"accent":1871},[1837,15827,15828,15830],{},[1840,15829,3414],{},[1844,15831,13272],{},[1834,15833,8174],{},[1834,15835,216],{},[1844,15837,14323],{},[1834,15839,13279],{},[1844,15841,11539],{},[1834,15843,216],{},[1844,15845,15846],{},"300",[1834,15848,243],{"separator":1871},[1844,15850,5466],{},[1863,15852,15853],{"encoding":1865},"\\hat{y_3} = 2000 * 150 = 300,000",[83,15855,15857,15951,15969,15987],{"className":15856,"ariaHidden":1871},[1870],[83,15858,15860,15863,15942,15945,15948],{"className":15859},[1875],[83,15861],{"className":15862,"style":1907},[1879],[83,15864,15866],{"className":15865},[1884,8312],[83,15867,15869,15934],{"className":15868},[1923,1924],[83,15870,15872,15931],{"className":15871},[1928],[83,15873,15875,15920],{"className":15874,"style":1880},[1932],[83,15876,15877,15880],{"style":8325},[83,15878],{"className":15879,"style":8329},[1940],[83,15881,15883,15886],{"className":15882},[1884],[83,15884,3414],{"className":15885,"style":5851},[1884,1914],[83,15887,15889],{"className":15888},[1919],[83,15890,15892,15912],{"className":15891},[1923,1924],[83,15893,15895,15909],{"className":15894},[1928],[83,15896,15898],{"className":15897,"style":1933},[1932],[83,15899,15900,15903],{"style":5866},[83,15901],{"className":15902,"style":1941},[1940],[83,15904,15906],{"className":15905},[1945,1946,1947,1948],[83,15907,13272],{"className":15908},[1884,1948],[83,15910,1956],{"className":15911},[1955],[83,15913,15915],{"className":15914},[1928],[83,15916,15918],{"className":15917,"style":1963},[1932],[83,15919],{},[83,15921,15922,15925],{"style":8325},[83,15923],{"className":15924,"style":8329},[1940],[83,15926,15928],{"className":15927,"style":8380},[8379],[83,15929,8174],{"className":15930},[1884],[83,15932,1956],{"className":15933},[1955],[83,15935,15937],{"className":15936},[1928],[83,15938,15940],{"className":15939,"style":8393},[1932],[83,15941],{},[83,15943],{"className":15944,"style":1893},[1892],[83,15946,216],{"className":15947},[1897],[83,15949],{"className":15950,"style":1893},[1892],[83,15952,15954,15957,15960,15963,15966],{"className":15953},[1875],[83,15955],{"className":15956,"style":5380},[1879],[83,15958,14323],{"className":15959},[1884],[83,15961],{"className":15962,"style":1969},[1892],[83,15964,13279],{"className":15965},[1973],[83,15967],{"className":15968,"style":1969},[1892],[83,15970,15972,15975,15978,15981,15984],{"className":15971},[1875],[83,15973],{"className":15974,"style":5380},[1879],[83,15976,11539],{"className":15977},[1884],[83,15979],{"className":15980,"style":1893},[1892],[83,15982,216],{"className":15983},[1897],[83,15985],{"className":15986,"style":1893},[1892],[83,15988,15990,15993,15996,15999,16002],{"className":15989},[1875],[83,15991],{"className":15992,"style":5482},[1879],[83,15994,15846],{"className":15995},[1884],[83,15997,243],{"className":15998},[5489],[83,16000],{"className":16001,"style":5493},[1892],[83,16003,5466],{"className":16004},[1884],[1077,16006,16007],{"start":103},[1033,16008,16009],{},"We calculate the errors for each example:",[83,16011,16013],{"className":16012},[1809],[83,16014,16016,16055],{"className":16015},[1813],[83,16017,16019],{"className":16018},[1817],[1819,16020,16021],{"xmlns":1821,"display":1822},[1824,16022,16023,16052],{},[1827,16024,16025,16032,16034,16040,16042],{},[1837,16026,16027,16030],{},[1840,16028,16029],{},"e",[1840,16031,6118],{},[1834,16033,216],{},[1837,16035,16036,16038],{},[1840,16037,3414],{},[1840,16039,6118],{},[1834,16041,5469],{},[8164,16043,16044,16050],{"accent":1871},[1837,16045,16046,16048],{},[1840,16047,3414],{},[1840,16049,6118],{},[1834,16051,8174],{},[1863,16053,16054],{"encoding":1865},"e_i = y_i - \\hat{y_i}",[83,16056,16058,16113,16168],{"className":16057,"ariaHidden":1871},[1870],[83,16059,16061,16064,16104,16107,16110],{"className":16060},[1875],[83,16062],{"className":16063,"style":6131},[1879],[83,16065,16067,16070],{"className":16066},[1884],[83,16068,16029],{"className":16069},[1884,1914],[83,16071,16073],{"className":16072},[1919],[83,16074,16076,16096],{"className":16075},[1923,1924],[83,16077,16079,16093],{"className":16078},[1928],[83,16080,16082],{"className":16081,"style":6150},[1932],[83,16083,16084,16087],{"style":5818},[83,16085],{"className":16086,"style":1941},[1940],[83,16088,16090],{"className":16089},[1945,1946,1947,1948],[83,16091,6118],{"className":16092},[1884,1914,1948],[83,16094,1956],{"className":16095},[1955],[83,16097,16099],{"className":16098},[1928],[83,16100,16102],{"className":16101,"style":1963},[1932],[83,16103],{},[83,16105],{"className":16106,"style":1893},[1892],[83,16108,216],{"className":16109},[1897],[83,16111],{"className":16112,"style":1893},[1892],[83,16114,16116,16119,16159,16162,16165],{"className":16115},[1875],[83,16117],{"className":16118,"style":8250},[1879],[83,16120,16122,16125],{"className":16121},[1884],[83,16123,3414],{"className":16124,"style":5851},[1884,1914],[83,16126,16128],{"className":16127},[1919],[83,16129,16131,16151],{"className":16130},[1923,1924],[83,16132,16134,16148],{"className":16133},[1928],[83,16135,16137],{"className":16136,"style":6150},[1932],[83,16138,16139,16142],{"style":5866},[83,16140],{"className":16141,"style":1941},[1940],[83,16143,16145],{"className":16144},[1945,1946,1947,1948],[83,16146,6118],{"className":16147},[1884,1914,1948],[83,16149,1956],{"className":16150},[1955],[83,16152,16154],{"className":16153},[1928],[83,16155,16157],{"className":16156,"style":1963},[1932],[83,16158],{},[83,16160],{"className":16161,"style":1969},[1892],[83,16163,5469],{"className":16164},[1973],[83,16166],{"className":16167,"style":1969},[1892],[83,16169,16171,16174],{"className":16170},[1875],[83,16172],{"className":16173,"style":1907},[1879],[83,16175,16177],{"className":16176},[1884,8312],[83,16178,16180,16245],{"className":16179},[1923,1924],[83,16181,16183,16242],{"className":16182},[1928],[83,16184,16186,16231],{"className":16185,"style":1880},[1932],[83,16187,16188,16191],{"style":8325},[83,16189],{"className":16190,"style":8329},[1940],[83,16192,16194,16197],{"className":16193},[1884],[83,16195,3414],{"className":16196,"style":5851},[1884,1914],[83,16198,16200],{"className":16199},[1919],[83,16201,16203,16223],{"className":16202},[1923,1924],[83,16204,16206,16220],{"className":16205},[1928],[83,16207,16209],{"className":16208,"style":6150},[1932],[83,16210,16211,16214],{"style":5866},[83,16212],{"className":16213,"style":1941},[1940],[83,16215,16217],{"className":16216},[1945,1946,1947,1948],[83,16218,6118],{"className":16219},[1884,1914,1948],[83,16221,1956],{"className":16222},[1955],[83,16224,16226],{"className":16225},[1928],[83,16227,16229],{"className":16228,"style":1963},[1932],[83,16230],{},[83,16232,16233,16236],{"style":8325},[83,16234],{"className":16235,"style":8329},[1940],[83,16237,16239],{"className":16238,"style":8380},[8379],[83,16240,8174],{"className":16241},[1884],[83,16243,1956],{"className":16244},[1955],[83,16246,16248],{"className":16247},[1928],[83,16249,16251],{"className":16250,"style":8393},[1932],[83,16252],{},[1030,16254,16255,16394,16533],{},[1033,16256,16257,16258],{},"Error for 50 m²: ",[83,16259,16261,16291],{"className":16260},[1813],[83,16262,16264],{"className":16263},[1817],[1819,16265,16266],{"xmlns":1821},[1824,16267,16268,16288],{},[1827,16269,16270,16276,16278,16280,16282,16284,16286],{},[1837,16271,16272,16274],{},[1840,16273,16029],{},[1844,16275,1855],{},[1834,16277,216],{},[1844,16279,13282],{},[1834,16281,5469],{},[1844,16283,13282],{},[1834,16285,216],{},[1844,16287,398],{},[1863,16289,16290],{"encoding":1865},"e_1 = 100000 - 100000 = 0",[83,16292,16294,16349,16367,16385],{"className":16293,"ariaHidden":1871},[1870],[83,16295,16297,16300,16340,16343,16346],{"className":16296},[1875],[83,16298],{"className":16299,"style":6131},[1879],[83,16301,16303,16306],{"className":16302},[1884],[83,16304,16029],{"className":16305},[1884,1914],[83,16307,16309],{"className":16308},[1919],[83,16310,16312,16332],{"className":16311},[1923,1924],[83,16313,16315,16329],{"className":16314},[1928],[83,16316,16318],{"className":16317,"style":1933},[1932],[83,16319,16320,16323],{"style":5818},[83,16321],{"className":16322,"style":1941},[1940],[83,16324,16326],{"className":16325},[1945,1946,1947,1948],[83,16327,1855],{"className":16328},[1884,1948],[83,16330,1956],{"className":16331},[1955],[83,16333,16335],{"className":16334},[1928],[83,16336,16338],{"className":16337,"style":1963},[1932],[83,16339],{},[83,16341],{"className":16342,"style":1893},[1892],[83,16344,216],{"className":16345},[1897],[83,16347],{"className":16348,"style":1893},[1892],[83,16350,16352,16355,16358,16361,16364],{"className":16351},[1875],[83,16353],{"className":16354,"style":14495},[1879],[83,16356,13282],{"className":16357},[1884],[83,16359],{"className":16360,"style":1969},[1892],[83,16362,5469],{"className":16363},[1973],[83,16365],{"className":16366,"style":1969},[1892],[83,16368,16370,16373,16376,16379,16382],{"className":16369},[1875],[83,16371],{"className":16372,"style":5380},[1879],[83,16374,13282],{"className":16375},[1884],[83,16377],{"className":16378,"style":1893},[1892],[83,16380,216],{"className":16381},[1897],[83,16383],{"className":16384,"style":1893},[1892],[83,16386,16388,16391],{"className":16387},[1875],[83,16389],{"className":16390,"style":5380},[1879],[83,16392,398],{"className":16393},[1884],[1033,16395,16396,16397],{},"Error for 100 m²: ",[83,16398,16400,16430],{"className":16399},[1813],[83,16401,16403],{"className":16402},[1817],[1819,16404,16405],{"xmlns":1821},[1824,16406,16407,16427],{},[1827,16408,16409,16415,16417,16419,16421,16423,16425],{},[1837,16410,16411,16413],{},[1840,16412,16029],{},[1844,16414,2096],{},[1834,16416,216],{},[1844,16418,13291],{},[1834,16420,5469],{},[1844,16422,13291],{},[1834,16424,216],{},[1844,16426,398],{},[1863,16428,16429],{"encoding":1865},"e_2 = 200000 - 200000 = 0",[83,16431,16433,16488,16506,16524],{"className":16432,"ariaHidden":1871},[1870],[83,16434,16436,16439,16479,16482,16485],{"className":16435},[1875],[83,16437],{"className":16438,"style":6131},[1879],[83,16440,16442,16445],{"className":16441},[1884],[83,16443,16029],{"className":16444},[1884,1914],[83,16446,16448],{"className":16447},[1919],[83,16449,16451,16471],{"className":16450},[1923,1924],[83,16452,16454,16468],{"className":16453},[1928],[83,16455,16457],{"className":16456,"style":1933},[1932],[83,16458,16459,16462],{"style":5818},[83,16460],{"className":16461,"style":1941},[1940],[83,16463,16465],{"className":16464},[1945,1946,1947,1948],[83,16466,2096],{"className":16467},[1884,1948],[83,16469,1956],{"className":16470},[1955],[83,16472,16474],{"className":16473},[1928],[83,16475,16477],{"className":16476,"style":1963},[1932],[83,16478],{},[83,16480],{"className":16481,"style":1893},[1892],[83,16483,216],{"className":16484},[1897],[83,16486],{"className":16487,"style":1893},[1892],[83,16489,16491,16494,16497,16500,16503],{"className":16490},[1875],[83,16492],{"className":16493,"style":14495},[1879],[83,16495,13291],{"className":16496},[1884],[83,16498],{"className":16499,"style":1969},[1892],[83,16501,5469],{"className":16502},[1973],[83,16504],{"className":16505,"style":1969},[1892],[83,16507,16509,16512,16515,16518,16521],{"className":16508},[1875],[83,16510],{"className":16511,"style":5380},[1879],[83,16513,13291],{"className":16514},[1884],[83,16516],{"className":16517,"style":1893},[1892],[83,16519,216],{"className":16520},[1897],[83,16522],{"className":16523,"style":1893},[1892],[83,16525,16527,16530],{"className":16526},[1875],[83,16528],{"className":16529,"style":5380},[1879],[83,16531,398],{"className":16532},[1884],[1033,16534,16535,16536],{},"Error for 150 m²: ",[83,16537,16539,16569],{"className":16538},[1813],[83,16540,16542],{"className":16541},[1817],[1819,16543,16544],{"xmlns":1821},[1824,16545,16546,16566],{},[1827,16547,16548,16554,16556,16558,16560,16562,16564],{},[1837,16549,16550,16552],{},[1840,16551,16029],{},[1844,16553,13272],{},[1834,16555,216],{},[1844,16557,13300],{},[1834,16559,5469],{},[1844,16561,13300],{},[1834,16563,216],{},[1844,16565,398],{},[1863,16567,16568],{"encoding":1865},"e_3 = 300000 - 300000 = 0",[83,16570,16572,16627,16645,16663],{"className":16571,"ariaHidden":1871},[1870],[83,16573,16575,16578,16618,16621,16624],{"className":16574},[1875],[83,16576],{"className":16577,"style":6131},[1879],[83,16579,16581,16584],{"className":16580},[1884],[83,16582,16029],{"className":16583},[1884,1914],[83,16585,16587],{"className":16586},[1919],[83,16588,16590,16610],{"className":16589},[1923,1924],[83,16591,16593,16607],{"className":16592},[1928],[83,16594,16596],{"className":16595,"style":1933},[1932],[83,16597,16598,16601],{"style":5818},[83,16599],{"className":16600,"style":1941},[1940],[83,16602,16604],{"className":16603},[1945,1946,1947,1948],[83,16605,13272],{"className":16606},[1884,1948],[83,16608,1956],{"className":16609},[1955],[83,16611,16613],{"className":16612},[1928],[83,16614,16616],{"className":16615,"style":1963},[1932],[83,16617],{},[83,16619],{"className":16620,"style":1893},[1892],[83,16622,216],{"className":16623},[1897],[83,16625],{"className":16626,"style":1893},[1892],[83,16628,16630,16633,16636,16639,16642],{"className":16629},[1875],[83,16631],{"className":16632,"style":14495},[1879],[83,16634,13300],{"className":16635},[1884],[83,16637],{"className":16638,"style":1969},[1892],[83,16640,5469],{"className":16641},[1973],[83,16643],{"className":16644,"style":1969},[1892],[83,16646,16648,16651,16654,16657,16660],{"className":16647},[1875],[83,16649],{"className":16650,"style":5380},[1879],[83,16652,13300],{"className":16653},[1884],[83,16655],{"className":16656,"style":1893},[1892],[83,16658,216],{"className":16659},[1897],[83,16661],{"className":16662,"style":1893},[1892],[83,16664,16666,16669],{"className":16665},[1875],[83,16667],{"className":16668,"style":5380},[1879],[83,16670,398],{"className":16671},[1884],[1077,16673,16674],{"start":116},[1033,16675,16676],{},"We square the errors and average them to obtain the MSE:",[83,16678,16680],{"className":16679},[1809],[83,16681,16683,16739],{"className":16682},[1813],[83,16684,16686],{"className":16685},[1817],[1819,16687,16688],{"xmlns":1821,"display":1822},[1824,16689,16690,16736],{},[1827,16691,16692,16694,16696,16698,16700,16706,16708,16714,16716,16722,16724,16730,16732,16734],{},[1840,16693,8757],{},[1840,16695,8760],{},[1840,16697,8763],{},[1834,16699,216],{},[8767,16701,16702,16704],{},[1844,16703,1855],{},[1844,16705,13272],{},[1834,16707,180],{"stretchy":5711},[3261,16709,16710,16712],{},[1844,16711,398],{},[1844,16713,2096],{},[1834,16715,1848],{},[3261,16717,16718,16720],{},[1844,16719,398],{},[1844,16721,2096],{},[1834,16723,1848],{},[3261,16725,16726,16728],{},[1844,16727,398],{},[1844,16729,2096],{},[1834,16731,505],{"stretchy":5711},[1834,16733,216],{},[1844,16735,398],{},[1863,16737,16738],{"encoding":1865},"MSE = \\frac{1}{3} (0^2 + 0^2 + 0^2) = 0",[83,16740,16742,16766,16875,16920,16967],{"className":16741,"ariaHidden":1871},[1870],[83,16743,16745,16748,16751,16754,16757,16760,16763],{"className":16744},[1875],[83,16746],{"className":16747,"style":2038},[1879],[83,16749,8757],{"className":16750,"style":8830},[1884,1914],[83,16752,8760],{"className":16753,"style":8834},[1884,1914],[83,16755,8763],{"className":16756,"style":8834},[1884,1914],[83,16758],{"className":16759,"style":1893},[1892],[83,16761,216],{"className":16762},[1897],[83,16764],{"className":16765,"style":1893},[1892],[83,16767,16769,16772,16834,16837,16866,16869,16872],{"className":16768},[1875],[83,16770],{"className":16771,"style":13978},[1879],[83,16773,16775,16778,16831],{"className":16774},[1884],[83,16776],{"className":16777},[5796,8860],[83,16779,16781],{"className":16780},[8767],[83,16782,16784,16823],{"className":16783},[1923,1924],[83,16785,16787,16820],{"className":16786},[1928],[83,16788,16790,16801,16809],{"className":16789,"style":8873},[1932],[83,16791,16792,16795],{"style":8876},[83,16793],{"className":16794,"style":8329},[1940],[83,16796,16798],{"className":16797},[1884],[83,16799,13272],{"className":16800},[1884],[83,16802,16803,16806],{"style":8888},[83,16804],{"className":16805,"style":8329},[1940],[83,16807],{"className":16808,"style":8896},[8895],[83,16810,16811,16814],{"style":8899},[83,16812],{"className":16813,"style":8329},[1940],[83,16815,16817],{"className":16816},[1884],[83,16818,1855],{"className":16819},[1884],[83,16821,1956],{"className":16822},[1955],[83,16824,16826],{"className":16825},[1928],[83,16827,16829],{"className":16828,"style":8918},[1932],[83,16830],{},[83,16832],{"className":16833},[5890,8860],[83,16835,180],{"className":16836},[5796],[83,16838,16840,16843],{"className":16839},[1884],[83,16841,398],{"className":16842},[1884],[83,16844,16846],{"className":16845},[1919],[83,16847,16849],{"className":16848},[1923],[83,16850,16852],{"className":16851},[1928],[83,16853,16855],{"className":16854,"style":9160},[1932],[83,16856,16857,16860],{"style":9163},[83,16858],{"className":16859,"style":1941},[1940],[83,16861,16863],{"className":16862},[1945,1946,1947,1948],[83,16864,2096],{"className":16865},[1884,1948],[83,16867],{"className":16868,"style":1969},[1892],[83,16870,1848],{"className":16871},[1973],[83,16873],{"className":16874,"style":1969},[1892],[83,16876,16878,16882,16911,16914,16917],{"className":16877},[1875],[83,16879],{"className":16880,"style":16881},[1879],"height:0.9474em;vertical-align:-0.0833em;",[83,16883,16885,16888],{"className":16884},[1884],[83,16886,398],{"className":16887},[1884],[83,16889,16891],{"className":16890},[1919],[83,16892,16894],{"className":16893},[1923],[83,16895,16897],{"className":16896},[1928],[83,16898,16900],{"className":16899,"style":9160},[1932],[83,16901,16902,16905],{"style":9163},[83,16903],{"className":16904,"style":1941},[1940],[83,16906,16908],{"className":16907},[1945,1946,1947,1948],[83,16909,2096],{"className":16910},[1884,1948],[83,16912],{"className":16913,"style":1969},[1892],[83,16915,1848],{"className":16916},[1973],[83,16918],{"className":16919,"style":1969},[1892],[83,16921,16923,16926,16955,16958,16961,16964],{"className":16922},[1875],[83,16924],{"className":16925,"style":9062},[1879],[83,16927,16929,16932],{"className":16928},[1884],[83,16930,398],{"className":16931},[1884],[83,16933,16935],{"className":16934},[1919],[83,16936,16938],{"className":16937},[1923],[83,16939,16941],{"className":16940},[1928],[83,16942,16944],{"className":16943,"style":9160},[1932],[83,16945,16946,16949],{"style":9163},[83,16947],{"className":16948,"style":1941},[1940],[83,16950,16952],{"className":16951},[1945,1946,1947,1948],[83,16953,2096],{"className":16954},[1884,1948],[83,16956,505],{"className":16957},[5890],[83,16959],{"className":16960,"style":1893},[1892],[83,16962,216],{"className":16963},[1897],[83,16965],{"className":16966,"style":1893},[1892],[83,16968,16970,16973],{"className":16969},[1875],[83,16971],{"className":16972,"style":5380},[1879],[83,16974,398],{"className":16975},[1884],[12,16977,16978,16979,16982,16983,17011],{},"For this case, an MSE of 0 indicates that the model predicts the real values perfectly for ",[40,16980,16981],{},"this training dataset",". Of course, in practice, real data will contain noise and will be even more variable, so the epsilon ",[83,16984,16986,16999],{"className":16985},[1813],[83,16987,16989],{"className":16988},[1817],[1819,16990,16991],{"xmlns":1821},[1824,16992,16993,16997],{},[1827,16994,16995],{},[1840,16996,6714],{},[1863,16998,7692],{"encoding":1865},[83,17000,17002],{"className":17001,"ariaHidden":1871},[1870],[83,17003,17005,17008],{"className":17004},[1875],[83,17006],{"className":17007,"style":7106},[1879],[83,17009,6714],{"className":17010},[1884,1914]," will not be zero.",[12,17013,17014,17015],{},"To explore more with regression, you can use this Google Colab that contains a complete example of linear regression with Python: ",[19,17016,17022],{"href":17017,"target":17018,"rel":17019},"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1yi8-fVw2Ak7pqYOzZsiT7NO_zccZrQir?usp=sharing","_blank",[17020,17021],"noopener","noreferrer","linear_regression",[29,17024],{},[53,17026,6335],{"id":17027},"classification",[12,17029,17030],{},"A classification problem aims to predict a categorical output variable based on a set of input variables. For example, predicting whether an email is spam or not spam based on its content, or determining whether an image contains a cat or a dog.",[12,17032,17033],{},"There are three main types of classification:",[1030,17035,17036,17042,17048],{},[1033,17037,17038,17041],{},[40,17039,17040],{},"Binary Classification",": When there are two possible classes. For example, classifying whether a patient has a disease (yes\u002Fno).",[1033,17043,17044,17047],{},[40,17045,17046],{},"Multi-class Classification",": When there are more than two possible classes. For example, classifying the type of flower (could be setosa, versicolor or virginica) based on its characteristics.",[1033,17049,17050,17053],{},[40,17051,17052],{},"Multi-label Classification",": When each example can belong to multiple classes, such as classifying the labels of a news article (politics, economy, sports) where an article can belong to several categories.",[1734,17055,17056],{},[12,17057,17058],{},"The difference between multi-class and multi-label classification is that in the former each example can only belong to one class, while in the latter an example can belong to multiple classes simultaneously.",[12,17060,17061],{},"Let's look a bit more at binary classification. In this case, the objective is to find a function that maps the inputs to one of the two possible classes.",[12,17063,17064,17065,17068,17069,17183],{},"The question that the binary classification model attempts to answer is: ",[40,17066,17067],{},"What is the probability that an example belongs to class 1 given a set of features?"," This can be expressed mathematically as:\n",[83,17070,17072,17112],{"className":17071},[1813],[83,17073,17075],{"className":17074},[1817],[1819,17076,17077],{"xmlns":1821},[1824,17078,17079,17109],{},[1827,17080,17081,17084,17086,17088,17090,17092,17095,17097,17099,17101,17103,17105,17107],{},[1840,17082,17083],{},"P",[1834,17085,180],{"stretchy":5711},[1840,17087,3414],{},[1834,17089,216],{},[1844,17091,1855],{},[1840,17093,17094],{"mathvariant":648},"∣",[1840,17096,1311],{},[1834,17098,505],{"stretchy":5711},[1834,17100,216],{},[1840,17102,3162],{},[1834,17104,180],{"stretchy":5711},[1840,17106,1311],{},[1834,17108,505],{"stretchy":5711},[1863,17110,17111],{"encoding":1865},"P(y=1|x) = f(x)",[83,17113,17115,17140,17165],{"className":17114,"ariaHidden":1871},[1870],[83,17116,17118,17121,17125,17128,17131,17134,17137],{"className":17117},[1875],[83,17119],{"className":17120,"style":5792},[1879],[83,17122,17083],{"className":17123,"style":17124},[1884,1914],"margin-right:0.1389em;",[83,17126,180],{"className":17127},[5796],[83,17129,3414],{"className":17130,"style":5851},[1884,1914],[83,17132],{"className":17133,"style":1893},[1892],[83,17135,216],{"className":17136},[1897],[83,17138],{"className":17139,"style":1893},[1892],[83,17141,17143,17146,17150,17153,17156,17159,17162],{"className":17142},[1875],[83,17144],{"className":17145,"style":5792},[1879],[83,17147,17149],{"className":17148},[1884],"1∣",[83,17151,1311],{"className":17152},[1884,1914],[83,17154,505],{"className":17155},[5890],[83,17157],{"className":17158,"style":1893},[1892],[83,17160,216],{"className":17161},[1897],[83,17163],{"className":17164,"style":1893},[1892],[83,17166,17168,17171,17174,17177,17180],{"className":17167},[1875],[83,17169],{"className":17170,"style":5792},[1879],[83,17172,3162],{"className":17173,"style":6288},[1884,1914],[83,17175,180],{"className":17176},[5796],[83,17178,1311],{"className":17179},[1884,1914],[83,17181,505],{"className":17182},[5890],"\nWhere:",[1030,17185,17186,17262],{},[1033,17187,17188,17261],{},[83,17189,17191,17219],{"className":17190},[1813],[83,17192,17194],{"className":17193},[1817],[1819,17195,17196],{"xmlns":1821},[1824,17197,17198,17216],{},[1827,17199,17200,17202,17204,17206,17208,17210,17212,17214],{},[1840,17201,17083],{},[1834,17203,180],{"stretchy":5711},[1840,17205,3414],{},[1834,17207,216],{},[1844,17209,1855],{},[1840,17211,17094],{"mathvariant":648},[1840,17213,1311],{},[1834,17215,505],{"stretchy":5711},[1863,17217,17218],{"encoding":1865},"P(y=1|x)",[83,17220,17222,17246],{"className":17221,"ariaHidden":1871},[1870],[83,17223,17225,17228,17231,17234,17237,17240,17243],{"className":17224},[1875],[83,17226],{"className":17227,"style":5792},[1879],[83,17229,17083],{"className":17230,"style":17124},[1884,1914],[83,17232,180],{"className":17233},[5796],[83,17235,3414],{"className":17236,"style":5851},[1884,1914],[83,17238],{"className":17239,"style":1893},[1892],[83,17241,216],{"className":17242},[1897],[83,17244],{"className":17245,"style":1893},[1892],[83,17247,17249,17252,17255,17258],{"className":17248},[1875],[83,17250],{"className":17251,"style":5792},[1879],[83,17253,17149],{"className":17254},[1884],[83,17256,1311],{"className":17257},[1884,1914],[83,17259,505],{"className":17260},[5890]," is the probability that the class is 1 given the feature vector x.",[1033,17263,17264,17308],{},[83,17265,17267,17287],{"className":17266},[1813],[83,17268,17270],{"className":17269},[1817],[1819,17271,17272],{"xmlns":1821},[1824,17273,17274,17284],{},[1827,17275,17276,17278,17280,17282],{},[1840,17277,3162],{},[1834,17279,180],{"stretchy":5711},[1840,17281,1311],{},[1834,17283,505],{"stretchy":5711},[1863,17285,17286],{"encoding":1865},"f(x)",[83,17288,17290],{"className":17289,"ariaHidden":1871},[1870],[83,17291,17293,17296,17299,17302,17305],{"className":17292},[1875],[83,17294],{"className":17295,"style":5792},[1879],[83,17297,3162],{"className":17298,"style":6288},[1884,1914],[83,17300,180],{"className":17301},[5796],[83,17303,1311],{"className":17304},[1884,1914],[83,17306,505],{"className":17307},[5890]," is the function that maps the features to the probability.",[12,17310,17311,17312,17315],{},"The most common model for binary classification is the ",[40,17313,17314],{},"logistic regression",", which has the following process:",[1077,17317,17318],{},[1033,17319,17320,17321,17324],{},"We calculate a ",[40,17322,17323],{},"linear combination"," of the features:",[83,17326,17328],{"className":17327},[1809],[83,17329,17331,17404],{"className":17330},[1813],[83,17332,17334],{"className":17333},[1817],[1819,17335,17336],{"xmlns":1821,"display":1822},[1824,17337,17338,17401],{},[1827,17339,17340,17343,17345,17351,17353,17359,17365,17367,17373,17379,17381,17383,17385,17387,17389,17395],{},[1840,17341,17342],{},"z",[1834,17344,216],{},[1837,17346,17347,17349],{},[1840,17348,1842],{},[1844,17350,398],{},[1834,17352,1848],{},[1837,17354,17355,17357],{},[1840,17356,1842],{},[1844,17358,1855],{},[1837,17360,17361,17363],{},[1840,17362,1311],{},[1844,17364,1855],{},[1834,17366,1848],{},[1837,17368,17369,17371],{},[1840,17370,1842],{},[1844,17372,2096],{},[1837,17374,17375,17377],{},[1840,17376,1311],{},[1844,17378,2096],{},[1834,17380,1848],{},[1840,17382,133],{"mathvariant":648},[1840,17384,133],{"mathvariant":648},[1840,17386,133],{"mathvariant":648},[1834,17388,1848],{},[1837,17390,17391,17393],{},[1840,17392,1842],{},[1840,17394,12],{},[1837,17396,17397,17399],{},[1840,17398,1311],{},[1840,17400,12],{},[1863,17402,17403],{"encoding":1865},"z = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + ... + \\beta_p x_p",[83,17405,17407,17426,17481,17576,17671,17689],{"className":17406,"ariaHidden":1871},[1870],[83,17408,17410,17413,17417,17420,17423],{"className":17409},[1875],[83,17411],{"className":17412,"style":7106},[1879],[83,17414,17342],{"className":17415,"style":17416},[1884,1914],"margin-right:0.044em;",[83,17418],{"className":17419,"style":1893},[1892],[83,17421,216],{"className":17422},[1897],[83,17424],{"className":17425,"style":1893},[1892],[83,17427,17429,17432,17472,17475,17478],{"className":17428},[1875],[83,17430],{"className":17431,"style":1907},[1879],[83,17433,17435,17438],{"className":17434},[1884],[83,17436,1842],{"className":17437,"style":1915},[1884,1914],[83,17439,17441],{"className":17440},[1919],[83,17442,17444,17464],{"className":17443},[1923,1924],[83,17445,17447,17461],{"className":17446},[1928],[83,17448,17450],{"className":17449,"style":1933},[1932],[83,17451,17452,17455],{"style":1936},[83,17453],{"className":17454,"style":1941},[1940],[83,17456,17458],{"className":17457},[1945,1946,1947,1948],[83,17459,398],{"className":17460},[1884,1948],[83,17462,1956],{"className":17463},[1955],[83,17465,17467],{"className":17466},[1928],[83,17468,17470],{"className":17469,"style":1963},[1932],[83,17471],{},[83,17473],{"className":17474,"style":1969},[1892],[83,17476,1848],{"className":17477},[1973],[83,17479],{"className":17480,"style":1969},[1892],[83,17482,17484,17487,17527,17567,17570,17573],{"className":17483},[1875],[83,17485],{"className":17486,"style":1907},[1879],[83,17488,17490,17493],{"className":17489},[1884],[83,17491,1842],{"className":17492,"style":1915},[1884,1914],[83,17494,17496],{"className":17495},[1919],[83,17497,17499,17519],{"className":17498},[1923,1924],[83,17500,17502,17516],{"className":17501},[1928],[83,17503,17505],{"className":17504,"style":1933},[1932],[83,17506,17507,17510],{"style":1936},[83,17508],{"className":17509,"style":1941},[1940],[83,17511,17513],{"className":17512},[1945,1946,1947,1948],[83,17514,1855],{"className":17515},[1884,1948],[83,17517,1956],{"className":17518},[1955],[83,17520,17522],{"className":17521},[1928],[83,17523,17525],{"className":17524,"style":1963},[1932],[83,17526],{},[83,17528,17530,17533],{"className":17529},[1884],[83,17531,1311],{"className":17532},[1884,1914],[83,17534,17536],{"className":17535},[1919],[83,17537,17539,17559],{"className":17538},[1923,1924],[83,17540,17542,17556],{"className":17541},[1928],[83,17543,17545],{"className":17544,"style":1933},[1932],[83,17546,17547,17550],{"style":5818},[83,17548],{"className":17549,"style":1941},[1940],[83,17551,17553],{"className":17552},[1945,1946,1947,1948],[83,17554,1855],{"className":17555},[1884,1948],[83,17557,1956],{"className":17558},[1955],[83,17560,17562],{"className":17561},[1928],[83,17563,17565],{"className":17564,"style":1963},[1932],[83,17566],{},[83,17568],{"className":17569,"style":1969},[1892],[83,17571,1848],{"className":17572},[1973],[83,17574],{"className":17575,"style":1969},[1892],[83,17577,17579,17582,17622,17662,17665,17668],{"className":17578},[1875],[83,17580],{"className":17581,"style":1907},[1879],[83,17583,17585,17588],{"className":17584},[1884],[83,17586,1842],{"className":17587,"style":1915},[1884,1914],[83,17589,17591],{"className":17590},[1919],[83,17592,17594,17614],{"className":17593},[1923,1924],[83,17595,17597,17611],{"className":17596},[1928],[83,17598,17600],{"className":17599,"style":1933},[1932],[83,17601,17602,17605],{"style":1936},[83,17603],{"className":17604,"style":1941},[1940],[83,17606,17608],{"className":17607},[1945,1946,1947,1948],[83,17609,2096],{"className":17610},[1884,1948],[83,17612,1956],{"className":17613},[1955],[83,17615,17617],{"className":17616},[1928],[83,17618,17620],{"className":17619,"style":1963},[1932],[83,17621],{},[83,17623,17625,17628],{"className":17624},[1884],[83,17626,1311],{"className":17627},[1884,1914],[83,17629,17631],{"className":17630},[1919],[83,17632,17634,17654],{"className":17633},[1923,1924],[83,17635,17637,17651],{"className":17636},[1928],[83,17638,17640],{"className":17639,"style":1933},[1932],[83,17641,17642,17645],{"style":5818},[83,17643],{"className":17644,"style":1941},[1940],[83,17646,17648],{"className":17647},[1945,1946,1947,1948],[83,17649,2096],{"className":17650},[1884,1948],[83,17652,1956],{"className":17653},[1955],[83,17655,17657],{"className":17656},[1928],[83,17658,17660],{"className":17659,"style":1963},[1932],[83,17661],{},[83,17663],{"className":17664,"style":1969},[1892],[83,17666,1848],{"className":17667},[1973],[83,17669],{"className":17670,"style":1969},[1892],[83,17672,17674,17677,17680,17683,17686],{"className":17673},[1875],[83,17675],{"className":17676,"style":6990},[1879],[83,17678,5998],{"className":17679},[1884],[83,17681],{"className":17682,"style":1969},[1892],[83,17684,1848],{"className":17685},[1973],[83,17687],{"className":17688,"style":1969},[1892],[83,17690,17692,17695,17735],{"className":17691},[1875],[83,17693],{"className":17694,"style":7009},[1879],[83,17696,17698,17701],{"className":17697},[1884],[83,17699,1842],{"className":17700,"style":1915},[1884,1914],[83,17702,17704],{"className":17703},[1919],[83,17705,17707,17727],{"className":17706},[1923,1924],[83,17708,17710,17724],{"className":17709},[1928],[83,17711,17713],{"className":17712,"style":6026},[1932],[83,17714,17715,17718],{"style":1936},[83,17716],{"className":17717,"style":1941},[1940],[83,17719,17721],{"className":17720},[1945,1946,1947,1948],[83,17722,12],{"className":17723},[1884,1914,1948],[83,17725,1956],{"className":17726},[1955],[83,17728,17730],{"className":17729},[1928],[83,17731,17733],{"className":17732,"style":7048},[1932],[83,17734],{},[83,17736,17738,17741],{"className":17737},[1884],[83,17739,1311],{"className":17740},[1884,1914],[83,17742,17744],{"className":17743},[1919],[83,17745,17747,17767],{"className":17746},[1923,1924],[83,17748,17750,17764],{"className":17749},[1928],[83,17751,17753],{"className":17752,"style":6026},[1932],[83,17754,17755,17758],{"style":5818},[83,17756],{"className":17757,"style":1941},[1940],[83,17759,17761],{"className":17760},[1945,1946,1947,1948],[83,17762,12],{"className":17763},[1884,1914,1948],[83,17765,1956],{"className":17766},[1955],[83,17768,17770],{"className":17769},[1928],[83,17771,17773],{"className":17772,"style":7048},[1932],[83,17774],{},[1077,17776,17777],{"start":103},[1033,17778,17779,17780,17783],{},"We apply the ",[40,17781,17782],{},"sigmoid function"," to obtain a probability:",[83,17785,17787],{"className":17786},[1809],[83,17788,17790,17833],{"className":17789},[1813],[83,17791,17793],{"className":17792},[1817],[1819,17794,17795],{"xmlns":1821,"display":1822},[1824,17796,17797,17830],{},[1827,17798,17799,17802,17804,17806,17808,17810],{},[1840,17800,17801],{},"σ",[1834,17803,180],{"stretchy":5711},[1840,17805,17342],{},[1834,17807,505],{"stretchy":5711},[1834,17809,216],{},[8767,17811,17812,17814],{},[1844,17813,1855],{},[1827,17815,17816,17818,17820],{},[1844,17817,1855],{},[1834,17819,1848],{},[3261,17821,17822,17824],{},[1840,17823,16029],{},[1827,17825,17826,17828],{},[1834,17827,5469],{},[1840,17829,17342],{},[1863,17831,17832],{"encoding":1865},"\\sigma(z) = \\frac{1}{1 + e^{-z}}",[83,17834,17836,17863],{"className":17835,"ariaHidden":1871},[1870],[83,17837,17839,17842,17845,17848,17851,17854,17857,17860],{"className":17838},[1875],[83,17840],{"className":17841,"style":5792},[1879],[83,17843,17801],{"className":17844,"style":5851},[1884,1914],[83,17846,180],{"className":17847},[5796],[83,17849,17342],{"className":17850,"style":17416},[1884,1914],[83,17852,505],{"className":17853},[5890],[83,17855],{"className":17856,"style":1893},[1892],[83,17858,216],{"className":17859},[1897],[83,17861],{"className":17862,"style":1893},[1892],[83,17864,17866,17870],{"className":17865},[1875],[83,17867],{"className":17868,"style":17869},[1879],"height:2.0908em;vertical-align:-0.7693em;",[83,17871,17873,17876,17975],{"className":17872},[1884],[83,17874],{"className":17875},[5796,8860],[83,17877,17879],{"className":17878},[8767],[83,17880,17882,17966],{"className":17881},[1923,1924],[83,17883,17885,17963],{"className":17884},[1928],[83,17886,17888,17944,17952],{"className":17887,"style":8873},[1932],[83,17889,17890,17893],{"style":8876},[83,17891],{"className":17892,"style":8329},[1940],[83,17894,17896,17899,17902,17905,17908],{"className":17895},[1884],[83,17897,1855],{"className":17898},[1884],[83,17900],{"className":17901,"style":1969},[1892],[83,17903,1848],{"className":17904},[1973],[83,17906],{"className":17907,"style":1969},[1892],[83,17909,17911,17914],{"className":17910},[1884],[83,17912,16029],{"className":17913},[1884,1914],[83,17915,17917],{"className":17916},[1919],[83,17918,17920],{"className":17919},[1923],[83,17921,17923],{"className":17922},[1928],[83,17924,17927],{"className":17925,"style":17926},[1932],"height:0.6973em;",[83,17928,17929,17932],{"style":10709},[83,17930],{"className":17931,"style":1941},[1940],[83,17933,17935],{"className":17934},[1945,1946,1947,1948],[83,17936,17938,17941],{"className":17937},[1884,1948],[83,17939,5469],{"className":17940},[1884,1948],[83,17942,17342],{"className":17943,"style":17416},[1884,1914,1948],[83,17945,17946,17949],{"style":8888},[83,17947],{"className":17948,"style":8329},[1940],[83,17950],{"className":17951,"style":8896},[8895],[83,17953,17954,17957],{"style":8899},[83,17955],{"className":17956,"style":8329},[1940],[83,17958,17960],{"className":17959},[1884],[83,17961,1855],{"className":17962},[1884],[83,17964,1956],{"className":17965},[1955],[83,17967,17969],{"className":17968},[1928],[83,17970,17973],{"className":17971,"style":17972},[1932],"height:0.7693em;",[83,17974],{},[83,17976],{"className":17977},[5890,8860],[1077,17979,17980],{"start":116},[1033,17981,17982],{},"Class probability:",[83,17984,17986],{"className":17985},[1809],[83,17987,17989,18107],{"className":17988},[1813],[83,17990,17992],{"className":17991},[1817],[1819,17993,17994],{"xmlns":1821,"display":1822},[1824,17995,17996,18104],{},[1827,17997,17998,18000,18002,18004,18006,18008,18010,18012,18014,18016,18018,18020,18022,18024,18026],{},[1840,17999,17083],{},[1834,18001,180],{"stretchy":5711},[1840,18003,3414],{},[1834,18005,216],{},[1844,18007,1855],{},[1840,18009,17094],{"mathvariant":648},[1840,18011,1311],{},[1834,18013,505],{"stretchy":5711},[1834,18015,216],{},[1840,18017,17801],{},[1834,18019,180],{"stretchy":5711},[1840,18021,17342],{},[1834,18023,505],{"stretchy":5711},[1834,18025,216],{},[8767,18027,18028,18030],{},[1844,18029,1855],{},[1827,18031,18032,18034,18036],{},[1844,18033,1855],{},[1834,18035,1848],{},[3261,18037,18038,18040],{},[1840,18039,16029],{},[1827,18041,18042,18044,18046,18052,18054,18060,18066,18068,18074,18080,18082,18084,18086,18088,18090,18096,18102],{},[1834,18043,5469],{},[1834,18045,180],{"stretchy":5711},[1837,18047,18048,18050],{},[1840,18049,1842],{},[1844,18051,398],{},[1834,18053,1848],{},[1837,18055,18056,18058],{},[1840,18057,1842],{},[1844,18059,1855],{},[1837,18061,18062,18064],{},[1840,18063,1311],{},[1844,18065,1855],{},[1834,18067,1848],{},[1837,18069,18070,18072],{},[1840,18071,1842],{},[1844,18073,2096],{},[1837,18075,18076,18078],{},[1840,18077,1311],{},[1844,18079,2096],{},[1834,18081,1848],{},[1840,18083,133],{"mathvariant":648},[1840,18085,133],{"mathvariant":648},[1840,18087,133],{"mathvariant":648},[1834,18089,1848],{},[1837,18091,18092,18094],{},[1840,18093,1842],{},[1840,18095,12],{},[1837,18097,18098,18100],{},[1840,18099,1311],{},[1840,18101,12],{},[1834,18103,505],{"stretchy":5711},[1863,18105,18106],{"encoding":1865},"P(y=1|x) = \\sigma(z) = \\frac{1}{1 + e^{-(\\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + ... + \\beta_p x_p)}}",[83,18108,18110,18134,18158,18185],{"className":18109,"ariaHidden":1871},[1870],[83,18111,18113,18116,18119,18122,18125,18128,18131],{"className":18112},[1875],[83,18114],{"className":18115,"style":5792},[1879],[83,18117,17083],{"className":18118,"style":17124},[1884,1914],[83,18120,180],{"className":18121},[5796],[83,18123,3414],{"className":18124,"style":5851},[1884,1914],[83,18126],{"className":18127,"style":1893},[1892],[83,18129,216],{"className":18130},[1897],[83,18132],{"className":18133,"style":1893},[1892],[83,18135,18137,18140,18143,18146,18149,18152,18155],{"className":18136},[1875],[83,18138],{"className":18139,"style":5792},[1879],[83,18141,17149],{"className":18142},[1884],[83,18144,1311],{"className":18145},[1884,1914],[83,18147,505],{"className":18148},[5890],[83,18150],{"className":18151,"style":1893},[1892],[83,18153,216],{"className":18154},[1897],[83,18156],{"className":18157,"style":1893},[1892],[83,18159,18161,18164,18167,18170,18173,18176,18179,18182],{"className":18160},[1875],[83,18162],{"className":18163,"style":5792},[1879],[83,18165,17801],{"className":18166,"style":5851},[1884,1914],[83,18168,180],{"className":18169},[5796],[83,18171,17342],{"className":18172,"style":17416},[1884,1914],[83,18174,505],{"className":18175},[5890],[83,18177],{"className":18178,"style":1893},[1892],[83,18180,216],{"className":18181},[1897],[83,18183],{"className":18184,"style":1893},[1892],[83,18186,18188,18192],{"className":18187},[1875],[83,18189],{"className":18190,"style":18191},[1879],"height:2.1248em;vertical-align:-0.8034em;",[83,18193,18195,18198,18606],{"className":18194},[1884],[83,18196],{"className":18197},[5796,8860],[83,18199,18201],{"className":18200},[8767],[83,18202,18204,18597],{"className":18203},[1923,1924],[83,18205,18207,18594],{"className":18206},[1928],[83,18208,18210,18575,18583],{"className":18209,"style":8873},[1932],[83,18211,18213,18216],{"style":18212},"top:-2.2799em;",[83,18214],{"className":18215,"style":8329},[1940],[83,18217,18219,18222,18225,18228,18231],{"className":18218},[1884],[83,18220,1855],{"className":18221},[1884],[83,18223],{"className":18224,"style":1969},[1892],[83,18226,1848],{"className":18227},[1973],[83,18229],{"className":18230,"style":1969},[1892],[83,18232,18234,18237],{"className":18233},[1884],[83,18235,16029],{"className":18236},[1884,1914],[83,18238,18240],{"className":18239},[1919],[83,18241,18243],{"className":18242},[1923],[83,18244,18246],{"className":18245},[1928],[83,18247,18250],{"className":18248,"style":18249},[1932],"height:0.8301em;",[83,18251,18253,18256],{"style":18252},"top:-3.0051em;margin-right:0.05em;",[83,18254],{"className":18255,"style":1941},[1940],[83,18257,18259],{"className":18258},[1945,1946,1947,1948],[83,18260,18262,18265,18268,18314,18317,18357,18398,18401,18441,18481,18484,18487,18490,18532,18572],{"className":18261},[1884,1948],[83,18263,5469],{"className":18264},[1884,1948],[83,18266,180],{"className":18267},[5796,1948],[83,18269,18271,18274],{"className":18270},[1884,1948],[83,18272,1842],{"className":18273,"style":1915},[1884,1914,1948],[83,18275,18277],{"className":18276},[1919],[83,18278,18280,18305],{"className":18279},[1923,1924],[83,18281,18283,18302],{"className":18282},[1928],[83,18284,18287],{"className":18285,"style":18286},[1932],"height:0.3173em;",[83,18288,18290,18294],{"style":18289},"top:-2.357em;margin-left:-0.0528em;margin-right:0.0714em;",[83,18291],{"className":18292,"style":18293},[1940],"height:2.5em;",[83,18295,18299],{"className":18296},[1945,18297,18298,1948],"reset-size3","size1",[83,18300,398],{"className":18301},[1884,1948],[83,18303,1956],{"className":18304},[1955],[83,18306,18308],{"className":18307},[1928],[83,18309,18312],{"className":18310,"style":18311},[1932],"height:0.143em;",[83,18313],{},[83,18315,1848],{"className":18316},[1973,1948],[83,18318,18320,18323],{"className":18319},[1884,1948],[83,18321,1842],{"className":18322,"style":1915},[1884,1914,1948],[83,18324,18326],{"className":18325},[1919],[83,18327,18329,18349],{"className":18328},[1923,1924],[83,18330,18332,18346],{"className":18331},[1928],[83,18333,18335],{"className":18334,"style":18286},[1932],[83,18336,18337,18340],{"style":18289},[83,18338],{"className":18339,"style":18293},[1940],[83,18341,18343],{"className":18342},[1945,18297,18298,1948],[83,18344,1855],{"className":18345},[1884,1948],[83,18347,1956],{"className":18348},[1955],[83,18350,18352],{"className":18351},[1928],[83,18353,18355],{"className":18354,"style":18311},[1932],[83,18356],{},[83,18358,18360,18363],{"className":18359},[1884,1948],[83,18361,1311],{"className":18362},[1884,1914,1948],[83,18364,18366],{"className":18365},[1919],[83,18367,18369,18390],{"className":18368},[1923,1924],[83,18370,18372,18387],{"className":18371},[1928],[83,18373,18375],{"className":18374,"style":18286},[1932],[83,18376,18378,18381],{"style":18377},"top:-2.357em;margin-left:0em;margin-right:0.0714em;",[83,18379],{"className":18380,"style":18293},[1940],[83,18382,18384],{"className":18383},[1945,18297,18298,1948],[83,18385,1855],{"className":18386},[1884,1948],[83,18388,1956],{"className":18389},[1955],[83,18391,18393],{"className":18392},[1928],[83,18394,18396],{"className":18395,"style":18311},[1932],[83,18397],{},[83,18399,1848],{"className":18400},[1973,1948],[83,18402,18404,18407],{"className":18403},[1884,1948],[83,18405,1842],{"className":18406,"style":1915},[1884,1914,1948],[83,18408,18410],{"className":18409},[1919],[83,18411,18413,18433],{"className":18412},[1923,1924],[83,18414,18416,18430],{"className":18415},[1928],[83,18417,18419],{"className":18418,"style":18286},[1932],[83,18420,18421,18424],{"style":18289},[83,18422],{"className":18423,"style":18293},[1940],[83,18425,18427],{"className":18426},[1945,18297,18298,1948],[83,18428,2096],{"className":18429},[1884,1948],[83,18431,1956],{"className":18432},[1955],[83,18434,18436],{"className":18435},[1928],[83,18437,18439],{"className":18438,"style":18311},[1932],[83,18440],{},[83,18442,18444,18447],{"className":18443},[1884,1948],[83,18445,1311],{"className":18446},[1884,1914,1948],[83,18448,18450],{"className":18449},[1919],[83,18451,18453,18473],{"className":18452},[1923,1924],[83,18454,18456,18470],{"className":18455},[1928],[83,18457,18459],{"className":18458,"style":18286},[1932],[83,18460,18461,18464],{"style":18377},[83,18462],{"className":18463,"style":18293},[1940],[83,18465,18467],{"className":18466},[1945,18297,18298,1948],[83,18468,2096],{"className":18469},[1884,1948],[83,18471,1956],{"className":18472},[1955],[83,18474,18476],{"className":18475},[1928],[83,18477,18479],{"className":18478,"style":18311},[1932],[83,18480],{},[83,18482,1848],{"className":18483},[1973,1948],[83,18485,5998],{"className":18486},[1884,1948],[83,18488,1848],{"className":18489},[1973,1948],[83,18491,18493,18496],{"className":18492},[1884,1948],[83,18494,1842],{"className":18495,"style":1915},[1884,1914,1948],[83,18497,18499],{"className":18498},[1919],[83,18500,18502,18523],{"className":18501},[1923,1924],[83,18503,18505,18520],{"className":18504},[1928],[83,18506,18509],{"className":18507,"style":18508},[1932],"height:0.1645em;",[83,18510,18511,18514],{"style":18289},[83,18512],{"className":18513,"style":18293},[1940],[83,18515,18517],{"className":18516},[1945,18297,18298,1948],[83,18518,12],{"className":18519},[1884,1914,1948],[83,18521,1956],{"className":18522},[1955],[83,18524,18526],{"className":18525},[1928],[83,18527,18530],{"className":18528,"style":18529},[1932],"height:0.2819em;",[83,18531],{},[83,18533,18535,18538],{"className":18534},[1884,1948],[83,18536,1311],{"className":18537},[1884,1914,1948],[83,18539,18541],{"className":18540},[1919],[83,18542,18544,18564],{"className":18543},[1923,1924],[83,18545,18547,18561],{"className":18546},[1928],[83,18548,18550],{"className":18549,"style":18508},[1932],[83,18551,18552,18555],{"style":18377},[83,18553],{"className":18554,"style":18293},[1940],[83,18556,18558],{"className":18557},[1945,18297,18298,1948],[83,18559,12],{"className":18560},[1884,1914,1948],[83,18562,1956],{"className":18563},[1955],[83,18565,18567],{"className":18566},[1928],[83,18568,18570],{"className":18569,"style":18529},[1932],[83,18571],{},[83,18573,505],{"className":18574},[5890,1948],[83,18576,18577,18580],{"style":8888},[83,18578],{"className":18579,"style":8329},[1940],[83,18581],{"className":18582,"style":8896},[8895],[83,18584,18585,18588],{"style":8899},[83,18586],{"className":18587,"style":8329},[1940],[83,18589,18591],{"className":18590},[1884],[83,18592,1855],{"className":18593},[1884],[83,18595,1956],{"className":18596},[1955],[83,18598,18600],{"className":18599},[1928],[83,18601,18604],{"className":18602,"style":18603},[1932],"height:0.8034em;",[83,18605],{},[83,18607],{"className":18608},[5890,8860],[12,18610,7112],{},[1030,18612,18613,18685,18881,19078],{},[1033,18614,18615,18684],{},[83,18616,18618,18635],{"className":18617},[1813],[83,18619,18621],{"className":18620},[1817],[1819,18622,18623],{"xmlns":1821},[1824,18624,18625,18633],{},[1827,18626,18627],{},[1837,18628,18629,18631],{},[1840,18630,1842],{},[1844,18632,398],{},[1863,18634,7367],{"encoding":1865},[83,18636,18638],{"className":18637,"ariaHidden":1871},[1870],[83,18639,18641,18644],{"className":18640},[1875],[83,18642],{"className":18643,"style":1907},[1879],[83,18645,18647,18650],{"className":18646},[1884],[83,18648,1842],{"className":18649,"style":1915},[1884,1914],[83,18651,18653],{"className":18652},[1919],[83,18654,18656,18676],{"className":18655},[1923,1924],[83,18657,18659,18673],{"className":18658},[1928],[83,18660,18662],{"className":18661,"style":1933},[1932],[83,18663,18664,18667],{"style":1936},[83,18665],{"className":18666,"style":1941},[1940],[83,18668,18670],{"className":18669},[1945,1946,1947,1948],[83,18671,398],{"className":18672},[1884,1948],[83,18674,1956],{"className":18675},[1955],[83,18677,18679],{"className":18678},[1928],[83,18680,18682],{"className":18681,"style":1963},[1932],[83,18683],{}," is the intercept.",[1033,18686,18687,7673],{},[83,18688,18690,18731],{"className":18689},[1813],[83,18691,18693],{"className":18692},[1817],[1819,18694,18695],{"xmlns":1821},[1824,18696,18697,18729],{},[1827,18698,18699,18705,18707,18713,18715,18717,18719,18721,18723],{},[1837,18700,18701,18703],{},[1840,18702,1842],{},[1844,18704,1855],{},[1834,18706,243],{"separator":1871},[1837,18708,18709,18711],{},[1840,18710,1842],{},[1844,18712,2096],{},[1834,18714,243],{"separator":1871},[1840,18716,133],{"mathvariant":648},[1840,18718,133],{"mathvariant":648},[1840,18720,133],{"mathvariant":648},[1834,18722,243],{"separator":1871},[1837,18724,18725,18727],{},[1840,18726,1842],{},[1840,18728,12],{},[1863,18730,7522],{"encoding":1865},[83,18732,18734],{"className":18733,"ariaHidden":1871},[1870],[83,18735,18737,18740,18780,18783,18786,18826,18829,18832,18835,18838,18841],{"className":18736},[1875],[83,18738],{"className":18739,"style":7009},[1879],[83,18741,18743,18746],{"className":18742},[1884],[83,18744,1842],{"className":18745,"style":1915},[1884,1914],[83,18747,18749],{"className":18748},[1919],[83,18750,18752,18772],{"className":18751},[1923,1924],[83,18753,18755,18769],{"className":18754},[1928],[83,18756,18758],{"className":18757,"style":1933},[1932],[83,18759,18760,18763],{"style":1936},[83,18761],{"className":18762,"style":1941},[1940],[83,18764,18766],{"className":18765},[1945,1946,1947,1948],[83,18767,1855],{"className":18768},[1884,1948],[83,18770,1956],{"className":18771},[1955],[83,18773,18775],{"className":18774},[1928],[83,18776,18778],{"className":18777,"style":1963},[1932],[83,18779],{},[83,18781,243],{"className":18782},[5489],[83,18784],{"className":18785,"style":5493},[1892],[83,18787,18789,18792],{"className":18788},[1884],[83,18790,1842],{"className":18791,"style":1915},[1884,1914],[83,18793,18795],{"className":18794},[1919],[83,18796,18798,18818],{"className":18797},[1923,1924],[83,18799,18801,18815],{"className":18800},[1928],[83,18802,18804],{"className":18803,"style":1933},[1932],[83,18805,18806,18809],{"style":1936},[83,18807],{"className":18808,"style":1941},[1940],[83,18810,18812],{"className":18811},[1945,1946,1947,1948],[83,18813,2096],{"className":18814},[1884,1948],[83,18816,1956],{"className":18817},[1955],[83,18819,18821],{"className":18820},[1928],[83,18822,18824],{"className":18823,"style":1963},[1932],[83,18825],{},[83,18827,243],{"className":18828},[5489],[83,18830],{"className":18831,"style":5493},[1892],[83,18833,5998],{"className":18834},[1884],[83,18836,243],{"className":18837},[5489],[83,18839],{"className":18840,"style":5493},[1892],[83,18842,18844,18847],{"className":18843},[1884],[83,18845,1842],{"className":18846,"style":1915},[1884,1914],[83,18848,18850],{"className":18849},[1919],[83,18851,18853,18873],{"className":18852},[1923,1924],[83,18854,18856,18870],{"className":18855},[1928],[83,18857,18859],{"className":18858,"style":6026},[1932],[83,18860,18861,18864],{"style":1936},[83,18862],{"className":18863,"style":1941},[1940],[83,18865,18867],{"className":18866},[1945,1946,1947,1948],[83,18868,12],{"className":18869},[1884,1914,1948],[83,18871,1956],{"className":18872},[1955],[83,18874,18876],{"className":18875},[1928],[83,18877,18879],{"className":18878,"style":7048},[1932],[83,18880],{},[1033,18882,18883,19077],{},[83,18884,18886,18927],{"className":18885},[1813],[83,18887,18889],{"className":18888},[1817],[1819,18890,18891],{"xmlns":1821},[1824,18892,18893,18925],{},[1827,18894,18895,18901,18903,18909,18911,18913,18915,18917,18919],{},[1837,18896,18897,18899],{},[1840,18898,1311],{},[1844,18900,1855],{},[1834,18902,243],{"separator":1871},[1837,18904,18905,18907],{},[1840,18906,1311],{},[1844,18908,2096],{},[1834,18910,243],{"separator":1871},[1840,18912,133],{"mathvariant":648},[1840,18914,133],{"mathvariant":648},[1840,18916,133],{"mathvariant":648},[1834,18918,243],{"separator":1871},[1837,18920,18921,18923],{},[1840,18922,1311],{},[1840,18924,12],{},[1863,18926,7192],{"encoding":1865},[83,18928,18930],{"className":18929,"ariaHidden":1871},[1870],[83,18931,18933,18936,18976,18979,18982,19022,19025,19028,19031,19034,19037],{"className":18932},[1875],[83,18934],{"className":18935,"style":7202},[1879],[83,18937,18939,18942],{"className":18938},[1884],[83,18940,1311],{"className":18941},[1884,1914],[83,18943,18945],{"className":18944},[1919],[83,18946,18948,18968],{"className":18947},[1923,1924],[83,18949,18951,18965],{"className":18950},[1928],[83,18952,18954],{"className":18953,"style":1933},[1932],[83,18955,18956,18959],{"style":5818},[83,18957],{"className":18958,"style":1941},[1940],[83,18960,18962],{"className":18961},[1945,1946,1947,1948],[83,18963,1855],{"className":18964},[1884,1948],[83,18966,1956],{"className":18967},[1955],[83,18969,18971],{"className":18970},[1928],[83,18972,18974],{"className":18973,"style":1963},[1932],[83,18975],{},[83,18977,243],{"className":18978},[5489],[83,18980],{"className":18981,"style":5493},[1892],[83,18983,18985,18988],{"className":18984},[1884],[83,18986,1311],{"className":18987},[1884,1914],[83,18989,18991],{"className":18990},[1919],[83,18992,18994,19014],{"className":18993},[1923,1924],[83,18995,18997,19011],{"className":18996},[1928],[83,18998,19000],{"className":18999,"style":1933},[1932],[83,19001,19002,19005],{"style":5818},[83,19003],{"className":19004,"style":1941},[1940],[83,19006,19008],{"className":19007},[1945,1946,1947,1948],[83,19009,2096],{"className":19010},[1884,1948],[83,19012,1956],{"className":19013},[1955],[83,19015,19017],{"className":19016},[1928],[83,19018,19020],{"className":19019,"style":1963},[1932],[83,19021],{},[83,19023,243],{"className":19024},[5489],[83,19026],{"className":19027,"style":5493},[1892],[83,19029,5998],{"className":19030},[1884],[83,19032,243],{"className":19033},[5489],[83,19035],{"className":19036,"style":5493},[1892],[83,19038,19040,19043],{"className":19039},[1884],[83,19041,1311],{"className":19042},[1884,1914],[83,19044,19046],{"className":19045},[1919],[83,19047,19049,19069],{"className":19048},[1923,1924],[83,19050,19052,19066],{"className":19051},[1928],[83,19053,19055],{"className":19054,"style":6026},[1932],[83,19056,19057,19060],{"style":5818},[83,19058],{"className":19059,"style":1941},[1940],[83,19061,19063],{"className":19062},[1945,1946,1947,1948],[83,19064,12],{"className":19065},[1884,1914,1948],[83,19067,1956],{"className":19068},[1955],[83,19070,19072],{"className":19071},[1928],[83,19073,19075],{"className":19074,"style":7048},[1932],[83,19076],{}," are the features or independent variables.",[1033,19079,19080,17261],{},[83,19081,19083,19110],{"className":19082},[1813],[83,19084,19086],{"className":19085},[1817],[1819,19087,19088],{"xmlns":1821},[1824,19089,19090,19108],{},[1827,19091,19092,19094,19096,19098,19100,19102,19104,19106],{},[1840,19093,17083],{},[1834,19095,180],{"stretchy":5711},[1840,19097,3414],{},[1834,19099,216],{},[1844,19101,1855],{},[1840,19103,17094],{"mathvariant":648},[1840,19105,1311],{},[1834,19107,505],{"stretchy":5711},[1863,19109,17218],{"encoding":1865},[83,19111,19113,19137],{"className":19112,"ariaHidden":1871},[1870],[83,19114,19116,19119,19122,19125,19128,19131,19134],{"className":19115},[1875],[83,19117],{"className":19118,"style":5792},[1879],[83,19120,17083],{"className":19121,"style":17124},[1884,1914],[83,19123,180],{"className":19124},[5796],[83,19126,3414],{"className":19127,"style":5851},[1884,1914],[83,19129],{"className":19130,"style":1893},[1892],[83,19132,216],{"className":19133},[1897],[83,19135],{"className":19136,"style":1893},[1892],[83,19138,19140,19143,19146,19149],{"className":19139},[1875],[83,19141],{"className":19142,"style":5792},[1879],[83,19144,17149],{"className":19145},[1884],[83,19147,1311],{"className":19148},[1884,1914],[83,19150,505],{"className":19151},[5890],[12,19153,19154],{},"Each feature provides evidence for or against a particular class. For example, if the word \"free\" appears in an email, it might increase the probability that it is spam. On the other hand, if the word \"meeting\" appears, it might decrease the probability of it being spam.",[1734,19156,19157],{},[12,19158,19159],{},"This gives us not only a classification but also a measure of confidence in that classification through the probability calculated by the sigmoid function.",[12,19161,19162],{},"The sigmoid function transforms any real value into a value between 0 and 1. The formula as shown above is:",[83,19164,19166],{"className":19165},[1809],[83,19167,19169,19210],{"className":19168},[1813],[83,19170,19172],{"className":19171},[1817],[1819,19173,19174],{"xmlns":1821,"display":1822},[1824,19175,19176,19208],{},[1827,19177,19178,19180,19182,19184,19186,19188],{},[1840,19179,17801],{},[1834,19181,180],{"stretchy":5711},[1840,19183,17342],{},[1834,19185,505],{"stretchy":5711},[1834,19187,216],{},[8767,19189,19190,19192],{},[1844,19191,1855],{},[1827,19193,19194,19196,19198],{},[1844,19195,1855],{},[1834,19197,1848],{},[3261,19199,19200,19202],{},[1840,19201,16029],{},[1827,19203,19204,19206],{},[1834,19205,5469],{},[1840,19207,17342],{},[1863,19209,17832],{"encoding":1865},[83,19211,19213,19240],{"className":19212,"ariaHidden":1871},[1870],[83,19214,19216,19219,19222,19225,19228,19231,19234,19237],{"className":19215},[1875],[83,19217],{"className":19218,"style":5792},[1879],[83,19220,17801],{"className":19221,"style":5851},[1884,1914],[83,19223,180],{"className":19224},[5796],[83,19226,17342],{"className":19227,"style":17416},[1884,1914],[83,19229,505],{"className":19230},[5890],[83,19232],{"className":19233,"style":1893},[1892],[83,19235,216],{"className":19236},[1897],[83,19238],{"className":19239,"style":1893},[1892],[83,19241,19243,19246],{"className":19242},[1875],[83,19244],{"className":19245,"style":17869},[1879],[83,19247,19249,19252,19349],{"className":19248},[1884],[83,19250],{"className":19251},[5796,8860],[83,19253,19255],{"className":19254},[8767],[83,19256,19258,19341],{"className":19257},[1923,1924],[83,19259,19261,19338],{"className":19260},[1928],[83,19262,19264,19319,19327],{"className":19263,"style":8873},[1932],[83,19265,19266,19269],{"style":8876},[83,19267],{"className":19268,"style":8329},[1940],[83,19270,19272,19275,19278,19281,19284],{"className":19271},[1884],[83,19273,1855],{"className":19274},[1884],[83,19276],{"className":19277,"style":1969},[1892],[83,19279,1848],{"className":19280},[1973],[83,19282],{"className":19283,"style":1969},[1892],[83,19285,19287,19290],{"className":19286},[1884],[83,19288,16029],{"className":19289},[1884,1914],[83,19291,19293],{"className":19292},[1919],[83,19294,19296],{"className":19295},[1923],[83,19297,19299],{"className":19298},[1928],[83,19300,19302],{"className":19301,"style":17926},[1932],[83,19303,19304,19307],{"style":10709},[83,19305],{"className":19306,"style":1941},[1940],[83,19308,19310],{"className":19309},[1945,1946,1947,1948],[83,19311,19313,19316],{"className":19312},[1884,1948],[83,19314,5469],{"className":19315},[1884,1948],[83,19317,17342],{"className":19318,"style":17416},[1884,1914,1948],[83,19320,19321,19324],{"style":8888},[83,19322],{"className":19323,"style":8329},[1940],[83,19325],{"className":19326,"style":8896},[8895],[83,19328,19329,19332],{"style":8899},[83,19330],{"className":19331,"style":8329},[1940],[83,19333,19335],{"className":19334},[1884],[83,19336,1855],{"className":19337},[1884],[83,19339,1956],{"className":19340},[1955],[83,19342,19344],{"className":19343},[1928],[83,19345,19347],{"className":19346,"style":17972},[1932],[83,19348],{},[83,19350],{"className":19351},[5890,8860],[12,19353,7112],{},[1030,19355,19356,19831,19862],{},[1033,19357,19358,19386,19387,133],{},[83,19359,19361,19374],{"className":19360},[1813],[83,19362,19364],{"className":19363},[1817],[1819,19365,19366],{"xmlns":1821},[1824,19367,19368,19372],{},[1827,19369,19370],{},[1840,19371,17342],{},[1863,19373,17342],{"encoding":1865},[83,19375,19377],{"className":19376,"ariaHidden":1871},[1870],[83,19378,19380,19383],{"className":19379},[1875],[83,19381],{"className":19382,"style":7106},[1879],[83,19384,17342],{"className":19385,"style":17416},[1884,1914]," is the linear combination of the features, that is, ",[83,19388,19390,19461],{"className":19389},[1813],[83,19391,19393],{"className":19392},[1817],[1819,19394,19395],{"xmlns":1821},[1824,19396,19397,19459],{},[1827,19398,19399,19401,19403,19409,19411,19417,19423,19425,19431,19437,19439,19441,19443,19445,19447,19453],{},[1840,19400,17342],{},[1834,19402,216],{},[1837,19404,19405,19407],{},[1840,19406,1842],{},[1844,19408,398],{},[1834,19410,1848],{},[1837,19412,19413,19415],{},[1840,19414,1842],{},[1844,19416,1855],{},[1837,19418,19419,19421],{},[1840,19420,1311],{},[1844,19422,1855],{},[1834,19424,1848],{},[1837,19426,19427,19429],{},[1840,19428,1842],{},[1844,19430,2096],{},[1837,19432,19433,19435],{},[1840,19434,1311],{},[1844,19436,2096],{},[1834,19438,1848],{},[1840,19440,133],{"mathvariant":648},[1840,19442,133],{"mathvariant":648},[1840,19444,133],{"mathvariant":648},[1834,19446,1848],{},[1837,19448,19449,19451],{},[1840,19450,1842],{},[1840,19452,12],{},[1837,19454,19455,19457],{},[1840,19456,1311],{},[1840,19458,12],{},[1863,19460,17403],{"encoding":1865},[83,19462,19464,19482,19537,19632,19727,19745],{"className":19463,"ariaHidden":1871},[1870],[83,19465,19467,19470,19473,19476,19479],{"className":19466},[1875],[83,19468],{"className":19469,"style":7106},[1879],[83,19471,17342],{"className":19472,"style":17416},[1884,1914],[83,19474],{"className":19475,"style":1893},[1892],[83,19477,216],{"className":19478},[1897],[83,19480],{"className":19481,"style":1893},[1892],[83,19483,19485,19488,19528,19531,19534],{"className":19484},[1875],[83,19486],{"className":19487,"style":1907},[1879],[83,19489,19491,19494],{"className":19490},[1884],[83,19492,1842],{"className":19493,"style":1915},[1884,1914],[83,19495,19497],{"className":19496},[1919],[83,19498,19500,19520],{"className":19499},[1923,1924],[83,19501,19503,19517],{"className":19502},[1928],[83,19504,19506],{"className":19505,"style":1933},[1932],[83,19507,19508,19511],{"style":1936},[83,19509],{"className":19510,"style":1941},[1940],[83,19512,19514],{"className":19513},[1945,1946,1947,1948],[83,19515,398],{"className":19516},[1884,1948],[83,19518,1956],{"className":19519},[1955],[83,19521,19523],{"className":19522},[1928],[83,19524,19526],{"className":19525,"style":1963},[1932],[83,19527],{},[83,19529],{"className":19530,"style":1969},[1892],[83,19532,1848],{"className":19533},[1973],[83,19535],{"className":19536,"style":1969},[1892],[83,19538,19540,19543,19583,19623,19626,19629],{"className":19539},[1875],[83,19541],{"className":19542,"style":1907},[1879],[83,19544,19546,19549],{"className":19545},[1884],[83,19547,1842],{"className":19548,"style":1915},[1884,1914],[83,19550,19552],{"className":19551},[1919],[83,19553,19555,19575],{"className":19554},[1923,1924],[83,19556,19558,19572],{"className":19557},[1928],[83,19559,19561],{"className":19560,"style":1933},[1932],[83,19562,19563,19566],{"style":1936},[83,19564],{"className":19565,"style":1941},[1940],[83,19567,19569],{"className":19568},[1945,1946,1947,1948],[83,19570,1855],{"className":19571},[1884,1948],[83,19573,1956],{"className":19574},[1955],[83,19576,19578],{"className":19577},[1928],[83,19579,19581],{"className":19580,"style":1963},[1932],[83,19582],{},[83,19584,19586,19589],{"className":19585},[1884],[83,19587,1311],{"className":19588},[1884,1914],[83,19590,19592],{"className":19591},[1919],[83,19593,19595,19615],{"className":19594},[1923,1924],[83,19596,19598,19612],{"className":19597},[1928],[83,19599,19601],{"className":19600,"style":1933},[1932],[83,19602,19603,19606],{"style":5818},[83,19604],{"className":19605,"style":1941},[1940],[83,19607,19609],{"className":19608},[1945,1946,1947,1948],[83,19610,1855],{"className":19611},[1884,1948],[83,19613,1956],{"className":19614},[1955],[83,19616,19618],{"className":19617},[1928],[83,19619,19621],{"className":19620,"style":1963},[1932],[83,19622],{},[83,19624],{"className":19625,"style":1969},[1892],[83,19627,1848],{"className":19628},[1973],[83,19630],{"className":19631,"style":1969},[1892],[83,19633,19635,19638,19678,19718,19721,19724],{"className":19634},[1875],[83,19636],{"className":19637,"style":1907},[1879],[83,19639,19641,19644],{"className":19640},[1884],[83,19642,1842],{"className":19643,"style":1915},[1884,1914],[83,19645,19647],{"className":19646},[1919],[83,19648,19650,19670],{"className":19649},[1923,1924],[83,19651,19653,19667],{"className":19652},[1928],[83,19654,19656],{"className":19655,"style":1933},[1932],[83,19657,19658,19661],{"style":1936},[83,19659],{"className":19660,"style":1941},[1940],[83,19662,19664],{"className":19663},[1945,1946,1947,1948],[83,19665,2096],{"className":19666},[1884,1948],[83,19668,1956],{"className":19669},[1955],[83,19671,19673],{"className":19672},[1928],[83,19674,19676],{"className":19675,"style":1963},[1932],[83,19677],{},[83,19679,19681,19684],{"className":19680},[1884],[83,19682,1311],{"className":19683},[1884,1914],[83,19685,19687],{"className":19686},[1919],[83,19688,19690,19710],{"className":19689},[1923,1924],[83,19691,19693,19707],{"className":19692},[1928],[83,19694,19696],{"className":19695,"style":1933},[1932],[83,19697,19698,19701],{"style":5818},[83,19699],{"className":19700,"style":1941},[1940],[83,19702,19704],{"className":19703},[1945,1946,1947,1948],[83,19705,2096],{"className":19706},[1884,1948],[83,19708,1956],{"className":19709},[1955],[83,19711,19713],{"className":19712},[1928],[83,19714,19716],{"className":19715,"style":1963},[1932],[83,19717],{},[83,19719],{"className":19720,"style":1969},[1892],[83,19722,1848],{"className":19723},[1973],[83,19725],{"className":19726,"style":1969},[1892],[83,19728,19730,19733,19736,19739,19742],{"className":19729},[1875],[83,19731],{"className":19732,"style":6990},[1879],[83,19734,5998],{"className":19735},[1884],[83,19737],{"className":19738,"style":1969},[1892],[83,19740,1848],{"className":19741},[1973],[83,19743],{"className":19744,"style":1969},[1892],[83,19746,19748,19751,19791],{"className":19747},[1875],[83,19749],{"className":19750,"style":7009},[1879],[83,19752,19754,19757],{"className":19753},[1884],[83,19755,1842],{"className":19756,"style":1915},[1884,1914],[83,19758,19760],{"className":19759},[1919],[83,19761,19763,19783],{"className":19762},[1923,1924],[83,19764,19766,19780],{"className":19765},[1928],[83,19767,19769],{"className":19768,"style":6026},[1932],[83,19770,19771,19774],{"style":1936},[83,19772],{"className":19773,"style":1941},[1940],[83,19775,19777],{"className":19776},[1945,1946,1947,1948],[83,19778,12],{"className":19779},[1884,1914,1948],[83,19781,1956],{"className":19782},[1955],[83,19784,19786],{"className":19785},[1928],[83,19787,19789],{"className":19788,"style":7048},[1932],[83,19790],{},[83,19792,19794,19797],{"className":19793},[1884],[83,19795,1311],{"className":19796},[1884,1914],[83,19798,19800],{"className":19799},[1919],[83,19801,19803,19823],{"className":19802},[1923,1924],[83,19804,19806,19820],{"className":19805},[1928],[83,19807,19809],{"className":19808,"style":6026},[1932],[83,19810,19811,19814],{"style":5818},[83,19812],{"className":19813,"style":1941},[1940],[83,19815,19817],{"className":19816},[1945,1946,1947,1948],[83,19818,12],{"className":19819},[1884,1914,1948],[83,19821,1956],{"className":19822},[1955],[83,19824,19826],{"className":19825},[1928],[83,19827,19829],{"className":19828,"style":7048},[1932],[83,19830],{},[1033,19832,19833,19861],{},[83,19834,19836,19849],{"className":19835},[1813],[83,19837,19839],{"className":19838},[1817],[1819,19840,19841],{"xmlns":1821},[1824,19842,19843,19847],{},[1827,19844,19845],{},[1840,19846,16029],{},[1863,19848,16029],{"encoding":1865},[83,19850,19852],{"className":19851,"ariaHidden":1871},[1870],[83,19853,19855,19858],{"className":19854},[1875],[83,19856],{"className":19857,"style":7106},[1879],[83,19859,16029],{"className":19860},[1884,1914]," is Euler's number, approximately equal to 2.71828.",[1033,19863,19864,19908],{},[83,19865,19867,19887],{"className":19866},[1813],[83,19868,19870],{"className":19869},[1817],[1819,19871,19872],{"xmlns":1821},[1824,19873,19874,19884],{},[1827,19875,19876,19878,19880,19882],{},[1840,19877,17801],{},[1834,19879,180],{"stretchy":5711},[1840,19881,17342],{},[1834,19883,505],{"stretchy":5711},[1863,19885,19886],{"encoding":1865},"\\sigma(z)",[83,19888,19890],{"className":19889,"ariaHidden":1871},[1870],[83,19891,19893,19896,19899,19902,19905],{"className":19892},[1875],[83,19894],{"className":19895,"style":5792},[1879],[83,19897,17801],{"className":19898,"style":5851},[1884,1914],[83,19900,180],{"className":19901},[5796],[83,19903,17342],{"className":19904,"style":17416},[1884,1914],[83,19906,505],{"className":19907},[5890]," is the output of the sigmoid function, which represents the probability of the class being 1 given the value of z (range between 0 and 1).",[12,19910,19911,19912,19955,19956,19960],{},"Visually it looks something like this (with z on the X-axis and ",[83,19913,19915,19934],{"className":19914},[1813],[83,19916,19918],{"className":19917},[1817],[1819,19919,19920],{"xmlns":1821},[1824,19921,19922,19932],{},[1827,19923,19924,19926,19928,19930],{},[1840,19925,17801],{},[1834,19927,180],{"stretchy":5711},[1840,19929,17342],{},[1834,19931,505],{"stretchy":5711},[1863,19933,19886],{"encoding":1865},[83,19935,19937],{"className":19936,"ariaHidden":1871},[1870],[83,19938,19940,19943,19946,19949,19952],{"className":19939},[1875],[83,19941],{"className":19942,"style":5792},[1879],[83,19944,17801],{"className":19945,"style":5851},[1884,1914],[83,19947,180],{"className":19948},[5796],[83,19950,17342],{"className":19951,"style":17416},[1884,1914],[83,19953,505],{"className":19954},[5890]," on the Y-axis):\n",[1554,19957],{"alt":19958,"src":19959},"Sigmoid Function Graph","\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations\u002Fshared\u002Fsigmoid-function.webp",[1559,19961,19958],{},[12,19963,19964],{},"From this we can draw some important conclusions:",[1030,19966,19967,20014,20061],{},[1033,19968,19969,19970,20013],{},"When z is very negative, ",[83,19971,19973,19992],{"className":19972},[1813],[83,19974,19976],{"className":19975},[1817],[1819,19977,19978],{"xmlns":1821},[1824,19979,19980,19990],{},[1827,19981,19982,19984,19986,19988],{},[1840,19983,17801],{},[1834,19985,180],{"stretchy":5711},[1840,19987,17342],{},[1834,19989,505],{"stretchy":5711},[1863,19991,19886],{"encoding":1865},[83,19993,19995],{"className":19994,"ariaHidden":1871},[1870],[83,19996,19998,20001,20004,20007,20010],{"className":19997},[1875],[83,19999],{"className":20000,"style":5792},[1879],[83,20002,17801],{"className":20003,"style":5851},[1884,1914],[83,20005,180],{"className":20006},[5796],[83,20008,17342],{"className":20009,"style":17416},[1884,1914],[83,20011,505],{"className":20012},[5890]," approaches 0, indicating a low probability that the class is 1.",[1033,20015,20016,20017,20060],{},"When z is very positive, ",[83,20018,20020,20039],{"className":20019},[1813],[83,20021,20023],{"className":20022},[1817],[1819,20024,20025],{"xmlns":1821},[1824,20026,20027,20037],{},[1827,20028,20029,20031,20033,20035],{},[1840,20030,17801],{},[1834,20032,180],{"stretchy":5711},[1840,20034,17342],{},[1834,20036,505],{"stretchy":5711},[1863,20038,19886],{"encoding":1865},[83,20040,20042],{"className":20041,"ariaHidden":1871},[1870],[83,20043,20045,20048,20051,20054,20057],{"className":20044},[1875],[83,20046],{"className":20047,"style":5792},[1879],[83,20049,17801],{"className":20050,"style":5851},[1884,1914],[83,20052,180],{"className":20053},[5796],[83,20055,17342],{"className":20056,"style":17416},[1884,1914],[83,20058,505],{"className":20059},[5890]," approaches 1, indicating a high probability that the class is 1.",[1033,20062,20063,20064,20107],{},"When z is 0, ",[83,20065,20067,20086],{"className":20066},[1813],[83,20068,20070],{"className":20069},[1817],[1819,20071,20072],{"xmlns":1821},[1824,20073,20074,20084],{},[1827,20075,20076,20078,20080,20082],{},[1840,20077,17801],{},[1834,20079,180],{"stretchy":5711},[1840,20081,17342],{},[1834,20083,505],{"stretchy":5711},[1863,20085,19886],{"encoding":1865},[83,20087,20089],{"className":20088,"ariaHidden":1871},[1870],[83,20090,20092,20095,20098,20101,20104],{"className":20091},[1875],[83,20093],{"className":20094,"style":5792},[1879],[83,20096,17801],{"className":20097,"style":5851},[1884,1914],[83,20099,180],{"className":20100},[5796],[83,20102,17342],{"className":20103,"style":17416},[1884,1914],[83,20105,505],{"className":20106},[5890]," is 0.5, indicating an equal probability that the class is 0 or 1.",[12,20109,20110,20111,20114],{},"The value of 0.5 ",[40,20112,20113],{},"is commonly used as a threshold",", so that:",[1030,20116,20117,20189],{},[1033,20118,20119,20120,20188],{},"If ",[83,20121,20123,20149],{"className":20122},[1813],[83,20124,20126],{"className":20125},[1817],[1819,20127,20128],{"xmlns":1821},[1824,20129,20130,20146],{},[1827,20131,20132,20134,20136,20138,20140,20143],{},[1840,20133,17801],{},[1834,20135,180],{"stretchy":5711},[1840,20137,17342],{},[1834,20139,505],{"stretchy":5711},[1834,20141,20142],{},"≥",[1844,20144,20145],{},"0.5",[1863,20147,20148],{"encoding":1865},"\\sigma(z) \\geq 0.5",[83,20150,20152,20179],{"className":20151,"ariaHidden":1871},[1870],[83,20153,20155,20158,20161,20164,20167,20170,20173,20176],{"className":20154},[1875],[83,20156],{"className":20157,"style":5792},[1879],[83,20159,17801],{"className":20160,"style":5851},[1884,1914],[83,20162,180],{"className":20163},[5796],[83,20165,17342],{"className":20166,"style":17416},[1884,1914],[83,20168,505],{"className":20169},[5890],[83,20171],{"className":20172,"style":1893},[1892],[83,20174,20142],{"className":20175},[1897],[83,20177],{"className":20178,"style":1893},[1892],[83,20180,20182,20185],{"className":20181},[1875],[83,20183],{"className":20184,"style":5380},[1879],[83,20186,20145],{"className":20187},[1884],", it is classified as class 1.",[1033,20190,20119,20191,20258],{},[83,20192,20194,20219],{"className":20193},[1813],[83,20195,20197],{"className":20196},[1817],[1819,20198,20199],{"xmlns":1821},[1824,20200,20201,20216],{},[1827,20202,20203,20205,20207,20209,20211,20214],{},[1840,20204,17801],{},[1834,20206,180],{"stretchy":5711},[1840,20208,17342],{},[1834,20210,505],{"stretchy":5711},[1834,20212,20213],{},"\u003C",[1844,20215,20145],{},[1863,20217,20218],{"encoding":1865},"\\sigma(z) \u003C 0.5",[83,20220,20222,20249],{"className":20221,"ariaHidden":1871},[1870],[83,20223,20225,20228,20231,20234,20237,20240,20243,20246],{"className":20224},[1875],[83,20226],{"className":20227,"style":5792},[1879],[83,20229,17801],{"className":20230,"style":5851},[1884,1914],[83,20232,180],{"className":20233},[5796],[83,20235,17342],{"className":20236,"style":17416},[1884,1914],[83,20238,505],{"className":20239},[5890],[83,20241],{"className":20242,"style":1893},[1892],[83,20244,20213],{"className":20245},[1897],[83,20247],{"className":20248,"style":1893},[1892],[83,20250,20252,20255],{"className":20251},[1875],[83,20253],{"className":20254,"style":5380},[1879],[83,20256,20145],{"className":20257},[1884],", it is classified as class 0.",[1734,20260,20261,20264],{},[12,20262,20263],{},"Key properties:",[1030,20265,20266,20269,20316],{},[1033,20267,20268],{},"Bounded range between 0 and 1",[1033,20270,20271,20272,20315],{},"Monotonicity: if z increases, ",[83,20273,20275,20294],{"className":20274},[1813],[83,20276,20278],{"className":20277},[1817],[1819,20279,20280],{"xmlns":1821},[1824,20281,20282,20292],{},[1827,20283,20284,20286,20288,20290],{},[1840,20285,17801],{},[1834,20287,180],{"stretchy":5711},[1840,20289,17342],{},[1834,20291,505],{"stretchy":5711},[1863,20293,19886],{"encoding":1865},[83,20295,20297],{"className":20296,"ariaHidden":1871},[1870],[83,20298,20300,20303,20306,20309,20312],{"className":20299},[1875],[83,20301],{"className":20302,"style":5792},[1879],[83,20304,17801],{"className":20305,"style":5851},[1884,1914],[83,20307,180],{"className":20308},[5796],[83,20310,17342],{"className":20311,"style":17416},[1884,1914],[83,20313,505],{"className":20314},[5890]," also increases",[1033,20317,20318,20319,20385,20386,1626,20438,20385,20504],{},"Asymptotic: ",[83,20320,20322,20346],{"className":20321},[1813],[83,20323,20325],{"className":20324},[1817],[1819,20326,20327],{"xmlns":1821},[1824,20328,20329,20343],{},[1827,20330,20331,20333,20335,20337,20339,20341],{},[1840,20332,17801],{},[1834,20334,180],{"stretchy":5711},[1840,20336,17342],{},[1834,20338,505],{"stretchy":5711},[1834,20340,6269],{},[1844,20342,1855],{},[1863,20344,20345],{"encoding":1865},"\\sigma(z) \\to 1",[83,20347,20349,20376],{"className":20348,"ariaHidden":1871},[1870],[83,20350,20352,20355,20358,20361,20364,20367,20370,20373],{"className":20351},[1875],[83,20353],{"className":20354,"style":5792},[1879],[83,20356,17801],{"className":20357,"style":5851},[1884,1914],[83,20359,180],{"className":20360},[5796],[83,20362,17342],{"className":20363,"style":17416},[1884,1914],[83,20365,505],{"className":20366},[5890],[83,20368],{"className":20369,"style":1893},[1892],[83,20371,6269],{"className":20372},[1897],[83,20374],{"className":20375,"style":1893},[1892],[83,20377,20379,20382],{"className":20378},[1875],[83,20380],{"className":20381,"style":5380},[1879],[83,20383,1855],{"className":20384},[1884]," when ",[83,20387,20389,20408],{"className":20388},[1813],[83,20390,20392],{"className":20391},[1817],[1819,20393,20394],{"xmlns":1821},[1824,20395,20396,20405],{},[1827,20397,20398,20400,20402],{},[1840,20399,17342],{},[1834,20401,6269],{},[1840,20403,20404],{"mathvariant":648},"∞",[1863,20406,20407],{"encoding":1865},"z \\to \\infty",[83,20409,20411,20429],{"className":20410,"ariaHidden":1871},[1870],[83,20412,20414,20417,20420,20423,20426],{"className":20413},[1875],[83,20415],{"className":20416,"style":7106},[1879],[83,20418,17342],{"className":20419,"style":17416},[1884,1914],[83,20421],{"className":20422,"style":1893},[1892],[83,20424,6269],{"className":20425},[1897],[83,20427],{"className":20428,"style":1893},[1892],[83,20430,20432,20435],{"className":20431},[1875],[83,20433],{"className":20434,"style":7106},[1879],[83,20436,20404],{"className":20437},[1884],[83,20439,20441,20465],{"className":20440},[1813],[83,20442,20444],{"className":20443},[1817],[1819,20445,20446],{"xmlns":1821},[1824,20447,20448,20462],{},[1827,20449,20450,20452,20454,20456,20458,20460],{},[1840,20451,17801],{},[1834,20453,180],{"stretchy":5711},[1840,20455,17342],{},[1834,20457,505],{"stretchy":5711},[1834,20459,6269],{},[1844,20461,398],{},[1863,20463,20464],{"encoding":1865},"\\sigma(z) \\to 0",[83,20466,20468,20495],{"className":20467,"ariaHidden":1871},[1870],[83,20469,20471,20474,20477,20480,20483,20486,20489,20492],{"className":20470},[1875],[83,20472],{"className":20473,"style":5792},[1879],[83,20475,17801],{"className":20476,"style":5851},[1884,1914],[83,20478,180],{"className":20479},[5796],[83,20481,17342],{"className":20482,"style":17416},[1884,1914],[83,20484,505],{"className":20485},[5890],[83,20487],{"className":20488,"style":1893},[1892],[83,20490,6269],{"className":20491},[1897],[83,20493],{"className":20494,"style":1893},[1892],[83,20496,20498,20501],{"className":20497},[1875],[83,20499],{"className":20500,"style":5380},[1879],[83,20502,398],{"className":20503},[1884],[83,20505,20507,20527],{"className":20506},[1813],[83,20508,20510],{"className":20509},[1817],[1819,20511,20512],{"xmlns":1821},[1824,20513,20514,20524],{},[1827,20515,20516,20518,20520,20522],{},[1840,20517,17342],{},[1834,20519,6269],{},[1834,20521,5469],{},[1840,20523,20404],{"mathvariant":648},[1863,20525,20526],{"encoding":1865},"z \\to -\\infty",[83,20528,20530,20548],{"className":20529,"ariaHidden":1871},[1870],[83,20531,20533,20536,20539,20542,20545],{"className":20532},[1875],[83,20534],{"className":20535,"style":7106},[1879],[83,20537,17342],{"className":20538,"style":17416},[1884,1914],[83,20540],{"className":20541,"style":1893},[1892],[83,20543,6269],{"className":20544},[1897],[83,20546],{"className":20547,"style":1893},[1892],[83,20549,20551,20554,20557],{"className":20550},[1875],[83,20552],{"className":20553,"style":6990},[1879],[83,20555,5469],{"className":20556},[1884],[83,20558,20404],{"className":20559},[1884],[12,20561,20562,20565,20566,20569,20570,589],{},[40,20563,20564],{},"How do we measure error in classification?"," Here we use metrics like ",[40,20567,20568],{},"cross-entropy"," or ",[40,20571,20572],{},"log loss",[12,20574,20575],{},"Loss for a single sample:",[83,20577,20579],{"className":20578},[1809],[83,20580,20582,20658],{"className":20581},[1813],[83,20583,20585],{"className":20584},[1817],[1819,20586,20587],{"xmlns":1821,"display":1822},[1824,20588,20589,20655],{},[1827,20590,20591,20594,20596,20598,20600,20602,20604,20607,20610,20612,20618,20620,20622,20624,20626,20628,20630,20632,20634,20636,20638,20640,20642,20644,20650,20652],{},[1840,20592,20593],{},"L",[1834,20595,216],{},[1834,20597,5469],{},[1834,20599,1152],{"stretchy":5711},[1840,20601,3414],{},[1834,20603,1858],{},[1840,20605,20606],{},"log",[1834,20608,20609],{},"⁡",[1834,20611,180],{"stretchy":5711},[8164,20613,20614,20616],{"accent":1871},[1840,20615,3414],{},[1834,20617,8174],{},[1834,20619,505],{"stretchy":5711},[1834,20621,1848],{},[1834,20623,180],{"stretchy":5711},[1844,20625,1855],{},[1834,20627,5469],{},[1840,20629,3414],{},[1834,20631,505],{"stretchy":5711},[1834,20633,1858],{},[1840,20635,20606],{},[1834,20637,20609],{},[1834,20639,180],{"stretchy":5711},[1844,20641,1855],{},[1834,20643,5469],{},[8164,20645,20646,20648],{"accent":1871},[1840,20647,3414],{},[1834,20649,8174],{},[1834,20651,505],{"stretchy":5711},[1834,20653,20654],{"stretchy":5711},"]",[1863,20656,20657],{"encoding":1865},"L = -[y \\cdot \\log(\\hat{y}) + (1 - y) \\cdot \\log(1 - \\hat{y})]",[83,20659,20661,20679,20703,20774,20795,20816,20842],{"className":20660,"ariaHidden":1871},[1870],[83,20662,20664,20667,20670,20673,20676],{"className":20663},[1875],[83,20665],{"className":20666,"style":2038},[1879],[83,20668,20593],{"className":20669},[1884,1914],[83,20671],{"className":20672,"style":1893},[1892],[83,20674,216],{"className":20675},[1897],[83,20677],{"className":20678,"style":1893},[1892],[83,20680,20682,20685,20688,20691,20694,20697,20700],{"className":20681},[1875],[83,20683],{"className":20684,"style":5792},[1879],[83,20686,5469],{"className":20687},[1884],[83,20689,1152],{"className":20690},[5796],[83,20692,3414],{"className":20693,"style":5851},[1884,1914],[83,20695],{"className":20696,"style":1969},[1892],[83,20698,1858],{"className":20699},[1973],[83,20701],{"className":20702,"style":1969},[1892],[83,20704,20706,20709,20717,20720,20762,20765,20768,20771],{"className":20705},[1875],[83,20707],{"className":20708,"style":5792},[1879],[83,20710,20712,20713],{"className":20711},[8930],"lo",[83,20714,20716],{"style":20715},"margin-right:0.0139em;","g",[83,20718,180],{"className":20719},[5796],[83,20721,20723],{"className":20722},[1884,8312],[83,20724,20726,20754],{"className":20725},[1923,1924],[83,20727,20729,20751],{"className":20728},[1928],[83,20730,20732,20740],{"className":20731,"style":1880},[1932],[83,20733,20734,20737],{"style":8325},[83,20735],{"className":20736,"style":8329},[1940],[83,20738,3414],{"className":20739,"style":5851},[1884,1914],[83,20741,20742,20745],{"style":8325},[83,20743],{"className":20744,"style":8329},[1940],[83,20746,20748],{"className":20747,"style":9376},[8379],[83,20749,8174],{"className":20750},[1884],[83,20752,1956],{"className":20753},[1955],[83,20755,20757],{"className":20756},[1928],[83,20758,20760],{"className":20759,"style":8393},[1932],[83,20761],{},[83,20763,505],{"className":20764},[5890],[83,20766],{"className":20767,"style":1969},[1892],[83,20769,1848],{"className":20770},[1973],[83,20772],{"className":20773,"style":1969},[1892],[83,20775,20777,20780,20783,20786,20789,20792],{"className":20776},[1875],[83,20778],{"className":20779,"style":5792},[1879],[83,20781,180],{"className":20782},[5796],[83,20784,1855],{"className":20785},[1884],[83,20787],{"className":20788,"style":1969},[1892],[83,20790,5469],{"className":20791},[1973],[83,20793],{"className":20794,"style":1969},[1892],[83,20796,20798,20801,20804,20807,20810,20813],{"className":20797},[1875],[83,20799],{"className":20800,"style":5792},[1879],[83,20802,3414],{"className":20803,"style":5851},[1884,1914],[83,20805,505],{"className":20806},[5890],[83,20808],{"className":20809,"style":1969},[1892],[83,20811,1858],{"className":20812},[1973],[83,20814],{"className":20815,"style":1969},[1892],[83,20817,20819,20822,20827,20830,20833,20836,20839],{"className":20818},[1875],[83,20820],{"className":20821,"style":5792},[1879],[83,20823,20712,20825],{"className":20824},[8930],[83,20826,20716],{"style":20715},[83,20828,180],{"className":20829},[5796],[83,20831,1855],{"className":20832},[1884],[83,20834],{"className":20835,"style":1969},[1892],[83,20837,5469],{"className":20838},[1973],[83,20840],{"className":20841,"style":1969},[1892],[83,20843,20845,20848,20890],{"className":20844},[1875],[83,20846],{"className":20847,"style":5792},[1879],[83,20849,20851],{"className":20850},[1884,8312],[83,20852,20854,20882],{"className":20853},[1923,1924],[83,20855,20857,20879],{"className":20856},[1928],[83,20858,20860,20868],{"className":20859,"style":1880},[1932],[83,20861,20862,20865],{"style":8325},[83,20863],{"className":20864,"style":8329},[1940],[83,20866,3414],{"className":20867,"style":5851},[1884,1914],[83,20869,20870,20873],{"style":8325},[83,20871],{"className":20872,"style":8329},[1940],[83,20874,20876],{"className":20875,"style":9376},[8379],[83,20877,8174],{"className":20878},[1884],[83,20880,1956],{"className":20881},[1955],[83,20883,20885],{"className":20884},[1928],[83,20886,20888],{"className":20887,"style":8393},[1932],[83,20889],{},[83,20891,20893],{"className":20892},[5890],")]",[12,20895,20896],{},"Average loss (or cost function) for the entire dataset:",[83,20898,20900],{"className":20899},[1809],[83,20901,20903,21012],{"className":20902},[1813],[83,20904,20906],{"className":20905},[1817],[1819,20907,20908],{"xmlns":1821,"display":1822},[1824,20909,20910,21009],{},[1827,20911,20912,20915,20917,20919,20925,20939,20941,20947,20949,20951,20953,20955,20965,20967,20969,20971,20973,20975,20981,20983,20985,20987,20989,20991,20993,20995,21005,21007],{},[1840,20913,20914],{},"J",[1834,20916,216],{},[1834,20918,5469],{},[8767,20920,20921,20923],{},[1844,20922,1855],{},[1840,20924,300],{},[8774,20926,20927,20929,20937],{},[1834,20928,8778],{},[1827,20930,20931,20933,20935],{},[1840,20932,6118],{},[1834,20934,216],{},[1844,20936,1855],{},[1840,20938,300],{},[1834,20940,1152],{"stretchy":5711},[1837,20942,20943,20945],{},[1840,20944,3414],{},[1840,20946,6118],{},[1834,20948,1858],{},[1840,20950,20606],{},[1834,20952,20609],{},[1834,20954,180],{"stretchy":5711},[8164,20956,20957,20963],{"accent":1871},[1837,20958,20959,20961],{},[1840,20960,3414],{},[1840,20962,6118],{},[1834,20964,8174],{},[1834,20966,505],{"stretchy":5711},[1834,20968,1848],{},[1834,20970,180],{"stretchy":5711},[1844,20972,1855],{},[1834,20974,5469],{},[1837,20976,20977,20979],{},[1840,20978,3414],{},[1840,20980,6118],{},[1834,20982,505],{"stretchy":5711},[1834,20984,1858],{},[1840,20986,20606],{},[1834,20988,20609],{},[1834,20990,180],{"stretchy":5711},[1844,20992,1855],{},[1834,20994,5469],{},[8164,20996,20997,21003],{"accent":1871},[1837,20998,20999,21001],{},[1840,21000,3414],{},[1840,21002,6118],{},[1834,21004,8174],{},[1834,21006,505],{"stretchy":5711},[1834,21008,20654],{"stretchy":5711},[1863,21010,21011],{"encoding":1865},"J = -\\frac{1}{n} \\sum_{i=1}^{n} [y_i \\cdot \\log(\\hat{y_i}) + (1 - y_i) \\cdot \\log(1 - \\hat{y_i})]",[83,21013,21015,21034,21227,21332,21353,21411,21437],{"className":21014,"ariaHidden":1871},[1870],[83,21016,21018,21021,21025,21028,21031],{"className":21017},[1875],[83,21019],{"className":21020,"style":2038},[1879],[83,21022,20914],{"className":21023,"style":21024},[1884,1914],"margin-right:0.0962em;",[83,21026],{"className":21027,"style":1893},[1892],[83,21029,216],{"className":21030},[1897],[83,21032],{"className":21033,"style":1893},[1892],[83,21035,21037,21040,21043,21105,21108,21175,21178,21218,21221,21224],{"className":21036},[1875],[83,21038],{"className":21039,"style":8853},[1879],[83,21041,5469],{"className":21042},[1884],[83,21044,21046,21049,21102],{"className":21045},[1884],[83,21047],{"className":21048},[5796,8860],[83,21050,21052],{"className":21051},[8767],[83,21053,21055,21094],{"className":21054},[1923,1924],[83,21056,21058,21091],{"className":21057},[1928],[83,21059,21061,21072,21080],{"className":21060,"style":8873},[1932],[83,21062,21063,21066],{"style":8876},[83,21064],{"className":21065,"style":8329},[1940],[83,21067,21069],{"className":21068},[1884],[83,21070,300],{"className":21071},[1884,1914],[83,21073,21074,21077],{"style":8888},[83,21075],{"className":21076,"style":8329},[1940],[83,21078],{"className":21079,"style":8896},[8895],[83,21081,21082,21085],{"style":8899},[83,21083],{"className":21084,"style":8329},[1940],[83,21086,21088],{"className":21087},[1884],[83,21089,1855],{"className":21090},[1884],[83,21092,1956],{"className":21093},[1955],[83,21095,21097],{"className":21096},[1928],[83,21098,21100],{"className":21099,"style":8918},[1932],[83,21101],{},[83,21103],{"className":21104},[5890,8860],[83,21106],{"className":21107,"style":5493},[1892],[83,21109,21111],{"className":21110},[8930,8931],[83,21112,21114,21167],{"className":21113},[1923,1924],[83,21115,21117,21164],{"className":21116},[1928],[83,21118,21120,21140,21150],{"className":21119,"style":8941},[1932],[83,21121,21122,21125],{"style":8944},[83,21123],{"className":21124,"style":8948},[1940],[83,21126,21128],{"className":21127},[1945,1946,1947,1948],[83,21129,21131,21134,21137],{"className":21130},[1884,1948],[83,21132,6118],{"className":21133},[1884,1914,1948],[83,21135,216],{"className":21136},[1897,1948],[83,21138,1855],{"className":21139},[1884,1948],[83,21141,21142,21145],{"style":8966},[83,21143],{"className":21144,"style":8948},[1940],[83,21146,21147],{},[83,21148,8778],{"className":21149},[8930,8975,8976],[83,21151,21152,21155],{"style":8979},[83,21153],{"className":21154,"style":8948},[1940],[83,21156,21158],{"className":21157},[1945,1946,1947,1948],[83,21159,21161],{"className":21160},[1884,1948],[83,21162,300],{"className":21163},[1884,1914,1948],[83,21165,1956],{"className":21166},[1955],[83,21168,21170],{"className":21169},[1928],[83,21171,21173],{"className":21172,"style":9001},[1932],[83,21174],{},[83,21176,1152],{"className":21177},[5796],[83,21179,21181,21184],{"className":21180},[1884],[83,21182,3414],{"className":21183,"style":5851},[1884,1914],[83,21185,21187],{"className":21186},[1919],[83,21188,21190,21210],{"className":21189},[1923,1924],[83,21191,21193,21207],{"className":21192},[1928],[83,21194,21196],{"className":21195,"style":6150},[1932],[83,21197,21198,21201],{"style":5866},[83,21199],{"className":21200,"style":1941},[1940],[83,21202,21204],{"className":21203},[1945,1946,1947,1948],[83,21205,6118],{"className":21206},[1884,1914,1948],[83,21208,1956],{"className":21209},[1955],[83,21211,21213],{"className":21212},[1928],[83,21214,21216],{"className":21215,"style":1963},[1932],[83,21217],{},[83,21219],{"className":21220,"style":1969},[1892],[83,21222,1858],{"className":21223},[1973],[83,21225],{"className":21226,"style":1969},[1892],[83,21228,21230,21233,21238,21241,21320,21323,21326,21329],{"className":21229},[1875],[83,21231],{"className":21232,"style":5792},[1879],[83,21234,20712,21236],{"className":21235},[8930],[83,21237,20716],{"style":20715},[83,21239,180],{"className":21240},[5796],[83,21242,21244],{"className":21243},[1884,8312],[83,21245,21247,21312],{"className":21246},[1923,1924],[83,21248,21250,21309],{"className":21249},[1928],[83,21251,21253,21298],{"className":21252,"style":1880},[1932],[83,21254,21255,21258],{"style":8325},[83,21256],{"className":21257,"style":8329},[1940],[83,21259,21261,21264],{"className":21260},[1884],[83,21262,3414],{"className":21263,"style":5851},[1884,1914],[83,21265,21267],{"className":21266},[1919],[83,21268,21270,21290],{"className":21269},[1923,1924],[83,21271,21273,21287],{"className":21272},[1928],[83,21274,21276],{"className":21275,"style":6150},[1932],[83,21277,21278,21281],{"style":5866},[83,21279],{"className":21280,"style":1941},[1940],[83,21282,21284],{"className":21283},[1945,1946,1947,1948],[83,21285,6118],{"className":21286},[1884,1914,1948],[83,21288,1956],{"className":21289},[1955],[83,21291,21293],{"className":21292},[1928],[83,21294,21296],{"className":21295,"style":1963},[1932],[83,21297],{},[83,21299,21300,21303],{"style":8325},[83,21301],{"className":21302,"style":8329},[1940],[83,21304,21306],{"className":21305,"style":8380},[8379],[83,21307,8174],{"className":21308},[1884],[83,21310,1956],{"className":21311},[1955],[83,21313,21315],{"className":21314},[1928],[83,21316,21318],{"className":21317,"style":8393},[1932],[83,21319],{},[83,21321,505],{"className":21322},[5890],[83,21324],{"className":21325,"style":1969},[1892],[83,21327,1848],{"className":21328},[1973],[83,21330],{"className":21331,"style":1969},[1892],[83,21333,21335,21338,21341,21344,21347,21350],{"className":21334},[1875],[83,21336],{"className":21337,"style":5792},[1879],[83,21339,180],{"className":21340},[5796],[83,21342,1855],{"className":21343},[1884],[83,21345],{"className":21346,"style":1969},[1892],[83,21348,5469],{"className":21349},[1973],[83,21351],{"className":21352,"style":1969},[1892],[83,21354,21356,21359,21399,21402,21405,21408],{"className":21355},[1875],[83,21357],{"className":21358,"style":5792},[1879],[83,21360,21362,21365],{"className":21361},[1884],[83,21363,3414],{"className":21364,"style":5851},[1884,1914],[83,21366,21368],{"className":21367},[1919],[83,21369,21371,21391],{"className":21370},[1923,1924],[83,21372,21374,21388],{"className":21373},[1928],[83,21375,21377],{"className":21376,"style":6150},[1932],[83,21378,21379,21382],{"style":5866},[83,21380],{"className":21381,"style":1941},[1940],[83,21383,21385],{"className":21384},[1945,1946,1947,1948],[83,21386,6118],{"className":21387},[1884,1914,1948],[83,21389,1956],{"className":21390},[1955],[83,21392,21394],{"className":21393},[1928],[83,21395,21397],{"className":21396,"style":1963},[1932],[83,21398],{},[83,21400,505],{"className":21401},[5890],[83,21403],{"className":21404,"style":1969},[1892],[83,21406,1858],{"className":21407},[1973],[83,21409],{"className":21410,"style":1969},[1892],[83,21412,21414,21417,21422,21425,21428,21431,21434],{"className":21413},[1875],[83,21415],{"className":21416,"style":5792},[1879],[83,21418,20712,21420],{"className":21419},[8930],[83,21421,20716],{"style":20715},[83,21423,180],{"className":21424},[5796],[83,21426,1855],{"className":21427},[1884],[83,21429],{"className":21430,"style":1969},[1892],[83,21432,5469],{"className":21433},[1973],[83,21435],{"className":21436,"style":1969},[1892],[83,21438,21440,21443,21522],{"className":21439},[1875],[83,21441],{"className":21442,"style":5792},[1879],[83,21444,21446],{"className":21445},[1884,8312],[83,21447,21449,21514],{"className":21448},[1923,1924],[83,21450,21452,21511],{"className":21451},[1928],[83,21453,21455,21500],{"className":21454,"style":1880},[1932],[83,21456,21457,21460],{"style":8325},[83,21458],{"className":21459,"style":8329},[1940],[83,21461,21463,21466],{"className":21462},[1884],[83,21464,3414],{"className":21465,"style":5851},[1884,1914],[83,21467,21469],{"className":21468},[1919],[83,21470,21472,21492],{"className":21471},[1923,1924],[83,21473,21475,21489],{"className":21474},[1928],[83,21476,21478],{"className":21477,"style":6150},[1932],[83,21479,21480,21483],{"style":5866},[83,21481],{"className":21482,"style":1941},[1940],[83,21484,21486],{"className":21485},[1945,1946,1947,1948],[83,21487,6118],{"className":21488},[1884,1914,1948],[83,21490,1956],{"className":21491},[1955],[83,21493,21495],{"className":21494},[1928],[83,21496,21498],{"className":21497,"style":1963},[1932],[83,21499],{},[83,21501,21502,21505],{"style":8325},[83,21503],{"className":21504,"style":8329},[1940],[83,21506,21508],{"className":21507,"style":8380},[8379],[83,21509,8174],{"className":21510},[1884],[83,21512,1956],{"className":21513},[1955],[83,21515,21517],{"className":21516},[1928],[83,21518,21520],{"className":21519,"style":8393},[1932],[83,21521],{},[83,21523,20893],{"className":21524},[5890],[12,21526,7112],{},[1030,21528,21529,21559,21659],{},[1033,21530,21531,9207],{},[83,21532,21534,21547],{"className":21533},[1813],[83,21535,21537],{"className":21536},[1817],[1819,21538,21539],{"xmlns":1821},[1824,21540,21541,21545],{},[1827,21542,21543],{},[1840,21544,300],{},[1863,21546,300],{"encoding":1865},[83,21548,21550],{"className":21549,"ariaHidden":1871},[1870],[83,21551,21553,21556],{"className":21552},[1875],[83,21554],{"className":21555,"style":7106},[1879],[83,21557,300],{"className":21558},[1884,1914],[1033,21560,21561,21630,21631,133],{},[83,21562,21564,21581],{"className":21563},[1813],[83,21565,21567],{"className":21566},[1817],[1819,21568,21569],{"xmlns":1821},[1824,21570,21571,21579],{},[1827,21572,21573],{},[1837,21574,21575,21577],{},[1840,21576,3414],{},[1840,21578,6118],{},[1863,21580,6194],{"encoding":1865},[83,21582,21584],{"className":21583,"ariaHidden":1871},[1870],[83,21585,21587,21590],{"className":21586},[1875],[83,21588],{"className":21589,"style":6204},[1879],[83,21591,21593,21596],{"className":21592},[1884],[83,21594,3414],{"className":21595,"style":5851},[1884,1914],[83,21597,21599],{"className":21598},[1919],[83,21600,21602,21622],{"className":21601},[1923,1924],[83,21603,21605,21619],{"className":21604},[1928],[83,21606,21608],{"className":21607,"style":6150},[1932],[83,21609,21610,21613],{"style":5866},[83,21611],{"className":21612,"style":1941},[1940],[83,21614,21616],{"className":21615},[1945,1946,1947,1948],[83,21617,6118],{"className":21618},[1884,1914,1948],[83,21620,1956],{"className":21621},[1955],[83,21623,21625],{"className":21624},[1928],[83,21626,21628],{"className":21627,"style":1963},[1932],[83,21629],{}," is the true label (0 or 1) for example ",[83,21632,21634,21647],{"className":21633},[1813],[83,21635,21637],{"className":21636},[1817],[1819,21638,21639],{"xmlns":1821},[1824,21640,21641,21645],{},[1827,21642,21643],{},[1840,21644,6118],{},[1863,21646,6118],{"encoding":1865},[83,21648,21650],{"className":21649,"ariaHidden":1871},[1870],[83,21651,21653,21656],{"className":21652},[1875],[83,21654],{"className":21655,"style":9305},[1879],[83,21657,6118],{"className":21658},[1884,1914],[1033,21660,21661,21774,21775,21803],{},[83,21662,21664,21686],{"className":21663},[1813],[83,21665,21667],{"className":21666},[1817],[1819,21668,21669],{"xmlns":1821},[1824,21670,21671,21683],{},[1827,21672,21673],{},[8164,21674,21675,21681],{"accent":1871},[1837,21676,21677,21679],{},[1840,21678,3414],{},[1840,21680,6118],{},[1834,21682,8174],{},[1863,21684,21685],{"encoding":1865},"\\hat{y_i}",[83,21687,21689],{"className":21688,"ariaHidden":1871},[1870],[83,21690,21692,21695],{"className":21691},[1875],[83,21693],{"className":21694,"style":1907},[1879],[83,21696,21698],{"className":21697},[1884,8312],[83,21699,21701,21766],{"className":21700},[1923,1924],[83,21702,21704,21763],{"className":21703},[1928],[83,21705,21707,21752],{"className":21706,"style":1880},[1932],[83,21708,21709,21712],{"style":8325},[83,21710],{"className":21711,"style":8329},[1940],[83,21713,21715,21718],{"className":21714},[1884],[83,21716,3414],{"className":21717,"style":5851},[1884,1914],[83,21719,21721],{"className":21720},[1919],[83,21722,21724,21744],{"className":21723},[1923,1924],[83,21725,21727,21741],{"className":21726},[1928],[83,21728,21730],{"className":21729,"style":6150},[1932],[83,21731,21732,21735],{"style":5866},[83,21733],{"className":21734,"style":1941},[1940],[83,21736,21738],{"className":21737},[1945,1946,1947,1948],[83,21739,6118],{"className":21740},[1884,1914,1948],[83,21742,1956],{"className":21743},[1955],[83,21745,21747],{"className":21746},[1928],[83,21748,21750],{"className":21749,"style":1963},[1932],[83,21751],{},[83,21753,21754,21757],{"style":8325},[83,21755],{"className":21756,"style":8329},[1940],[83,21758,21760],{"className":21759,"style":8380},[8379],[83,21761,8174],{"className":21762},[1884],[83,21764,1956],{"className":21765},[1955],[83,21767,21769],{"className":21768},[1928],[83,21770,21772],{"className":21771,"style":8393},[1932],[83,21773],{}," is the predicted probability by the model for example ",[83,21776,21778,21791],{"className":21777},[1813],[83,21779,21781],{"className":21780},[1817],[1819,21782,21783],{"xmlns":1821},[1824,21784,21785,21789],{},[1827,21786,21787],{},[1840,21788,6118],{},[1863,21790,6118],{"encoding":1865},[83,21792,21794],{"className":21793,"ariaHidden":1871},[1870],[83,21795,21797,21800],{"className":21796},[1875],[83,21798],{"className":21799,"style":9305},[1879],[83,21801,6118],{"className":21802},[1884,1914]," (value between 0 and 1).",[12,21805,21806],{},"Why is cross-entropy used?",[1077,21808,21809,21812,21815],{},[1033,21810,21811],{},"It penalizes incorrect predictions with high confidence more heavily.",[1033,21813,21814],{},"It is a convex loss function, which makes optimization easier using methods like gradient descent.",[1033,21816,21817],{},"It has a probabilistic interpretation, as it is based on the predicted probability by the model.",[12,21819,21820],{},"The behavior of the loss function is shown in the following graph:",[12,21822,21823,21827],{},[1554,21824],{"alt":21825,"src":21826},"Cross-Entropy Loss Function Graph","\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations\u002Fshared\u002Fcross-entropy.webp",[1559,21828,21825],{},[12,21830,21831],{},"The function penalizes more heavily the incorrect predictions with high confidence, which is reflected in the shape of the curve.",[1077,21833,21834],{},[1033,21835,21836],{},"When the true label is 1 (y=1) (blue line):",[1030,21838,21839,21963,22038],{},[1033,21840,21841,21842],{},"The formula simplifies to ",[83,21843,21845,21877],{"className":21844},[1813],[83,21846,21848],{"className":21847},[1817],[1819,21849,21850],{"xmlns":1821},[1824,21851,21852,21874],{},[1827,21853,21854,21856,21858,21860,21862,21864,21866,21872],{},[1840,21855,20593],{},[1834,21857,216],{},[1834,21859,5469],{},[1840,21861,20606],{},[1834,21863,20609],{},[1834,21865,180],{"stretchy":5711},[8164,21867,21868,21870],{"accent":1871},[1840,21869,3414],{},[1834,21871,8174],{},[1834,21873,505],{"stretchy":5711},[1863,21875,21876],{"encoding":1865},"L = -\\log(\\hat{y})",[83,21878,21880,21898],{"className":21879,"ariaHidden":1871},[1870],[83,21881,21883,21886,21889,21892,21895],{"className":21882},[1875],[83,21884],{"className":21885,"style":2038},[1879],[83,21887,20593],{"className":21888},[1884,1914],[83,21890],{"className":21891,"style":1893},[1892],[83,21893,216],{"className":21894},[1897],[83,21896],{"className":21897,"style":1893},[1892],[83,21899,21901,21904,21907,21910,21915,21918,21960],{"className":21900},[1875],[83,21902],{"className":21903,"style":5792},[1879],[83,21905,5469],{"className":21906},[1884],[83,21908],{"className":21909,"style":5493},[1892],[83,21911,20712,21913],{"className":21912},[8930],[83,21914,20716],{"style":20715},[83,21916,180],{"className":21917},[5796],[83,21919,21921],{"className":21920},[1884,8312],[83,21922,21924,21952],{"className":21923},[1923,1924],[83,21925,21927,21949],{"className":21926},[1928],[83,21928,21930,21938],{"className":21929,"style":1880},[1932],[83,21931,21932,21935],{"style":8325},[83,21933],{"className":21934,"style":8329},[1940],[83,21936,3414],{"className":21937,"style":5851},[1884,1914],[83,21939,21940,21943],{"style":8325},[83,21941],{"className":21942,"style":8329},[1940],[83,21944,21946],{"className":21945,"style":9376},[8379],[83,21947,8174],{"className":21948},[1884],[83,21950,1956],{"className":21951},[1955],[83,21953,21955],{"className":21954},[1928],[83,21956,21958],{"className":21957,"style":8393},[1932],[83,21959],{},[83,21961,505],{"className":21962},[5890],[1033,21964,20119,21965,22037],{},[83,21966,21968,21986],{"className":21967},[1813],[83,21969,21971],{"className":21970},[1817],[1819,21972,21973],{"xmlns":1821},[1824,21974,21975,21983],{},[1827,21976,21977],{},[8164,21978,21979,21981],{"accent":1871},[1840,21980,3414],{},[1834,21982,8174],{},[1863,21984,21985],{"encoding":1865},"\\hat{y}",[83,21987,21989],{"className":21988,"ariaHidden":1871},[1870],[83,21990,21992,21995],{"className":21991},[1875],[83,21993],{"className":21994,"style":1907},[1879],[83,21996,21998],{"className":21997},[1884,8312],[83,21999,22001,22029],{"className":22000},[1923,1924],[83,22002,22004,22026],{"className":22003},[1928],[83,22005,22007,22015],{"className":22006,"style":1880},[1932],[83,22008,22009,22012],{"style":8325},[83,22010],{"className":22011,"style":8329},[1940],[83,22013,3414],{"className":22014,"style":5851},[1884,1914],[83,22016,22017,22020],{"style":8325},[83,22018],{"className":22019,"style":8329},[1940],[83,22021,22023],{"className":22022,"style":9376},[8379],[83,22024,8174],{"className":22025},[1884],[83,22027,1956],{"className":22028},[1955],[83,22030,22032],{"className":22031},[1928],[83,22033,22035],{"className":22034,"style":8393},[1932],[83,22036],{}," approaches 1, the loss approaches 0 (good prediction).",[1033,22039,20119,22040,22111],{},[83,22041,22043,22060],{"className":22042},[1813],[83,22044,22046],{"className":22045},[1817],[1819,22047,22048],{"xmlns":1821},[1824,22049,22050,22058],{},[1827,22051,22052],{},[8164,22053,22054,22056],{"accent":1871},[1840,22055,3414],{},[1834,22057,8174],{},[1863,22059,21985],{"encoding":1865},[83,22061,22063],{"className":22062,"ariaHidden":1871},[1870],[83,22064,22066,22069],{"className":22065},[1875],[83,22067],{"className":22068,"style":1907},[1879],[83,22070,22072],{"className":22071},[1884,8312],[83,22073,22075,22103],{"className":22074},[1923,1924],[83,22076,22078,22100],{"className":22077},[1928],[83,22079,22081,22089],{"className":22080,"style":1880},[1932],[83,22082,22083,22086],{"style":8325},[83,22084],{"className":22085,"style":8329},[1940],[83,22087,3414],{"className":22088,"style":5851},[1884,1914],[83,22090,22091,22094],{"style":8325},[83,22092],{"className":22093,"style":8329},[1940],[83,22095,22097],{"className":22096,"style":9376},[8379],[83,22098,8174],{"className":22099},[1884],[83,22101,1956],{"className":22102},[1955],[83,22104,22106],{"className":22105},[1928],[83,22107,22109],{"className":22108,"style":8393},[1932],[83,22110],{}," approaches 0, the loss shoots to infinity (bad prediction).",[1077,22113,22114],{"start":103},[1033,22115,22116],{},"When the true label is 0 (y=0) (red line):",[1030,22118,22119,22264,22338],{},[1033,22120,21841,22121],{},[83,22122,22124,22160],{"className":22123},[1813],[83,22125,22127],{"className":22126},[1817],[1819,22128,22129],{"xmlns":1821},[1824,22130,22131,22157],{},[1827,22132,22133,22135,22137,22139,22141,22143,22145,22147,22149,22155],{},[1840,22134,20593],{},[1834,22136,216],{},[1834,22138,5469],{},[1840,22140,20606],{},[1834,22142,20609],{},[1834,22144,180],{"stretchy":5711},[1844,22146,1855],{},[1834,22148,5469],{},[8164,22150,22151,22153],{"accent":1871},[1840,22152,3414],{},[1834,22154,8174],{},[1834,22156,505],{"stretchy":5711},[1863,22158,22159],{"encoding":1865},"L = -\\log(1 - \\hat{y})",[83,22161,22163,22181,22213],{"className":22162,"ariaHidden":1871},[1870],[83,22164,22166,22169,22172,22175,22178],{"className":22165},[1875],[83,22167],{"className":22168,"style":2038},[1879],[83,22170,20593],{"className":22171},[1884,1914],[83,22173],{"className":22174,"style":1893},[1892],[83,22176,216],{"className":22177},[1897],[83,22179],{"className":22180,"style":1893},[1892],[83,22182,22184,22187,22190,22193,22198,22201,22204,22207,22210],{"className":22183},[1875],[83,22185],{"className":22186,"style":5792},[1879],[83,22188,5469],{"className":22189},[1884],[83,22191],{"className":22192,"style":5493},[1892],[83,22194,20712,22196],{"className":22195},[8930],[83,22197,20716],{"style":20715},[83,22199,180],{"className":22200},[5796],[83,22202,1855],{"className":22203},[1884],[83,22205],{"className":22206,"style":1969},[1892],[83,22208,5469],{"className":22209},[1973],[83,22211],{"className":22212,"style":1969},[1892],[83,22214,22216,22219,22261],{"className":22215},[1875],[83,22217],{"className":22218,"style":5792},[1879],[83,22220,22222],{"className":22221},[1884,8312],[83,22223,22225,22253],{"className":22224},[1923,1924],[83,22226,22228,22250],{"className":22227},[1928],[83,22229,22231,22239],{"className":22230,"style":1880},[1932],[83,22232,22233,22236],{"style":8325},[83,22234],{"className":22235,"style":8329},[1940],[83,22237,3414],{"className":22238,"style":5851},[1884,1914],[83,22240,22241,22244],{"style":8325},[83,22242],{"className":22243,"style":8329},[1940],[83,22245,22247],{"className":22246,"style":9376},[8379],[83,22248,8174],{"className":22249},[1884],[83,22251,1956],{"className":22252},[1955],[83,22254,22256],{"className":22255},[1928],[83,22257,22259],{"className":22258,"style":8393},[1932],[83,22260],{},[83,22262,505],{"className":22263},[5890],[1033,22265,20119,22266,22337],{},[83,22267,22269,22286],{"className":22268},[1813],[83,22270,22272],{"className":22271},[1817],[1819,22273,22274],{"xmlns":1821},[1824,22275,22276,22284],{},[1827,22277,22278],{},[8164,22279,22280,22282],{"accent":1871},[1840,22281,3414],{},[1834,22283,8174],{},[1863,22285,21985],{"encoding":1865},[83,22287,22289],{"className":22288,"ariaHidden":1871},[1870],[83,22290,22292,22295],{"className":22291},[1875],[83,22293],{"className":22294,"style":1907},[1879],[83,22296,22298],{"className":22297},[1884,8312],[83,22299,22301,22329],{"className":22300},[1923,1924],[83,22302,22304,22326],{"className":22303},[1928],[83,22305,22307,22315],{"className":22306,"style":1880},[1932],[83,22308,22309,22312],{"style":8325},[83,22310],{"className":22311,"style":8329},[1940],[83,22313,3414],{"className":22314,"style":5851},[1884,1914],[83,22316,22317,22320],{"style":8325},[83,22318],{"className":22319,"style":8329},[1940],[83,22321,22323],{"className":22322,"style":9376},[8379],[83,22324,8174],{"className":22325},[1884],[83,22327,1956],{"className":22328},[1955],[83,22330,22332],{"className":22331},[1928],[83,22333,22335],{"className":22334,"style":8393},[1932],[83,22336],{}," approaches 0, the loss approaches 0 (good prediction).",[1033,22339,20119,22340,22411],{},[83,22341,22343,22360],{"className":22342},[1813],[83,22344,22346],{"className":22345},[1817],[1819,22347,22348],{"xmlns":1821},[1824,22349,22350,22358],{},[1827,22351,22352],{},[8164,22353,22354,22356],{"accent":1871},[1840,22355,3414],{},[1834,22357,8174],{},[1863,22359,21985],{"encoding":1865},[83,22361,22363],{"className":22362,"ariaHidden":1871},[1870],[83,22364,22366,22369],{"className":22365},[1875],[83,22367],{"className":22368,"style":1907},[1879],[83,22370,22372],{"className":22371},[1884,8312],[83,22373,22375,22403],{"className":22374},[1923,1924],[83,22376,22378,22400],{"className":22377},[1928],[83,22379,22381,22389],{"className":22380,"style":1880},[1932],[83,22382,22383,22386],{"style":8325},[83,22384],{"className":22385,"style":8329},[1940],[83,22387,3414],{"className":22388,"style":5851},[1884,1914],[83,22390,22391,22394],{"style":8325},[83,22392],{"className":22393,"style":8329},[1940],[83,22395,22397],{"className":22396,"style":9376},[8379],[83,22398,8174],{"className":22399},[1884],[83,22401,1956],{"className":22402},[1955],[83,22404,22406],{"className":22405},[1928],[83,22407,22409],{"className":22408,"style":8393},[1932],[83,22410],{}," approaches 1, the loss shoots to infinity (bad prediction).",[12,22413,22414],{},"The logarithmic nature of the function ensures that the model is heavily penalized when it is \"confident but wrong\", forcing it to adjust its weights more aggressively to improve predictions.",[32,22416,22418],{"id":22417},"validation-and-optimization","Validation and Optimization",[53,22420,3952],{"id":22421},"evaluation-metrics",[12,22423,22424,22425,22427],{},"For ",[40,22426,6628],{},", the common metrics include:",[1030,22429,22430,22435,22441],{},[1033,22431,22432,22434],{},[40,22433,4634],{},": Average of the squares of the differences between the actual values and the predictions.",[1033,22436,22437,22440],{},[40,22438,22439],{},"Root Mean Squared Error (RMSE)",": Square root of the MSE, which has the same unit as the dependent variable.",[1033,22442,22443,22446],{},[40,22444,22445],{},"Coefficient of Determination (R²)",": Proportion of the variance in the dependent variable that is explained by the model.",[12,22448,22424,22449,22427],{},[40,22450,17027],{},[1030,22452,22453,22459,22464,22469],{},[1033,22454,22455,22458],{},[40,22456,22457],{},"Accuracy",": Proportion of correct predictions over the total number of examples.",[1033,22460,22461,22463],{},[40,22462,4610],{},": Proportion of true positives over the total number of positive predictions.",[1033,22465,22466,22468],{},[40,22467,4616],{},": Proportion of true positives over the total number of actual positive examples.",[1033,22470,22471,22474],{},[40,22472,22473],{},"F1 Score",": Harmonic mean of precision and recall, providing a balanced measure between both.",[1734,22476,22477],{},[12,22478,22479],{},"The choice of the appropriate metric depends on the context of the problem and the consequences of classification errors. For example, in a fraud detection problem, it is more important to minimize false negatives (failing to detect fraud) than false positives (marking a legitimate transaction as fraud), so recall could be a more relevant metric than precision.",[53,22481,22483],{"id":22482},"optimization","Optimization",[12,22485,22486,22487,22490],{},"Optimization of machine learning models refers to the process of adjusting the model parameters to ",[40,22488,22489],{},"minimize the loss function",". This can be achieved through techniques like gradient descent, which iteratively adjusts the model weights in the direction that reduces the loss.",[12,22492,22493],{},"Gradient descent can be mathematically expressed as:",[83,22495,22497],{"className":22496},[1809],[83,22498,22500,22535],{"className":22499},[1813],[83,22501,22503],{"className":22502},[1817],[1819,22504,22505],{"xmlns":1821,"display":1822},[1824,22506,22507,22532],{},[1827,22508,22509,22512,22514,22516,22518,22521,22524,22526,22528,22530],{},[1840,22510,22511],{},"θ",[1834,22513,216],{},[1840,22515,22511],{},[1834,22517,5469],{},[1840,22519,22520],{},"α",[1840,22522,22523],{"mathvariant":648},"∇",[1840,22525,20914],{},[1834,22527,180],{"stretchy":5711},[1840,22529,22511],{},[1834,22531,505],{"stretchy":5711},[1863,22533,22534],{"encoding":1865},"\\theta = \\theta - \\alpha \\nabla J(\\theta)",[83,22536,22538,22557,22576],{"className":22537,"ariaHidden":1871},[1870],[83,22539,22541,22544,22548,22551,22554],{"className":22540},[1875],[83,22542],{"className":22543,"style":1880},[1879],[83,22545,22511],{"className":22546,"style":22547},[1884,1914],"margin-right:0.0278em;",[83,22549],{"className":22550,"style":1893},[1892],[83,22552,216],{"className":22553},[1897],[83,22555],{"className":22556,"style":1893},[1892],[83,22558,22560,22564,22567,22570,22573],{"className":22559},[1875],[83,22561],{"className":22562,"style":22563},[1879],"height:0.7778em;vertical-align:-0.0833em;",[83,22565,22511],{"className":22566,"style":22547},[1884,1914],[83,22568],{"className":22569,"style":1969},[1892],[83,22571,5469],{"className":22572},[1973],[83,22574],{"className":22575,"style":1969},[1892],[83,22577,22579,22582,22586,22589,22592,22595,22598],{"className":22578},[1875],[83,22580],{"className":22581,"style":5792},[1879],[83,22583,22520],{"className":22584,"style":22585},[1884,1914],"margin-right:0.0037em;",[83,22587,22523],{"className":22588},[1884],[83,22590,20914],{"className":22591,"style":21024},[1884,1914],[83,22593,180],{"className":22594},[5796],[83,22596,22511],{"className":22597,"style":22547},[1884,1914],[83,22599,505],{"className":22600},[5890],[12,22602,7112],{},[1030,22604,22605,22637,22669],{},[1033,22606,22607,22636],{},[83,22608,22610,22624],{"className":22609},[1813],[83,22611,22613],{"className":22612},[1817],[1819,22614,22615],{"xmlns":1821},[1824,22616,22617,22621],{},[1827,22618,22619],{},[1840,22620,22511],{},[1863,22622,22623],{"encoding":1865},"\\theta",[83,22625,22627],{"className":22626,"ariaHidden":1871},[1870],[83,22628,22630,22633],{"className":22629},[1875],[83,22631],{"className":22632,"style":1880},[1879],[83,22634,22511],{"className":22635,"style":22547},[1884,1914]," represents the model parameters (for example, the coefficients in regression).",[1033,22638,22639,22668],{},[83,22640,22642,22656],{"className":22641},[1813],[83,22643,22645],{"className":22644},[1817],[1819,22646,22647],{"xmlns":1821},[1824,22648,22649,22653],{},[1827,22650,22651],{},[1840,22652,22520],{},[1863,22654,22655],{"encoding":1865},"\\alpha",[83,22657,22659],{"className":22658,"ariaHidden":1871},[1870],[83,22660,22662,22665],{"className":22661},[1875],[83,22663],{"className":22664,"style":7106},[1879],[83,22666,22520],{"className":22667,"style":22585},[1884,1914]," is the learning rate, which controls the size of the steps taken in each iteration.",[1033,22670,22671,22720],{},[83,22672,22674,22696],{"className":22673},[1813],[83,22675,22677],{"className":22676},[1817],[1819,22678,22679],{"xmlns":1821},[1824,22680,22681,22693],{},[1827,22682,22683,22685,22687,22689,22691],{},[1840,22684,22523],{"mathvariant":648},[1840,22686,20914],{},[1834,22688,180],{"stretchy":5711},[1840,22690,22511],{},[1834,22692,505],{"stretchy":5711},[1863,22694,22695],{"encoding":1865},"\\nabla J(\\theta)",[83,22697,22699],{"className":22698,"ariaHidden":1871},[1870],[83,22700,22702,22705,22708,22711,22714,22717],{"className":22701},[1875],[83,22703],{"className":22704,"style":5792},[1879],[83,22706,22523],{"className":22707},[1884],[83,22709,20914],{"className":22710,"style":21024},[1884,1914],[83,22712,180],{"className":22713},[5796],[83,22715,22511],{"className":22716,"style":22547},[1884,1914],[83,22718,505],{"className":22719},[5890]," is the gradient of the loss function with respect to the parameters, indicating the direction of greatest increase in the loss.",[12,22722,22723],{},"The optimization process continues until a convergence criterion is met, such as a maximum number of iterations or a minimum improvement in the loss function.",[1030,22725,22726,22762,22816],{},[1033,22727,22728,22729,22732,22733,22761],{},"It has a ",[40,22730,22731],{},"learning rate"," (",[83,22734,22736,22749],{"className":22735},[1813],[83,22737,22739],{"className":22738},[1817],[1819,22740,22741],{"xmlns":1821},[1824,22742,22743,22747],{},[1827,22744,22745],{},[1840,22746,22520],{},[1863,22748,22655],{"encoding":1865},[83,22750,22752],{"className":22751,"ariaHidden":1871},[1870],[83,22753,22755,22758],{"className":22754},[1875],[83,22756],{"className":22757,"style":7106},[1879],[83,22759,22520],{"className":22760,"style":22585},[1884,1914],") that controls the size of the steps taken in each iteration (typically a small value like 0.01 or 0.001).",[1033,22763,7799,22764,22732,22767,22815],{},[40,22765,22766],{},"gradient",[83,22768,22770,22791],{"className":22769},[1813],[83,22771,22773],{"className":22772},[1817],[1819,22774,22775],{"xmlns":1821},[1824,22776,22777,22789],{},[1827,22778,22779,22781,22783,22785,22787],{},[1840,22780,22523],{"mathvariant":648},[1840,22782,20914],{},[1834,22784,180],{"stretchy":5711},[1840,22786,22511],{},[1834,22788,505],{"stretchy":5711},[1863,22790,22695],{"encoding":1865},[83,22792,22794],{"className":22793,"ariaHidden":1871},[1870],[83,22795,22797,22800,22803,22806,22809,22812],{"className":22796},[1875],[83,22798],{"className":22799,"style":5792},[1879],[83,22801,22523],{"className":22802},[1884],[83,22804,20914],{"className":22805,"style":21024},[1884,1914],[83,22807,180],{"className":22808},[5796],[83,22810,22511],{"className":22811,"style":22547},[1884,1914],[83,22813,505],{"className":22814},[5890],") is a vector containing the partial derivatives of the loss function with respect to each parameter, indicating the direction of greatest increase in the loss.",[1033,22817,22818,22819,22822],{},"The optimization process continues until a ",[40,22820,22821],{},"convergence"," criterion is met, such as a maximum number of iterations or a minimum improvement in the loss function.",[12,22824,22825],{},"Graphically:",[12,22827,22828,22832],{},[1554,22829],{"alt":22830,"src":22831},"Graphical representation of the gradient descent optimization process","\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations\u002Fshared\u002Fgradient-descent.webp",[1559,22833,22834],{},"Optimization with Gradient Descent",[1077,22836,22837,22840,22843,22846],{},[1033,22838,22839],{},"The process starts with a random point on the loss function (INITIAL POINT).",[1033,22841,22842],{},"The gradient is calculated at that point, indicating the direction of greatest increase in the loss.",[1033,22844,22845],{},"The model parameters are updated in the opposite direction of the gradient, with a step size controlled by the learning rate (LEARNING RATE \u002F STEP SIZE).",[1033,22847,22848],{},"This process is repeated iteratively until a local or global minimum of the loss function is reached, indicating that the model has been optimized.",[12,22850,22851],{},"The learning rate is crucial for the success of the optimization process:",[1030,22853,22854,22864,22873],{},[1033,22855,22856,22859,22860,22863],{},[40,22857,22858],{},"DIVERGENCE",": If the learning rate is too ",[40,22861,22862],{},"high",", the model may diverge, jumping over the minimum and increasing the loss.",[1033,22865,22866,22859,22869,22872],{},[40,22867,22868],{},"SLOW CONVERGENCE",[40,22870,22871],{},"low",", the optimization process may be very slow, taking a long time to converge or getting stuck in a local minimum.",[1033,22874,22875,22878],{},[40,22876,22877],{},"OPTIMAL CONVERGENCE",": An appropriate learning rate allows the model to converge efficiently towards a global or local minimum, effectively optimizing the loss function.",[32,22880,22882],{"id":22881},"the-machine-learning-process","The Machine Learning Process",[12,22884,22885],{},"We can summarize the ML process in:",[1077,22887,22888,22899,22910,22921,22931],{},[1033,22889,22890,22893,22894],{},[40,22891,22892],{},"Learning Paradigm",": Choose the type of learning (supervised, unsupervised, reinforcement) based on the problem to solve.\n",[1030,22895,22896],{},[1033,22897,22898],{},"Define the type of problem and available data.",[1033,22900,22901,22904,22905],{},[40,22902,22903],{},"Mathematical Model",": Select an appropriate model (regression, classification, clustering) and understand its mathematical formulation.\n",[1030,22906,22907],{},[1033,22908,22909],{},"Establish the mathematical relationship between input and output.",[1033,22911,22912,22915,22916],{},[40,22913,22914],{},"Loss\u002FCost Function",": Define a loss function that measures the model's error and can be optimized.\n",[1030,22917,22918],{},[1033,22919,22920],{},"Quantifies how bad the model is in its predictions.",[1033,22922,22923,22925,22926],{},[40,22924,22483],{},": Use techniques like gradient descent to adjust the model parameters and minimize the loss function.\n",[1030,22927,22928],{},[1033,22929,22930],{},"Finds the best parameters for the model to make good predictions.",[1033,22932,22933,22935,22936],{},[40,22934,5311],{},": Measure the model's performance using appropriate metrics for the problem type (MSE for regression, accuracy\u002Frecall for classification, etc.).\n",[1030,22937,22938],{},[1033,22939,22940],{},"Validates the performance of the model and its ability to generalize to unseen data.",{"title":79,"searchDepth":116,"depth":116,"links":22942},[22943,22948,22952,22956],{"id":5682,"depth":103,"text":5683,"children":22944},[22945,22946,22947],{"id":5689,"depth":116,"text":5690},{"id":6347,"depth":116,"text":6348},{"id":6576,"depth":116,"text":6577},{"id":6614,"depth":103,"text":6615,"children":22949},[22950,22951],{"id":6628,"depth":116,"text":6341},{"id":17027,"depth":116,"text":6335},{"id":22417,"depth":103,"text":22418,"children":22953},[22954,22955],{"id":22421,"depth":116,"text":3952},{"id":22482,"depth":116,"text":22483},{"id":22881,"depth":103,"text":22882},"2026-04-06","\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations\u002Fshared\u002Fml-paradigms.webp",{},"\u002Fblog\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations",{"title":5663,"description":5668},{"loc":22963,"priority":3837,"lastmod":22957},"\u002Fes\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations","machine-learning-paradigms-and-mathematical-foundations","blog\u002Fblog\u002Fmachine-learning-paradigms-and-mathematical-foundations","Types of machine learning, common algorithms and essential mathematical foundations for understanding how machine learning models work.",[5656,22968,4102,5657,5656],"Artificial Intelligence","UebnJOgy7GPnhDI7uhV4sfkeLEvIHGR5vGNjmPhJxHE",{"id":22971,"title":5675,"author":7,"body":22972,"date":23596,"description":22976,"extension":3830,"image":23597,"lastmod":23596,"meta":23598,"navigation":160,"order":103,"path":23599,"seo":23600,"sitemap":23601,"slug":23603,"stem":23604,"summary":23605,"tags":23606,"__hash__":23607},"content_en\u002Fblog\u002Fblog\u002Fmachine-learning-fundamentals.md",{"type":9,"value":22973,"toc":23587},[22974,22977,22979,22981,22985,23001,23004,23028,23031,23045,23047,23051,23054,23121,23123,23127,23130,23240,23242,23343,23345,23389,23410,23412,23416,23419,23469,23473,23476,23485,23488,23499,23512,23514,23518,23543,23553,23555,23559,23562,23582,23584],[12,22975,22976],{},"This is the first part of a series of articles where we will explore machine learning, from its basic concepts to neural networks and the creation of a machine learning model. In this first part, we will focus on the fundamentals of machine learning, including what it is, its types and some common algorithms.",[26,22978],{},[29,22980],{},[32,22982,22984],{"id":22983},"artificial-intelligence-and-machine-learning","Artificial Intelligence and Machine Learning",[12,22986,22987,22988,4385,22991,1626,22994,22997,22998,133],{},"You wake up one day, open Netflix and find exactly the series you wanted to watch. Then, you open Google and type something, and the search engine completes your sentence before you finish typing. How do they do this? The answer is: Artificial Intelligence. AI is a discipline focused on developing systems capable of performing tasks that normally require human intelligence, such as ",[40,22989,22990],{},"learning",[40,22992,22993],{},"reasoning",[40,22995,22996],{},"perceiving"," our environment, as well as ",[40,22999,23000],{},"making decisions",[12,23002,23003],{},"There are three types of AI:",[1030,23005,23006,23012,23018],{},[1033,23007,23008,23011],{},[40,23009,23010],{},"Weak or Narrow AI (Artificial Narrow Intelligence or ANI)",": This is the AI we have today. It is designed to perform specific tasks, such as voice recognition, product recommendations, or automatic translation. It does not have consciousness or real understanding; it simply follows predefined algorithms and patterns. Large Language Models like GPT, Claude, or Gemini are examples of weak AI, as they are designed to process and generate text, \"only\" being statistical models that predict text, and not having a deep understanding of the world or being able to perform tasks outside their specific domain. Although they may seem intelligent, in reality, they are only mimicking language patterns based on the data with which they were trained.",[1033,23013,23014,23017],{},[40,23015,23016],{},"General AI (Artificial General Intelligence or AGI)",": This is a hypothetical AI that would have the ability to understand, learn, and apply knowledge across a wide range of tasks, similar to human intelligence. It does not exist yet, but it is a long-term goal in the field of AI.",[1033,23019,23020,23023,23024,23027],{},[40,23021,23022],{},"Superintelligence (Artificial Superintelligence or ASI)",": This is an AI that would surpass human intelligence in all aspects, including creativity, problem-solving, and decision-making. It is a ",[40,23025,23026],{},"theoretical"," concept that raises many ethical and philosophical questions about the future of humanity.",[12,23029,23030],{},"Where does Machine Learning fit in? It's very common to confuse AI with Machine Learning, but they aren't exactly the same. We can say that Artificial Intelligence is a broad conceptual umbrella, and under that umbrella lies Machine Learning, a specific subfield that allows computers to learn automatically from data, without the need for a human to program them step by step.",[1734,23032,23033,23036],{},[12,23034,23035],{},"Recommended resources:",[1030,23037,23038],{},[1033,23039,23040],{},[19,23041,23044],{"href":23042,"rel":23043},"https:\u002F\u002Fyoutu.be\u002FdKqwnCKrpVI?si=g6qqFa_1G_M5P3LS",[23],"Artificial Intelligence vs Machine Learning vs Deep Learning | Machine Learning 101",[29,23046],{},[32,23048,23050],{"id":23049},"ai-subfields","AI Subfields",[12,23052,23053],{},"Within the broad umbrella of AI, there are several subfields that specialize in different aspects of artificial intelligence:",[1030,23055,23056,23061,23067,23073,23079,23085,23091,23097,23103,23109,23115],{},[1033,23057,23058,23060],{},[40,23059,5656],{},": Focuses on developing algorithms that allow machines to learn from data and improve their performance over time without being explicitly programmed for each specific task.",[1033,23062,23063,23066],{},[40,23064,23065],{},"Deep Learning",": Is a branch of machine learning that uses deep neural networks to model and solve complex problems. It is especially effective in tasks such as speech recognition, computer vision, and natural language processing.",[1033,23068,23069,23072],{},[40,23070,23071],{},"Natural Language Processing (NLP)",": Focuses on the interaction between computers and human language, allowing machines to understand, interpret, and generate text naturally. This is what makes it possible for chatbots like ChatGPT to maintain coherent conversations with users.",[1033,23074,23075,23078],{},[40,23076,23077],{},"Computer Vision",": This field enables machines to understand and process images and videos. It is fundamental for applications such as facial recognition, autonomous driving, and object detection.",[1033,23080,23081,23084],{},[40,23082,23083],{},"Robotics",": This field focuses on the design and construction of robots that can perform physical tasks in the real world, from manufacturing to medical assistance.",[1033,23086,23087,23090],{},[40,23088,23089],{},"Expert Systems",": These are programs that mimic the decision-making of a human expert in a specific domain, using rules and logic to solve complex problems.",[1033,23092,23093,23096],{},[40,23094,23095],{},"Automatic Reasoning",": This field focuses on inferring logical conclusions from formal rules. It is not the same as machine learning. This field includes symbolic logic, problem-solving, and automated planning.",[1033,23098,23099,23102],{},[40,23100,23101],{},"Intelligent Agents",": These are systems that can perceive their environment, reason about it, and make decisions to achieve specific goals. They can be as simple as a chatbot or as complex as an autonomous driving system (they can use machine learning, simple rules, logical reasoning, etc.).",[1033,23104,23105,23108],{},[40,23106,23107],{},"Distributed AI",": This refers to AI systems that operate across multiple devices or nodes, collaborating to solve problems more efficiently. This is especially relevant in applications such as the Internet of Things (IoT) and cloud computing.",[1033,23110,23111,23114],{},[40,23112,23113],{},"Explainable AI (XAI)",": This focuses on developing AI models that are transparent and understandable to humans, allowing users to understand how and why the AI ​​makes certain decisions.",[1033,23116,23117,23120],{},[40,23118,23119],{},"AI Ethics and Governance",": This deals with the ethical, legal, and social implications of AI development and use, addressing issues such as privacy, fairness, and transparency.",[29,23122],{},[32,23124,23126],{"id":23125},"how-a-machine-learns","How a Machine Learns",[12,23128,23129],{},"Everything depends on the data we give it:",[1030,23131,23132],{},[1033,23133,23134,23136,23137,23140,23141,23144,23145,23147,23148,23196,23198,23199,23201,23202,23214,23216,23217,23222,23223,23225,23226],{},[40,23135,5690],{},": Here we give the machine clear examples with correct answers already \"labeled\". For example, if we want the AI to help with a medical diagnosis, we give it thousands of medical histories where we already know which patient was ",[40,23138,23139],{},"sick"," and which patient was ",[40,23142,23143],{},"healthy",". The machine learns to recognize patterns in this data to be able to predict the diagnosis of new patients based on what it has learned.",[2466,23146],{},"A simple example would be something like this:",[2626,23149,23150,23166],{},[2629,23151,23152],{},[2632,23153,23154,23157,23160,23163],{},[2635,23155,23156],{},"Age",[2635,23158,23159],{},"Symptoms",[2635,23161,23162],{},"Test Results",[2635,23164,23165],{},"Diagnosis",[2642,23167,23168,23182],{},[2632,23169,23170,23173,23176,23179],{},[2647,23171,23172],{},"45",[2647,23174,23175],{},"Fever, Cough",[2647,23177,23178],{},"Positive",[2647,23180,23181],{},"Sick",[2632,23183,23184,23187,23190,23193],{},[2647,23185,23186],{},"30",[2647,23188,23189],{},"Headache",[2647,23191,23192],{},"Negative",[2647,23194,23195],{},"Healthy",[2466,23197],{},"The label here is the \"Diagnosis\", and the machine learns to associate the features (Age, Symptoms, Test Results) with that label to make future predictions.",[2466,23200],{},"Within supervised learning, there are two main types of tasks:",[1030,23203,23204,23209],{},[1033,23205,23206,23208],{},[40,23207,6335],{},": Where the machine assigns a label to each example. As in classifying emails as \"spam\" or \"not spam\".",[1033,23210,23211,23213],{},[40,23212,6341],{},": Where the machine predicts a continuous value. For example, predicting the price of a house based on features like size, location, and number of rooms.",[2466,23215],{},"Basically, if the response we want to predict is a category (or a ",[19,23218,23221],{"href":23219,"target":17018,"rel":23220,"ariaLabel":23221},"https:\u002F\u002Fwww.geeksforgeeks.org\u002Fmaths\u002Fdifference-between-discrete-and-continuous-variable\u002F",[17020,17021],"discrete variable","), it's classification, if the response represents a measurable amount on a continuous scale, it's regression.\nAnd the requirement for supervised learning to work well is to have a large and representative dataset, with accurate labels. If the data is scarce or the labels are incorrect, the machine will not be able to learn correctly and its predictions will be inaccurate.",[2466,23224],{},"Examples of ML applications are:",[1030,23227,23228,23231,23234,23237],{},[1033,23229,23230],{},"Fraud detection in financial transactions (classification)",[1033,23232,23233],{},"Stock price prediction (regression)",[1033,23235,23236],{},"Image recognition (classification)",[1033,23238,23239],{},"Sentiment analysis in social media (classification)",[29,23241],{},[1030,23243,23244],{},[1033,23245,23246,23248,23249,23251,23252,23289,23291,23292,23340,23342],{},[40,23247,6348],{},": Imagine being dropped in an unfamiliar country and having to deduce how society works simply by observing; it's similar. Here, the machine receives unlabeled data and must find hidden patterns on its own. The system will have to analyze similarities, differences, and behaviors to find unusual groupings or patterns. There's no \"teacher\" to tell it if it's right or wrong.",[2466,23250],{},"Main techniques:",[1077,23253,23254,23271,23283],{},[1033,23255,23256,23259,23260],{},[40,23257,23258],{},"Clustering (Grouping)",": Groups similar data points together.\nIt's typically used for customer segmentation, grouping documents by topic, and automatic image organization, among others. Some algorithms:\n",[1030,23261,23262,23265,23268],{},[1033,23263,23264],{},"K-means clustering",[1033,23266,23267],{},"DBSCAN",[1033,23269,23270],{},"Hierarchical clustering",[1033,23272,23273,23275,23276],{},[40,23274,6570],{},": This seeks to reduce the number of variables while maintaining important information. Used for visualizing complex data and preparing data for other models.\n",[1030,23277,23278,23280],{},[1033,23279,4086],{},[1033,23281,23282],{},"t-SNE",[1033,23284,23285,23288],{},[40,23286,23287],{},"Anomaly Detection",": Identifies data points that behave differently from the rest. Useful for detecting fraud, system failures, and suspicious behaviors.",[2466,23290],{},"A simple example would be:",[2626,23293,23294,23306],{},[2629,23295,23296],{},[2632,23297,23298,23300,23303],{},[2635,23299,23156],{},[2635,23301,23302],{},"Annual Income",[2635,23304,23305],{},"Monthly Expenses",[2642,23307,23308,23318,23329],{},[2632,23309,23310,23312,23315],{},[2647,23311,5417],{},[2647,23313,23314],{},"$30,000",[2647,23316,23317],{},"$1,000",[2632,23319,23320,23323,23326],{},[2647,23321,23322],{},"40",[2647,23324,23325],{},"$80,000",[2647,23327,23328],{},"$3,000",[2632,23330,23331,23334,23337],{},[2647,23332,23333],{},"60",[2647,23335,23336],{},"$50,000",[2647,23338,23339],{},"$2,000",[2466,23341],{},"The machine could group customers into segments based on their income and expenses, without explicitly telling it what groups exist.\nWith this, we can identify consumption patterns, such as young customers tending to spend less than middle-aged customers, or there being a group of customers with high income but low expenses, which could indicate a savings segment.",[29,23344],{},[1030,23346,23347],{},[1033,23348,23349,23351,23352,133,23357,23359,23360,23382,23384,23385],{},[40,23350,6577],{},": Think about how you train a pet with treats. The machine (the agent) takes decisions in an environment and receives \"rewards\" or \"penalties\". This is how Tesla's autonomous driving systems or robots learn to navigate the physical world. A example I like is a video where ",[19,23353,23356],{"href":23354,"target":17018,"rel":23355},"https:\u002F\u002Fyoutu.be\u002FPKDMGPf-PEA?si=tAEMO3cETdPrvi_t",[17020,17021],"they train an agent to play Geometry Dash",[2466,23358],{},"In this type of learning, there are four main components:",[1077,23361,23362,23367,23372,23377],{},[1033,23363,23364,23366],{},[40,23365,6587],{},": It is the system that takes decisions and learns through interaction with the environment. It can be a robot, a computer program, or any system that can perceive its environment and act upon it.",[1033,23368,23369,23371],{},[40,23370,6593],{},": It is the world in which the agent operates. It can be a physical environment, such as a robot in a room, or a virtual environment, such as a video game.",[1033,23373,23374,23376],{},[40,23375,6599],{},": It is the signal that the agent receives after taking an action. It can be positive (reward) or negative (penalty) and serves to guide the agent's learning.",[1033,23378,23379,23381],{},[40,23380,6605],{},": It is the strategy that the agent uses to decide what action to take based on its current state and the rewards it has received in the past.",[2466,23383],{},"Basically they follow a flow like the following:",[23386,23387],"mermaid-diagram",{"content":23388},"graph TD \nA[Agent] -->|Take action| B(Environment)\nB -->|Provide reward| C[Reward]\nC -->|Update policy| A",[1734,23390,23391,23394],{},[12,23392,23393],{},"Recommended Resources:",[1030,23395,23396,23403],{},[1033,23397,23398],{},[19,23399,23402],{"href":23400,"rel":23401},"https:\u002F\u002Fyoutu.be\u002FoT3arRRB2Cw?si=ykU9KQjQLxdn9ggj",[23],"What is Supervised and Unsupervised Learning? | DotCSV",[1033,23404,23405],{},[19,23406,23409],{"href":23407,"rel":23408},"https:\u002F\u002Fyoutu.be\u002FqBtB-xcJp4c?si=c2GuJBCFPorKGN44",[23],"Reinforcement Learning: The Definitive Guide",[29,23411],{},[32,23413,23415],{"id":23414},"ai-project-pipeline","AI Project Pipeline",[12,23417,23418],{},"An AI project typically follows a structured process that includes several key stages:",[1077,23420,23421,23426,23431,23437,23443,23448,23454,23463],{},[1033,23422,23423,23425],{},[40,23424,4965],{},": It is essential to clearly understand the problem to be solved and the project objectives. This includes identifying the questions to be answered, the expected results, and the success metrics.",[1033,23427,23428,23430],{},[40,23429,5024],{},": The data needed to train the AI ​​model is collected. This can include structured data (such as databases) or unstructured data (such as text, images, or videos). It is important to ensure that the data is high-quality and representative of the problem to be solved.",[1033,23432,23433,23436],{},[40,23434,23435],{},"Data Preprocessing",": The collected data often needs to be cleaned and transformed before being used to train the model. This may include removing missing values, normalizing data, coding categorical variables, and splitting the data into training and test sets.",[1033,23438,23439,23442],{},[40,23440,23441],{},"Model Selection",": The most suitable machine learning algorithm is chosen for the problem at hand. This may depend on the nature of the data, the complexity of the problem, and the available resources.",[1033,23444,23445,23447],{},[40,23446,5208],{},": The training dataset is used to train the AI ​​model. During this stage, the model learns from the data and adjusts its parameters to minimize prediction errors.",[1033,23449,23450,23453],{},[40,23451,23452],{},"Model Evaluation",": The model's performance is evaluated using the test set. Specific metrics are used to measure the model's precision, accuracy, sensitivity, and other characteristics, depending on the type of problem (classification, regression, etc.).",[1033,23455,23456,23459,23460,23462],{},[40,23457,23458],{},"Hyperparameter Tuning",": If the model's performance is unsatisfactory, the model's hyperparameters can be tuned to improve its performance. This may include changing the model's architecture, adjusting the learning rate, or modifying other algorithm-specific parameters. 8. ",[40,23461,5507],{},": Once the model has been trained and evaluated, it is deployed in a production environment where it can be used to make real-time predictions or process new data.",[1033,23464,23465,23468],{},[40,23466,23467],{},"Maintenance and Updating",": After deployment, it is important to monitor the model's performance and update it regularly to ensure it remains effective as data and environmental conditions change.",[32,23470,23472],{"id":23471},"memorizing-vs-learning","Memorizing vs. Learning",[12,23474,23475],{},"When we talk about learning, whether human or machine, there's a crucial concept we must understand: memorizing is not the same as learning.",[12,23477,23478,23481,23482,23484],{},[40,23479,23480],{},"Memorizing"," is like copying and pasting information without truly understanding it. For example, if you memorize the formula for the area of ​​a circle (A = πr²) without understanding what each part means, you won't be able to apply it correctly in different contexts. Memory saves you in the short term, but it doesn't give you the ability to adapt to new situations or solve problems you haven't encountered before. In contrast, ",[40,23483,22990],{}," involves understanding the underlying concepts and being able to apply them to new situations.",[12,23486,23487],{},"In the world of machine learning, a machine that only memorizes training data might perform excellently on that specific data, but then fail spectacularly when used in real-world environments. Therefore, in machine learning, the true goal isn't to memorize specific patterns, but to generalize: to learn rules and relationships that work beyond the examples seen.",[12,23489,23490,23491,23494,23495,23498],{},"But learning isn't easy either. Sometimes, machines suffer from ",[40,23492,23493],{},"overfitting",", which occurs when a model perfectly \"memorizes\" the training data but fails miserably when faced with new, real-world data. It's exactly like a student who memorizes exam answers without truly understanding the concepts. Conversely, if the model is too simple and learns nothing, it suffers from ",[40,23496,23497],{},"underfitting",", like a student who didn't study enough.",[1734,23500,23501,23503],{},[12,23502,23393],{},[1030,23504,23505],{},[1033,23506,23507],{},[19,23508,23511],{"href":23509,"rel":23510},"https:\u002F\u002Fyoutu.be\u002Fo3DztvnfAJg?si=lorMlPZqLAMa-EV3",[23],"Underfitting and Overfitting: Explained",[29,23513],{},[32,23515,23517],{"id":23516},"the-components-of-an-ai-system","The Components of an AI System",[1030,23519,23520,23531,23537],{},[1033,23521,23522,23525,23526,133],{},[40,23523,23524],{},"Data",": This is the foundation of any AI system. Without data, there is no learning. It must be high-quality, relevant, and representative of the problem to be solved. It should be high-volume and have the least possible ",[19,23527,23530],{"href":23528,"target":17018,"rel":23529},"https:\u002F\u002Fwww.innovatiana.com\u002Fen\u002Fpost\u002Fbias-estimation-in-machine-learning",[17020,17021],"bias",[1033,23532,23533,23536],{},[40,23534,23535],{},"Algorithms",": These are the recipes the machine follows to learn from the data. There are many types of algorithms, each with its own strengths and weaknesses, and they must be carefully selected according to the specific problem to be solved, configured, and fine-tuned to achieve the best possible performance.",[1033,23538,23539,23542],{},[40,23540,23541],{},"Infrastructure",": This is the hardware and software necessary to process the data and run the algorithms. This includes everything from servers (CPUs, GPUs, TPUs) to cloud computing platforms and development tools (AWS, Azure, GCP), as well as data storage and database management systems.",[12,23544,23545,23546,23548,23549,23552],{},"In addition to these components, we have ",[40,23547,5310],{},", which is the process of measuring the AI ​​model's performance to ensure it is functioning correctly and meeting the established objectives, as well as the role of ",[40,23550,23551],{},"ethics and governance",", which is crucial for considering the ethical and social implications.",[29,23554],{},[32,23556,23558],{"id":23557},"ethics-in-ai","Ethics in AI",[12,23560,23561],{},"As artificial intelligence becomes more ubiquitous in our lives, it is crucial to consider the ethical implications of its use. Machine learning models can perpetuate existing biases in the data, which can lead to unfair or discriminatory decisions. For example, if a hiring model is trained on historical data that reflects gender or racial bias, the model is likely to reproduce those biases in its recommendations. Furthermore, data privacy is a major concern. It is essential to ensure that the data used is collected and handled ethically, respecting people's privacy and rights.",[1030,23563,23564,23570,23576],{},[1033,23565,23566,23569],{},[40,23567,23568],{},"Transparency",": Systems must be understandable and auditable so that users can understand how they work and why they make certain decisions. One solution to this is explainable AI (XAI).",[1033,23571,23572,23575],{},[40,23573,23574],{},"Explainability",": AI models must be able to explain their decisions clearly and comprehensibly to users, which helps build trust and allows users to understand the reasons behind the system's recommendations or actions.",[1033,23577,23578,23581],{},[40,23579,23580],{},"Accountability",": It must be clearly established who is responsible for the decisions made by AI systems, especially in cases where those decisions can have a significant impact on people's lives. This is where legal frameworks and regulations come into play, which must be developed to ensure that AI companies and developers are held accountable for their creations.",[29,23583],{},[12,23585,23586],{},"This concludes the first part of this series of articles on machine learning. In the next part, we will explore some machine learning paradigms and certain mathematical foundations that are essential for understanding how the algorithms work.",{"title":79,"searchDepth":116,"depth":116,"links":23588},[23589,23590,23591,23592,23593,23594,23595],{"id":22983,"depth":103,"text":22984},{"id":23049,"depth":103,"text":23050},{"id":23125,"depth":103,"text":23126},{"id":23414,"depth":103,"text":23415},{"id":23471,"depth":103,"text":23472},{"id":23516,"depth":103,"text":23517},{"id":23557,"depth":103,"text":23558},"2026-03-30","\u002Fblog\u002Fmachine-learning-fundamentals\u002Fshared\u002Fml-fundamentals.webp",{},"\u002Fblog\u002Fblog\u002Fmachine-learning-fundamentals",{"title":5675,"description":22976},{"loc":23602,"priority":3837,"lastmod":23596},"\u002Fes\u002Fblog\u002Fmachine-learning-fundamentals","machine-learning-fundamentals","blog\u002Fblog\u002Fmachine-learning-fundamentals","Basic concepts for starting in the world of machine learning",[5656,22968,4102,5657,5656],"pEcYe634ioebWgtBZVCgWgEWVuXQtl0dUEymnA919Tg",{"id":23609,"title":23610,"author":7,"body":23611,"date":30163,"description":23615,"extension":3830,"image":30164,"lastmod":30165,"meta":30166,"navigation":160,"order":86,"path":30167,"seo":30168,"sitemap":30169,"slug":30171,"stem":30172,"summary":30173,"tags":30174,"__hash__":30178},"content_en\u002Fblog\u002Fblog\u002Fgetting-started-vue-vite.md","Getting Started with Vue 3 and Vite",{"type":9,"value":23612,"toc":30143},[23613,23616,23618,23620,23624,23627,23665,23668,23678,23680,23684,23692,23695,23698,23700,23704,23707,23725,23735,23744,23747,23756,23759,23768,23771,23848,23851,23860,23880,23883,23886,23889,23897,23902,23915,23920,23932,23937,23952,23957,23971,23979,23986,24013,24016,24024,24033,24035,24039,24042,24291,24298,24306,24320,24324,24402,24406,24409,24419,24811,24821,24826,25326,25333,25339,25346,25357,25359,25363,25373,25571,25574,25635,25642,25891,25908,25914,26325,26338,26343,26594,26623,26626,26652,26660,26669,26680,26682,26685,26687,26691,26694,26697,26703,26926,26940,27285,27300,27303,27306,27326,27332,27334,27338,27341,27348,27354,27613,27628,27634,27856,27865,28182,28187,28190,28213,28217,28227,28237,28247,28251,28257,28302,28305,28328,28332,28339,28346,28349,28380,28383,28385,28389,28396,28408,28411,28486,28496,28502,28505,28528,28530,28534,28543,28552,28555,28573,28579,28827,28834,28875,28882,29149,29156,29168,29173,29778,29784,29791,29804,29806,29810,29813,29818,29831,29840,29846,29851,29866,29888,29900,29920,29938,29957,29962,29974,29984,29989,30024,30027,30030,30039,30042,30065,30068,30084,30086,30090,30093,30133,30135,30138,30140],[12,23614,23615],{},"In this guide, we will explore how to start a modern project with Vue 3 and Vite, explain the project structure, how a Vue application works, the router, Pinia, composables, and we'll see some best practices for developing scalable and maintainable applications. As a bonus, we'll publish the project to GitHub and see how to install Tailwind CSS v4 to get fast and responsive styles.",[26,23617],{},[29,23619],{},[32,23621,23623],{"id":23622},"setting-up-the-environment","Setting up the environment",[12,23625,23626],{},"Before continuing, you should have:",[1030,23628,23629,23642,23649,23657],{},[1033,23630,23631,23632,23635,23636,23641],{},"Node.js, any ",[40,23633,23634],{},"LTS"," version. I recommend getting used to using ",[19,23637,23640],{"target":17018,"href":23638,"rel":23639},"https:\u002F\u002Fgithub.com\u002Fcoreybutler\u002Fnvm-windows",[17020,17021],"nvm"," to manage multiple Node versions.",[1033,23643,23644,23645,23648],{},"A package manager (here we'll use ",[61,23646,23647],{},"npm",", which is already installed with Node.js).",[1033,23650,23651,23656],{},[19,23652,23655],{"target":17018,"href":23653,"rel":23654},"https:\u002F\u002Fcode.visualstudio.com\u002F",[17020,17021],"VS Code"," updated",[1033,23658,23659,23664],{},[19,23660,23663],{"target":17018,"href":23661,"rel":23662},"https:\u002F\u002Fwww.desarrollolibre.net\u002Fblog\u002Fprogramacion-basica\u002Fsetting-up-git-for-the-first-time",[17020,17021],"Git configured"," correctly",[12,23666,23667],{},"Also, install the official Vue.js extension for VS Code:",[1030,23669,23670],{},[1033,23671,23672,23677],{},[19,23673,23676],{"target":17018,"href":23674,"rel":23675},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=Vue.volar",[17020,17021],"Vue.js (Volar)",".\nLater we'll explore other useful plugins like ESLint, Prettier, and Tailwind CSS IntelliSense.",[29,23679],{},[32,23681,23683],{"id":23682},"javascript-or-typescript","JavaScript or TypeScript?",[12,23685,23686,23687,133],{},"Vue 3 has quite good support for TypeScript, you can use it keeping in mind the ",[19,23688,23691],{"target":17018,"href":23689,"rel":23690},"https:\u002F\u002Fvuejs.org\u002Fguide\u002Ftypescript\u002Foverview.html",[17020,17021],"official usage guide",[12,23693,23694],{},"You don't need to use TypeScript in all your projects, especially if you're just starting out or just want to experiment. So my recommendation is that you assess your context, the application, and your team (if you're working in one).",[12,23696,23697],{},"In this guide we'll use JavaScript to keep things simple.",[29,23699],{},[32,23701,23703],{"id":23702},"creating-the-project-with-vite","Creating the project with Vite",[12,23705,23706],{},"The fastest way to start a Vue 3 project with Vite is using the command (you can run it in any folder where you want to create the project, use VS Code's integrated terminal or your favorite terminal):",[74,23708,23712],{"className":23709,"code":23710,"language":23711,"meta":79,"style":79},"language-bash shiki shiki-themes vitesse-light vitesse-dark","npm create vue@latest\n","bash",[61,23713,23714],{"__ignoreMap":79},[83,23715,23716,23719,23722],{"class":85,"line":86},[83,23717,23647],{"class":23718},"s_xSY",[83,23720,23721],{"class":237}," create",[83,23723,23724],{"class":237}," vue@latest\n",[12,23726,23727,23728,23731,23732,23734],{},"If it's the first time you use it, it will ask if you want to install the ",[61,23729,23730],{},"create-vue"," package. Answer yes (type ",[61,23733,3414],{}," and press ENTER).",[12,23736,23737,23741],{},[1554,23738],{"alt":23739,"src":23740},"Installing create-vue","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Finstall-create-vue-package.webp",[1559,23742,23743],{},"Installing package: create-vue",[12,23745,23746],{},"It will ask you for the project name, type the name you want:",[12,23748,23749,23753],{},[1554,23750],{"alt":23751,"src":23752},"Project name","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fproject-name.webp",[1559,23754,23755],{},"Give your project a name",[12,23757,23758],{},"Then select the options you need:",[12,23760,23761,23765],{},[1554,23762],{"alt":23763,"src":23764},"Project options","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fproject-options.webp",[1559,23766,23767],{},"Available features when creating a Vue app",[12,23769,23770],{},"Let's go point by point (as shown in the image, we move with the arrow keys and select with the spacebar):",[1077,23772,23773,23779,23790,23802,23808,23814,23836,23842],{},[1033,23774,23775,23778],{},[40,23776,23777],{},"TypeScript",": as we mentioned before, we'll use JavaScript, so we skip this.",[1033,23780,23781,23784,23785,133],{},[40,23782,23783],{},"JSX Support",": we won't use ",[19,23786,23789],{"target":17018,"href":23787,"rel":23788},"https:\u002F\u002Fkinsta.com\u002Fes\u002Fblog\u002Fque-es-jsx\u002F",[17020,17021],"JSX",[1033,23791,23792,23795,23796,23801],{},[40,23793,23794],{},"Router (SPA development)",": Vue Router is essential for working with Vue as a SPA (Single Page Application). We won't go into detail about ",[19,23797,23800],{"target":17018,"href":23798,"rel":23799},"https:\u002F\u002Fwww.geeksforgeeks.org\u002Fblogs\u002Fspa-vs-mpa-which-one-is-better-for-you\u002F",[17020,17021],"SPA vs MPA",", just keep in mind that Vue works as a SPA by default. Select this option.",[1033,23803,23804,23807],{},[40,23805,23806],{},"Pinia (state management)",": it's the official library for state management. It will help us manage shared data between components. Select this option.",[1033,23809,23810,23813],{},[40,23811,23812],{},"Vitest (unit testing)",": is the recommended testing framework for Vite projects. We won't use it in this guide.",[1033,23815,23816,23819,23820,4385,23825,20569,23830,23835],{},[40,23817,23818],{},"End-to-End Testing",": will allow you to choose and integrate a tool for E2E testing (",[19,23821,23824],{"target":17018,"href":23822,"rel":23823},"https:\u002F\u002Fplaywright.dev\u002F",[17020,17021],"Playwright",[19,23826,23829],{"target":17018,"href":23827,"rel":23828},"https:\u002F\u002Fwww.cypress.io\u002F",[17020,17021],"Cypress",[19,23831,23834],{"target":17018,"href":23832,"rel":23833},"https:\u002F\u002Fnightwatchjs.org\u002F",[17020,17021],"Nightwatch","). We won't use it in this guide.",[1033,23837,23838,23841],{},[40,23839,23840],{},"ESLint (error prevention)",": is a tool to maintain code quality, helping to detect errors and maintain consistent style. I highly recommend its use, although it's important to customize it according to your team and project. We'll select it to explore it a bit more later.",[1033,23843,23844,23847],{},[40,23845,23846],{},"Prettier (code formatting)",": is a tool to automatically format code. In this case we'll select it too to explore it.",[12,23849,23850],{},"Press ENTER and now it will ask about some experimental Vite features:",[12,23852,23853,23857],{},[1554,23854],{"alt":23855,"src":23856},"Experimental Vite features","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fproject-experimental-options.webp",[1559,23858,23859],{},"Vite experimental features",[1077,23861,23862,23874],{},[1033,23863,23864,23867,23868,23873],{},[40,23865,23866],{},"Oxlint",": is a new linter, part of ",[19,23869,23872],{"target":17018,"href":23870,"rel":23871},"https:\u002F\u002Foxc.rs\u002F",[17020,17021],"OXC",", a new collection of JavaScript tools written in Rust, Oxlint is extremely fast and shows promise, however as mentioned on its website, it still has some issues, so for now I recommend continuing to use ESLint. We ignore this option.",[1033,23875,23876,23879],{},[40,23877,23878],{},"rolldown vite (experimental)",": Rolldown-vite is a fork of Vite that uses Rolldown instead of Rollup and esbuild, with the goal of achieving maximum performance. It will soon become the default package, for now let's ignore this option.",[12,23881,23882],{},"We continue pressing ENTER.",[12,23884,23885],{},"It will ask if you want to start with a completely blank project or with examples. If it's your first time, I recommend selecting \"No\" so you can see a basic structure with examples. That's the option we'll select here.",[12,23887,23888],{},"Vite will create the initial project structure and give us some useful commands, let's run them one by one:",[12,23890,23891,23895],{},[1554,23892],{"alt":23893,"src":23894},"Project created","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fproject-created.webp",[1559,23896,23893],{},[1077,23898,23899],{},[1033,23900,23901],{},"First we navigate to the project folder:",[74,23903,23905],{"className":23709,"code":23904,"language":23711,"meta":79,"style":79},"cd project-name\n",[61,23906,23907],{"__ignoreMap":79},[83,23908,23909,23912],{"class":85,"line":86},[83,23910,23911],{"class":294},"cd",[83,23913,23914],{"class":237}," project-name\n",[1077,23916,23917],{"start":103},[1033,23918,23919],{},"We install the dependencies (this may take a few minutes depending on your connection):",[74,23921,23923],{"className":23709,"code":23922,"language":23711,"meta":79,"style":79},"npm install\n",[61,23924,23925],{"__ignoreMap":79},[83,23926,23927,23929],{"class":85,"line":86},[83,23928,23647],{"class":23718},[83,23930,23931],{"class":237}," install\n",[1077,23933,23934],{"start":116},[1033,23935,23936],{},"This command is to run Prettier, it won't have any effect because we haven't changed anything yet, but it's good to keep it in mind:",[74,23938,23940],{"className":23709,"code":23939,"language":23711,"meta":79,"style":79},"npm run format\n",[61,23941,23942],{"__ignoreMap":79},[83,23943,23944,23946,23949],{"class":85,"line":86},[83,23945,23647],{"class":23718},[83,23947,23948],{"class":237}," run",[83,23950,23951],{"class":237}," format\n",[1077,23953,23954],{"start":124},[1033,23955,23956],{},"Finally, we start the development server:",[74,23958,23960],{"className":23709,"code":23959,"language":23711,"meta":79,"style":79},"npm run dev\n",[61,23961,23962],{"__ignoreMap":79},[83,23963,23964,23966,23968],{"class":85,"line":86},[83,23965,23647],{"class":23718},[83,23967,23948],{"class":237},[83,23969,23970],{"class":237}," dev\n",[12,23972,23973,23977],{},[1554,23974],{"alt":23975,"src":23976},"Development server running","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fdev-server-running.webp",[1559,23978,23975],{},[12,23980,23981,23982,23985],{},"Vite runs the development server at ",[61,23983,23984],{},"http:\u002F\u002Flocalhost:5173\u002F"," (the port may vary if 5173 is already in use (5174, 5175, etc.)).",[1734,23987,23988,23991,24005],{},[12,23989,23990],{},"Port 5173 is a hint to Vite itself:",[1030,23992,23993,23996,23999,24002],{},[1033,23994,23995],{},"5 = V",[1033,23997,23998],{},"1 = I",[1033,24000,24001],{},"7 = T",[1033,24003,24004],{},"3 = E",[12,24006,24007,24008,133],{},"Although beyond that, Vite uses port 5173 because it's uncommon in development environments, reducing the likelihood of conflicts with other local servers. Via ",[19,24009,24012],{"target":17018,"href":24010,"rel":24011},"https:\u002F\u002Fmedium.com\u002F@bishakhghosh0\u002Fwhy-localhost-5173-is-every-frontend-developers-best-friend-b3bb5b6fb1db",[17020,17021],"Why localhost:5173 is Every Frontend Developer's Best Friend",[12,24014,24015],{},"If we go to that URL in our browser, we'll see the Vue app running:",[12,24017,24018,24022],{},[1554,24019],{"alt":24020,"src":24021},"Vue app running","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fvue-app-running.webp",[1559,24023,24020],{},[12,24025,24026,24027,24032],{},"The Vue team shares several official resources to learn more about the framework, starting with the ",[19,24028,24031],{"target":17018,"href":24029,"rel":24030},"https:\u002F\u002Fvuejs.org\u002Fguide\u002Fintroduction.html",[17020,17021],"official documentation",". Explore each link to learn about the entire ecosystem.",[29,24034],{},[32,24036,24038],{"id":24037},"project-structure","Project Structure",[12,24040,24041],{},"Let's look at the initial structure, open the project in your favorite code editor (I recommend VS Code):",[74,24043,24045],{"className":23709,"code":24044,"language":23711,"meta":79,"style":79},"my-vue-app\u002F\n├── .vscode\u002F              # (If you're in VS Code) Visual Studio Code configuration\n├── node_modules\u002F         # Project dependencies, generated when installing packages\n├── public\u002F               # Static files\n├── src\u002F                  # Application source code\n│   ├── assets\u002F           # Resources like images and styles\n│   ├── components\u002F       # Reusable Vue components\n│   ├── router\u002F           # Vue Router configuration\n│   ├── store\u002F            # Pinia configuration\n│   ├── views\u002F            # Views for the routes\n│   ├── App.vue           # Root component of the application\n│   └── main.js           # Application entry point\n├── .editorconfig         # EditorConfig configuration\n├── .gitattributes        # Git configuration\n├── .gitignore            # Files and folders ignored by Git\n├── .prettierrc.json      # Prettier configuration\n├── eslint.config.js      # ESLint configuration\n├── index.html            # Main HTML file\n├── jsconfig.json         # JavaScript configuration for the editor\n├── package-lock.json     # Exact versions of dependencies (autogenerated)\n├── package.json          # Project information and scripts\n├── README.md             # Project documentation\n└── vite.config.js        # Vite configuration\n",[61,24046,24047,24052,24063,24073,24083,24093,24107,24119,24131,24143,24155,24167,24180,24190,24200,24210,24220,24230,24240,24250,24260,24270,24280],{"__ignoreMap":79},[83,24048,24049],{"class":85,"line":86},[83,24050,24051],{"class":23718},"my-vue-app\u002F\n",[83,24053,24054,24057,24060],{"class":85,"line":103},[83,24055,24056],{"class":23718},"├──",[83,24058,24059],{"class":237}," .vscode\u002F",[83,24061,24062],{"class":858},"              # (If you're in VS Code) Visual Studio Code configuration\n",[83,24064,24065,24067,24070],{"class":85,"line":116},[83,24066,24056],{"class":23718},[83,24068,24069],{"class":237}," node_modules\u002F",[83,24071,24072],{"class":858},"         # Project dependencies, generated when installing packages\n",[83,24074,24075,24077,24080],{"class":85,"line":124},[83,24076,24056],{"class":23718},[83,24078,24079],{"class":237}," public\u002F",[83,24081,24082],{"class":858},"               # Static files\n",[83,24084,24085,24087,24090],{"class":85,"line":144},[83,24086,24056],{"class":23718},[83,24088,24089],{"class":237}," src\u002F",[83,24091,24092],{"class":858},"                  # Application source code\n",[83,24094,24095,24098,24101,24104],{"class":85,"line":157},[83,24096,24097],{"class":23718},"│",[83,24099,24100],{"class":237},"   ├──",[83,24102,24103],{"class":237}," assets\u002F",[83,24105,24106],{"class":858},"           # Resources like images and styles\n",[83,24108,24109,24111,24113,24116],{"class":85,"line":164},[83,24110,24097],{"class":23718},[83,24112,24100],{"class":237},[83,24114,24115],{"class":237}," components\u002F",[83,24117,24118],{"class":858},"       # Reusable Vue components\n",[83,24120,24121,24123,24125,24128],{"class":85,"line":190},[83,24122,24097],{"class":23718},[83,24124,24100],{"class":237},[83,24126,24127],{"class":237}," router\u002F",[83,24129,24130],{"class":858},"           # Vue Router configuration\n",[83,24132,24133,24135,24137,24140],{"class":85,"line":205},[83,24134,24097],{"class":23718},[83,24136,24100],{"class":237},[83,24138,24139],{"class":237}," store\u002F",[83,24141,24142],{"class":858},"            # Pinia configuration\n",[83,24144,24145,24147,24149,24152],{"class":85,"line":210},[83,24146,24097],{"class":23718},[83,24148,24100],{"class":237},[83,24150,24151],{"class":237}," views\u002F",[83,24153,24154],{"class":858},"            # Views for the routes\n",[83,24156,24157,24159,24161,24164],{"class":85,"line":222},[83,24158,24097],{"class":23718},[83,24160,24100],{"class":237},[83,24162,24163],{"class":237}," App.vue",[83,24165,24166],{"class":858},"           # Root component of the application\n",[83,24168,24169,24171,24174,24177],{"class":85,"line":266},[83,24170,24097],{"class":23718},[83,24172,24173],{"class":237},"   └──",[83,24175,24176],{"class":237}," main.js",[83,24178,24179],{"class":858},"           # Application entry point\n",[83,24181,24182,24184,24187],{"class":85,"line":277},[83,24183,24056],{"class":23718},[83,24185,24186],{"class":237}," .editorconfig",[83,24188,24189],{"class":858},"         # EditorConfig configuration\n",[83,24191,24192,24194,24197],{"class":85,"line":282},[83,24193,24056],{"class":23718},[83,24195,24196],{"class":237}," .gitattributes",[83,24198,24199],{"class":858},"        # Git configuration\n",[83,24201,24202,24204,24207],{"class":85,"line":306},[83,24203,24056],{"class":23718},[83,24205,24206],{"class":237}," .gitignore",[83,24208,24209],{"class":858},"            # Files and folders ignored by Git\n",[83,24211,24212,24214,24217],{"class":85,"line":344},[83,24213,24056],{"class":23718},[83,24215,24216],{"class":237}," .prettierrc.json",[83,24218,24219],{"class":858},"      # Prettier configuration\n",[83,24221,24222,24224,24227],{"class":85,"line":379},[83,24223,24056],{"class":23718},[83,24225,24226],{"class":237}," eslint.config.js",[83,24228,24229],{"class":858},"      # ESLint configuration\n",[83,24231,24232,24234,24237],{"class":85,"line":408},[83,24233,24056],{"class":23718},[83,24235,24236],{"class":237}," index.html",[83,24238,24239],{"class":858},"            # Main HTML file\n",[83,24241,24242,24244,24247],{"class":85,"line":443},[83,24243,24056],{"class":23718},[83,24245,24246],{"class":237}," jsconfig.json",[83,24248,24249],{"class":858},"         # JavaScript configuration for the editor\n",[83,24251,24252,24254,24257],{"class":85,"line":464},[83,24253,24056],{"class":23718},[83,24255,24256],{"class":237}," package-lock.json",[83,24258,24259],{"class":858},"     # Exact versions of dependencies (autogenerated)\n",[83,24261,24262,24264,24267],{"class":85,"line":469},[83,24263,24056],{"class":23718},[83,24265,24266],{"class":237}," package.json",[83,24268,24269],{"class":858},"          # Project information and scripts\n",[83,24271,24272,24274,24277],{"class":85,"line":480},[83,24273,24056],{"class":23718},[83,24275,24276],{"class":237}," README.md",[83,24278,24279],{"class":858},"             # Project documentation\n",[83,24281,24282,24285,24288],{"class":85,"line":490},[83,24283,24284],{"class":23718},"└──",[83,24286,24287],{"class":237}," vite.config.js",[83,24289,24290],{"class":858},"        # Vite configuration\n",[12,24292,24293,24294,24297],{},"The structure may vary slightly depending on the options selected when creating the project (for example, whether or not ESLint or Pinia is included). Also, if you're using VS Code you probably see the ",[61,24295,24296],{},".vscode\u002F"," folder with specific editor settings and some files you see \"grouped\":",[12,24299,24300,24304],{},[1554,24301],{"alt":24302,"src":24303},"Project structure in VS Code","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fproject-structure-nested.webp",[1559,24305,24302],{},[12,24307,24308,24309,24312,24313,24315,24316,24319],{},"This is just a visual way that VS Code has to organize files, you can display them individually (my preference) by changing the value of ",[61,24310,24311],{},"\"explorer.fileNesting.enabled\""," to ",[61,24314,5711],{}," in the ",[61,24317,24318],{},".vscode\\settings.json"," file.",[53,24321,24323],{"id":24322},"understanding-the-main-folders","Understanding the main folders",[1030,24325,24326,24332],{},[1033,24327,24328,24331],{},[61,24329,24330],{},"public\u002F",": Here go the static files that will not be processed by Vite. You can place images, fonts or other resources that you need to serve directly.",[1033,24333,24334,24337,24338],{},[61,24335,24336],{},"src\u002F",": This is the most important folder, it contains all the source code for your application. Here we have:\n",[1030,24339,24340,24346,24352,24364,24380,24390,24396],{},[1033,24341,24342,24345],{},[61,24343,24344],{},"assets\u002F",": Here go the resources like images, styles, fonts, etc. that you will use in your application.",[1033,24347,24348,24351],{},[61,24349,24350],{},"components\u002F",": Here go the global, reusable Vue components that you can use in different parts of your application, for example, buttons, cards, modals, etc.",[1033,24353,24354,24357,24358,24363],{},[61,24355,24356],{},"router\u002F",": Here is the configuration of ",[19,24359,24362],{"href":24360,"target":17018,"rel":24361},"https:\u002F\u002Frouter.vuejs.org\u002F",[17020,17021],"Vue Router",", where you define the routes of your application and how to navigate between them, as well as possible configuration of guards, lazy loading, etc.",[1033,24365,24366,24357,24369,24374,24375],{},[61,24367,24368],{},"store\u002F",[19,24370,24373],{"href":24371,"target":17018,"rel":24372},"https:\u002F\u002Fpinia.vuejs.org\u002F",[17020,17021],"Pinia",", where you define the ",[19,24376,24379],{"href":24377,"target":17018,"rel":24378},"https:\u002F\u002Fkinsta.com\u002Fes\u002Fblog\u002Fvue-pinia\u002F",[17020,17021],"global state of your application. ",[1033,24381,24382,24385,24386,24389],{},[61,24383,24384],{},"views\u002F",": Here go the main views that correspond to the routes defined in Vue Router. Each view generally represents a full page, unlike components which are smaller, reusable parts. In the end, all are ",[61,24387,24388],{},".vue"," files, so the difference lies in their purpose and use.",[1033,24391,24392,24395],{},[61,24393,24394],{},"App.vue",": This is the root component of your application, where everything is mounted (we will explain more later).",[1033,24397,24398,24401],{},[61,24399,24400],{},"main.js",": This is the entry point of your application, where Vue is initialized, plugins are configured (like Vue Router and Pinia) and the application is mounted on the DOM.",[53,24403,24405],{"id":24404},"is-this-structure-enough","Is this structure enough?",[12,24407,24408],{},"It's a basic structure that for now is fine. As your application grows, it's normal to want to organize the code better. Here are two proposals:",[1030,24410,24411],{},[1033,24412,24413,24414,1626,24416,24418],{},"Create subfolders by module\u002Ffunctionality within the different folders, like ",[61,24415,24350],{},[61,24417,24384],{},". For example:",[74,24420,24422],{"className":23709,"code":24421,"language":23711,"meta":79,"style":79},"my-vue-app\u002F\n├── src\u002F\n│   ├── assets\u002F\n│   ├── components\u002F\n│   │   ├── auth\u002F\n│   │   │   ├── LoginForm.vue\n│   │   │   └── RegisterForm.vue\n│   │   ├── dashboard\u002F\n│   │   │   ├── StatsCard.vue\n│   │   │   └── ChartWidget.vue\n│   │   └── shared\u002F\n│   │       ├── BaseButton.vue\n│   │       └── BaseModal.vue\n│   │\n│   ├── views\u002F\n│   │   ├── auth\u002F\n│   │   │   ├── LoginView.vue\n│   │   │   └── RegisterView.vue\n│   │   ├── dashboard\u002F\n│   │   │   └── DashboardView.vue\n│   │   └── home\u002F\n│   │       └── HomeView.vue\n│   │\n│   ├── store\u002F\n│   │   ├── auth\u002F\n│   │   │   └── auth.store.js\n│   │   ├── dashboard\u002F\n│   │   │   └── dashboard.store.js\n│   │   └── shared\u002F\n│   │       └── ui.store.js\n│   │\n│   ├── router\u002F\n│   │   ├── auth.routes.js\n│   │   ├── dashboard.routes.js\n│   │   └── index.js\n│   │\n│   ├── ...\n├── ...\n",[61,24423,24424,24428,24435,24444,24453,24465,24478,24491,24502,24515,24528,24539,24551,24563,24570,24579,24589,24602,24615,24625,24638,24649,24660,24666,24675,24685,24698,24708,24721,24731,24742,24748,24757,24768,24779,24790,24796,24805],{"__ignoreMap":79},[83,24425,24426],{"class":85,"line":86},[83,24427,24051],{"class":23718},[83,24429,24430,24432],{"class":85,"line":103},[83,24431,24056],{"class":23718},[83,24433,24434],{"class":237}," src\u002F\n",[83,24436,24437,24439,24441],{"class":85,"line":116},[83,24438,24097],{"class":23718},[83,24440,24100],{"class":237},[83,24442,24443],{"class":237}," assets\u002F\n",[83,24445,24446,24448,24450],{"class":85,"line":124},[83,24447,24097],{"class":23718},[83,24449,24100],{"class":237},[83,24451,24452],{"class":237}," components\u002F\n",[83,24454,24455,24457,24460,24462],{"class":85,"line":144},[83,24456,24097],{"class":23718},[83,24458,24459],{"class":237},"   │",[83,24461,24100],{"class":237},[83,24463,24464],{"class":237}," auth\u002F\n",[83,24466,24467,24469,24471,24473,24475],{"class":85,"line":157},[83,24468,24097],{"class":23718},[83,24470,24459],{"class":237},[83,24472,24459],{"class":237},[83,24474,24100],{"class":237},[83,24476,24477],{"class":237}," LoginForm.vue\n",[83,24479,24480,24482,24484,24486,24488],{"class":85,"line":164},[83,24481,24097],{"class":23718},[83,24483,24459],{"class":237},[83,24485,24459],{"class":237},[83,24487,24173],{"class":237},[83,24489,24490],{"class":237}," RegisterForm.vue\n",[83,24492,24493,24495,24497,24499],{"class":85,"line":190},[83,24494,24097],{"class":23718},[83,24496,24459],{"class":237},[83,24498,24100],{"class":237},[83,24500,24501],{"class":237}," dashboard\u002F\n",[83,24503,24504,24506,24508,24510,24512],{"class":85,"line":205},[83,24505,24097],{"class":23718},[83,24507,24459],{"class":237},[83,24509,24459],{"class":237},[83,24511,24100],{"class":237},[83,24513,24514],{"class":237}," StatsCard.vue\n",[83,24516,24517,24519,24521,24523,24525],{"class":85,"line":210},[83,24518,24097],{"class":23718},[83,24520,24459],{"class":237},[83,24522,24459],{"class":237},[83,24524,24173],{"class":237},[83,24526,24527],{"class":237}," ChartWidget.vue\n",[83,24529,24530,24532,24534,24536],{"class":85,"line":222},[83,24531,24097],{"class":23718},[83,24533,24459],{"class":237},[83,24535,24173],{"class":237},[83,24537,24538],{"class":237}," shared\u002F\n",[83,24540,24541,24543,24545,24548],{"class":85,"line":266},[83,24542,24097],{"class":23718},[83,24544,24459],{"class":237},[83,24546,24547],{"class":237},"       ├──",[83,24549,24550],{"class":237}," BaseButton.vue\n",[83,24552,24553,24555,24557,24560],{"class":85,"line":277},[83,24554,24097],{"class":23718},[83,24556,24459],{"class":237},[83,24558,24559],{"class":237},"       └──",[83,24561,24562],{"class":237}," BaseModal.vue\n",[83,24564,24565,24567],{"class":85,"line":282},[83,24566,24097],{"class":23718},[83,24568,24569],{"class":237},"   │\n",[83,24571,24572,24574,24576],{"class":85,"line":306},[83,24573,24097],{"class":23718},[83,24575,24100],{"class":237},[83,24577,24578],{"class":237}," views\u002F\n",[83,24580,24581,24583,24585,24587],{"class":85,"line":344},[83,24582,24097],{"class":23718},[83,24584,24459],{"class":237},[83,24586,24100],{"class":237},[83,24588,24464],{"class":237},[83,24590,24591,24593,24595,24597,24599],{"class":85,"line":379},[83,24592,24097],{"class":23718},[83,24594,24459],{"class":237},[83,24596,24459],{"class":237},[83,24598,24100],{"class":237},[83,24600,24601],{"class":237}," LoginView.vue\n",[83,24603,24604,24606,24608,24610,24612],{"class":85,"line":408},[83,24605,24097],{"class":23718},[83,24607,24459],{"class":237},[83,24609,24459],{"class":237},[83,24611,24173],{"class":237},[83,24613,24614],{"class":237}," RegisterView.vue\n",[83,24616,24617,24619,24621,24623],{"class":85,"line":443},[83,24618,24097],{"class":23718},[83,24620,24459],{"class":237},[83,24622,24100],{"class":237},[83,24624,24501],{"class":237},[83,24626,24627,24629,24631,24633,24635],{"class":85,"line":464},[83,24628,24097],{"class":23718},[83,24630,24459],{"class":237},[83,24632,24459],{"class":237},[83,24634,24173],{"class":237},[83,24636,24637],{"class":237}," DashboardView.vue\n",[83,24639,24640,24642,24644,24646],{"class":85,"line":469},[83,24641,24097],{"class":23718},[83,24643,24459],{"class":237},[83,24645,24173],{"class":237},[83,24647,24648],{"class":237}," home\u002F\n",[83,24650,24651,24653,24655,24657],{"class":85,"line":480},[83,24652,24097],{"class":23718},[83,24654,24459],{"class":237},[83,24656,24559],{"class":237},[83,24658,24659],{"class":237}," HomeView.vue\n",[83,24661,24662,24664],{"class":85,"line":490},[83,24663,24097],{"class":23718},[83,24665,24569],{"class":237},[83,24667,24668,24670,24672],{"class":85,"line":511},[83,24669,24097],{"class":23718},[83,24671,24100],{"class":237},[83,24673,24674],{"class":237}," store\u002F\n",[83,24676,24677,24679,24681,24683],{"class":85,"line":528},[83,24678,24097],{"class":23718},[83,24680,24459],{"class":237},[83,24682,24100],{"class":237},[83,24684,24464],{"class":237},[83,24686,24687,24689,24691,24693,24695],{"class":85,"line":545},[83,24688,24097],{"class":23718},[83,24690,24459],{"class":237},[83,24692,24459],{"class":237},[83,24694,24173],{"class":237},[83,24696,24697],{"class":237}," auth.store.js\n",[83,24699,24700,24702,24704,24706],{"class":85,"line":560},[83,24701,24097],{"class":23718},[83,24703,24459],{"class":237},[83,24705,24100],{"class":237},[83,24707,24501],{"class":237},[83,24709,24710,24712,24714,24716,24718],{"class":85,"line":566},[83,24711,24097],{"class":23718},[83,24713,24459],{"class":237},[83,24715,24459],{"class":237},[83,24717,24173],{"class":237},[83,24719,24720],{"class":237}," dashboard.store.js\n",[83,24722,24723,24725,24727,24729],{"class":85,"line":571},[83,24724,24097],{"class":23718},[83,24726,24459],{"class":237},[83,24728,24173],{"class":237},[83,24730,24538],{"class":237},[83,24732,24733,24735,24737,24739],{"class":85,"line":601},[83,24734,24097],{"class":23718},[83,24736,24459],{"class":237},[83,24738,24559],{"class":237},[83,24740,24741],{"class":237}," ui.store.js\n",[83,24743,24744,24746],{"class":85,"line":627},[83,24745,24097],{"class":23718},[83,24747,24569],{"class":237},[83,24749,24750,24752,24754],{"class":85,"line":632},[83,24751,24097],{"class":23718},[83,24753,24100],{"class":237},[83,24755,24756],{"class":237}," router\u002F\n",[83,24758,24759,24761,24763,24765],{"class":85,"line":662},[83,24760,24097],{"class":23718},[83,24762,24459],{"class":237},[83,24764,24100],{"class":237},[83,24766,24767],{"class":237}," auth.routes.js\n",[83,24769,24770,24772,24774,24776],{"class":85,"line":667},[83,24771,24097],{"class":23718},[83,24773,24459],{"class":237},[83,24775,24100],{"class":237},[83,24777,24778],{"class":237}," dashboard.routes.js\n",[83,24780,24781,24783,24785,24787],{"class":85,"line":719},[83,24782,24097],{"class":23718},[83,24784,24459],{"class":237},[83,24786,24173],{"class":237},[83,24788,24789],{"class":237}," index.js\n",[83,24791,24792,24794],{"class":85,"line":724},[83,24793,24097],{"class":23718},[83,24795,24569],{"class":237},[83,24797,24798,24800,24802],{"class":85,"line":788},[83,24799,24097],{"class":23718},[83,24801,24100],{"class":237},[83,24803,24804],{"class":237}," ...\n",[83,24806,24807,24809],{"class":85,"line":822},[83,24808,24056],{"class":23718},[83,24810,24804],{"class":237},[12,24812,24813,24816,24817,24820],{},[40,24814,24815],{},"You can use an approach similar to this"," in small or medium apps, with few people working, where you want a bit more order without overcomplicating things and without changing too much the original structure proposed by Vue. ",[40,24818,24819],{},"The limitation"," is that as the app grows, it can become difficult to manage dependencies between modules and keep the code organized, because everything is scattered across multiple folders.",[1030,24822,24823],{},[1033,24824,24825],{},"In other cases, you can opt for a structure based on features or modules, where each one has its own folder that contains components, views, and related logic. For example:",[74,24827,24829],{"className":23709,"code":24828,"language":23711,"meta":79,"style":79},"my-vue-app\u002F\n├── src\u002F\n│   ├── modules\u002F\n│   │   ├── auth\u002F                     # If the module is small, you can omit the division into folders\n│   │   │   ├── components\u002F\n│   │   │   │   └── LoginForm.vue\n│   │   │   ├── views\u002F\n│   │   │   │   └── LoginView.vue\n│   │   │   ├── store\u002F\n│   │   │   │   └── auth.store.js\n│   │   │   ├── router\u002F\n│   │   │   │   └── auth.routes.js\n│   │   │   └── index.js\n│   │   │\n│   │   ├── dashboard\u002F\n│   │   │   ├── components\u002F\n│   │   │   ├── views\u002F\n│   │   │   ├── store\u002F\n│   │   │   ├── router\u002F\n│   │   │   └── index.js\n│   │   │\n│   │   └── users\u002F\n│   │       ├── components\u002F\n│   │       ├── views\u002F\n│   │       ├── store\u002F\n│   │       ├── router\u002F\n│   │       └── index.js\n│   │\n│   ├── shared\u002F\n│   │   ├── components\u002F\n│   │   │   ├── BaseButton.vue\n│   │   │   └── BaseModal.vue\n│   │   ├── composables\u002F\n│   │   │   └── useFetch.js\n│   │   ├── store\u002F\n│   │   │   └── ui.store.js\n│   │   ├── utils\u002F\n│   │   │   └── formatDate.js\n│   │   └── constants\u002F\n│   │       └── roles.js\n│   │\n│   ├── router\u002F\n│   │   └── index.js                # Main router file that imports routes from modules\n│   │                               # (guards go here)\n│   ├── ...\n├── ...\n",[61,24830,24831,24835,24841,24850,24864,24876,24890,24902,24916,24928,24942,24954,24968,24980,24988,24998,25010,25022,25034,25046,25058,25066,25077,25087,25097,25107,25117,25127,25133,25141,25151,25163,25175,25186,25199,25209,25221,25232,25245,25257,25269,25276,25285,25300,25310,25319],{"__ignoreMap":79},[83,24832,24833],{"class":85,"line":86},[83,24834,24051],{"class":23718},[83,24836,24837,24839],{"class":85,"line":103},[83,24838,24056],{"class":23718},[83,24840,24434],{"class":237},[83,24842,24843,24845,24847],{"class":85,"line":116},[83,24844,24097],{"class":23718},[83,24846,24100],{"class":237},[83,24848,24849],{"class":237}," modules\u002F\n",[83,24851,24852,24854,24856,24858,24861],{"class":85,"line":124},[83,24853,24097],{"class":23718},[83,24855,24459],{"class":237},[83,24857,24100],{"class":237},[83,24859,24860],{"class":237}," auth\u002F",[83,24862,24863],{"class":858},"                     # If the module is small, you can omit the division into folders\n",[83,24865,24866,24868,24870,24872,24874],{"class":85,"line":144},[83,24867,24097],{"class":23718},[83,24869,24459],{"class":237},[83,24871,24459],{"class":237},[83,24873,24100],{"class":237},[83,24875,24452],{"class":237},[83,24877,24878,24880,24882,24884,24886,24888],{"class":85,"line":157},[83,24879,24097],{"class":23718},[83,24881,24459],{"class":237},[83,24883,24459],{"class":237},[83,24885,24459],{"class":237},[83,24887,24173],{"class":237},[83,24889,24477],{"class":237},[83,24891,24892,24894,24896,24898,24900],{"class":85,"line":164},[83,24893,24097],{"class":23718},[83,24895,24459],{"class":237},[83,24897,24459],{"class":237},[83,24899,24100],{"class":237},[83,24901,24578],{"class":237},[83,24903,24904,24906,24908,24910,24912,24914],{"class":85,"line":190},[83,24905,24097],{"class":23718},[83,24907,24459],{"class":237},[83,24909,24459],{"class":237},[83,24911,24459],{"class":237},[83,24913,24173],{"class":237},[83,24915,24601],{"class":237},[83,24917,24918,24920,24922,24924,24926],{"class":85,"line":205},[83,24919,24097],{"class":23718},[83,24921,24459],{"class":237},[83,24923,24459],{"class":237},[83,24925,24100],{"class":237},[83,24927,24674],{"class":237},[83,24929,24930,24932,24934,24936,24938,24940],{"class":85,"line":210},[83,24931,24097],{"class":23718},[83,24933,24459],{"class":237},[83,24935,24459],{"class":237},[83,24937,24459],{"class":237},[83,24939,24173],{"class":237},[83,24941,24697],{"class":237},[83,24943,24944,24946,24948,24950,24952],{"class":85,"line":222},[83,24945,24097],{"class":23718},[83,24947,24459],{"class":237},[83,24949,24459],{"class":237},[83,24951,24100],{"class":237},[83,24953,24756],{"class":237},[83,24955,24956,24958,24960,24962,24964,24966],{"class":85,"line":266},[83,24957,24097],{"class":23718},[83,24959,24459],{"class":237},[83,24961,24459],{"class":237},[83,24963,24459],{"class":237},[83,24965,24173],{"class":237},[83,24967,24767],{"class":237},[83,24969,24970,24972,24974,24976,24978],{"class":85,"line":277},[83,24971,24097],{"class":23718},[83,24973,24459],{"class":237},[83,24975,24459],{"class":237},[83,24977,24173],{"class":237},[83,24979,24789],{"class":237},[83,24981,24982,24984,24986],{"class":85,"line":282},[83,24983,24097],{"class":23718},[83,24985,24459],{"class":237},[83,24987,24569],{"class":237},[83,24989,24990,24992,24994,24996],{"class":85,"line":306},[83,24991,24097],{"class":23718},[83,24993,24459],{"class":237},[83,24995,24100],{"class":237},[83,24997,24501],{"class":237},[83,24999,25000,25002,25004,25006,25008],{"class":85,"line":344},[83,25001,24097],{"class":23718},[83,25003,24459],{"class":237},[83,25005,24459],{"class":237},[83,25007,24100],{"class":237},[83,25009,24452],{"class":237},[83,25011,25012,25014,25016,25018,25020],{"class":85,"line":379},[83,25013,24097],{"class":23718},[83,25015,24459],{"class":237},[83,25017,24459],{"class":237},[83,25019,24100],{"class":237},[83,25021,24578],{"class":237},[83,25023,25024,25026,25028,25030,25032],{"class":85,"line":408},[83,25025,24097],{"class":23718},[83,25027,24459],{"class":237},[83,25029,24459],{"class":237},[83,25031,24100],{"class":237},[83,25033,24674],{"class":237},[83,25035,25036,25038,25040,25042,25044],{"class":85,"line":443},[83,25037,24097],{"class":23718},[83,25039,24459],{"class":237},[83,25041,24459],{"class":237},[83,25043,24100],{"class":237},[83,25045,24756],{"class":237},[83,25047,25048,25050,25052,25054,25056],{"class":85,"line":464},[83,25049,24097],{"class":23718},[83,25051,24459],{"class":237},[83,25053,24459],{"class":237},[83,25055,24173],{"class":237},[83,25057,24789],{"class":237},[83,25059,25060,25062,25064],{"class":85,"line":469},[83,25061,24097],{"class":23718},[83,25063,24459],{"class":237},[83,25065,24569],{"class":237},[83,25067,25068,25070,25072,25074],{"class":85,"line":480},[83,25069,24097],{"class":23718},[83,25071,24459],{"class":237},[83,25073,24173],{"class":237},[83,25075,25076],{"class":237}," users\u002F\n",[83,25078,25079,25081,25083,25085],{"class":85,"line":490},[83,25080,24097],{"class":23718},[83,25082,24459],{"class":237},[83,25084,24547],{"class":237},[83,25086,24452],{"class":237},[83,25088,25089,25091,25093,25095],{"class":85,"line":511},[83,25090,24097],{"class":23718},[83,25092,24459],{"class":237},[83,25094,24547],{"class":237},[83,25096,24578],{"class":237},[83,25098,25099,25101,25103,25105],{"class":85,"line":528},[83,25100,24097],{"class":23718},[83,25102,24459],{"class":237},[83,25104,24547],{"class":237},[83,25106,24674],{"class":237},[83,25108,25109,25111,25113,25115],{"class":85,"line":545},[83,25110,24097],{"class":23718},[83,25112,24459],{"class":237},[83,25114,24547],{"class":237},[83,25116,24756],{"class":237},[83,25118,25119,25121,25123,25125],{"class":85,"line":560},[83,25120,24097],{"class":23718},[83,25122,24459],{"class":237},[83,25124,24559],{"class":237},[83,25126,24789],{"class":237},[83,25128,25129,25131],{"class":85,"line":566},[83,25130,24097],{"class":23718},[83,25132,24569],{"class":237},[83,25134,25135,25137,25139],{"class":85,"line":571},[83,25136,24097],{"class":23718},[83,25138,24100],{"class":237},[83,25140,24538],{"class":237},[83,25142,25143,25145,25147,25149],{"class":85,"line":601},[83,25144,24097],{"class":23718},[83,25146,24459],{"class":237},[83,25148,24100],{"class":237},[83,25150,24452],{"class":237},[83,25152,25153,25155,25157,25159,25161],{"class":85,"line":627},[83,25154,24097],{"class":23718},[83,25156,24459],{"class":237},[83,25158,24459],{"class":237},[83,25160,24100],{"class":237},[83,25162,24550],{"class":237},[83,25164,25165,25167,25169,25171,25173],{"class":85,"line":632},[83,25166,24097],{"class":23718},[83,25168,24459],{"class":237},[83,25170,24459],{"class":237},[83,25172,24173],{"class":237},[83,25174,24562],{"class":237},[83,25176,25177,25179,25181,25183],{"class":85,"line":662},[83,25178,24097],{"class":23718},[83,25180,24459],{"class":237},[83,25182,24100],{"class":237},[83,25184,25185],{"class":237}," composables\u002F\n",[83,25187,25188,25190,25192,25194,25196],{"class":85,"line":667},[83,25189,24097],{"class":23718},[83,25191,24459],{"class":237},[83,25193,24459],{"class":237},[83,25195,24173],{"class":237},[83,25197,25198],{"class":237}," useFetch.js\n",[83,25200,25201,25203,25205,25207],{"class":85,"line":719},[83,25202,24097],{"class":23718},[83,25204,24459],{"class":237},[83,25206,24100],{"class":237},[83,25208,24674],{"class":237},[83,25210,25211,25213,25215,25217,25219],{"class":85,"line":724},[83,25212,24097],{"class":23718},[83,25214,24459],{"class":237},[83,25216,24459],{"class":237},[83,25218,24173],{"class":237},[83,25220,24741],{"class":237},[83,25222,25223,25225,25227,25229],{"class":85,"line":788},[83,25224,24097],{"class":23718},[83,25226,24459],{"class":237},[83,25228,24100],{"class":237},[83,25230,25231],{"class":237}," utils\u002F\n",[83,25233,25234,25236,25238,25240,25242],{"class":85,"line":822},[83,25235,24097],{"class":23718},[83,25237,24459],{"class":237},[83,25239,24459],{"class":237},[83,25241,24173],{"class":237},[83,25243,25244],{"class":237}," formatDate.js\n",[83,25246,25248,25250,25252,25254],{"class":85,"line":25247},39,[83,25249,24097],{"class":23718},[83,25251,24459],{"class":237},[83,25253,24173],{"class":237},[83,25255,25256],{"class":237}," constants\u002F\n",[83,25258,25260,25262,25264,25266],{"class":85,"line":25259},40,[83,25261,24097],{"class":23718},[83,25263,24459],{"class":237},[83,25265,24559],{"class":237},[83,25267,25268],{"class":237}," roles.js\n",[83,25270,25272,25274],{"class":85,"line":25271},41,[83,25273,24097],{"class":23718},[83,25275,24569],{"class":237},[83,25277,25279,25281,25283],{"class":85,"line":25278},42,[83,25280,24097],{"class":23718},[83,25282,24100],{"class":237},[83,25284,24756],{"class":237},[83,25286,25288,25290,25292,25294,25297],{"class":85,"line":25287},43,[83,25289,24097],{"class":23718},[83,25291,24459],{"class":237},[83,25293,24173],{"class":237},[83,25295,25296],{"class":237}," index.js",[83,25298,25299],{"class":858},"                # Main router file that imports routes from modules\n",[83,25301,25303,25305,25307],{"class":85,"line":25302},44,[83,25304,24097],{"class":23718},[83,25306,24459],{"class":237},[83,25308,25309],{"class":858},"                               # (guards go here)\n",[83,25311,25313,25315,25317],{"class":85,"line":25312},45,[83,25314,24097],{"class":23718},[83,25316,24100],{"class":237},[83,25318,24804],{"class":237},[83,25320,25322,25324],{"class":85,"line":25321},46,[83,25323,24056],{"class":23718},[83,25325,24804],{"class":237},[12,25327,25328,25329,25332],{},"Each module or feature concentrates ",[40,25330,25331],{},"everything it needs in one place",", which simplifies navigation and facilitates code maintenance. This approach is especially beneficial in large or complex applications.",[12,25334,7799,25335,25338],{},[61,25336,25337],{},"shared\u002F"," folder is useful for storing components, composables, utilities, and constants that are reusable throughout the application (just be careful not to overload it).",[12,25340,25341,25342,25345],{},"The basis of this approach is to divide the application into independent modules within ",[61,25343,25344],{},"\u002Fsrc\u002Fmodules",", each with its own internal structure.",[1734,25347,25348],{},[12,25349,25350,25351,25356],{},"Ultimately, the choice depends on the size and complexity of your project, as well as the ",[40,25352,25353],{},[1559,25354,25355],{},"preferences of your team",", so there's no single correct way to do it. These are just examples to inspire you.",[29,25358],{},[32,25360,25362],{"id":25361},"understanding-how-the-vue-app-is-mounted","Understanding how the Vue app is mounted",[12,25364,25365,25366,25369,25370,25372],{},"The entry point of the Vue application itself is the ",[61,25367,25368],{},"src\u002Fmain.js"," file, this is where it's initialized, plugins are configured and it's mounted on the DOM. If we look at the ",[61,25371,25368],{}," file:",[74,25374,25378],{"className":25375,"code":25376,"language":25377,"meta":79,"style":79},"language-javascript shiki shiki-themes vitesse-light vitesse-dark","import '.\u002Fassets\u002Fmain.css';\n\nimport { createApp } from 'vue';\nimport { createPinia } from 'pinia';\n\nimport App from '.\u002FApp.vue';\nimport router from '.\u002Frouter';\n\nconst app = createApp(App);\n\napp.use(createPinia());\napp.use(router);\n\napp.mount('#app');\n","javascript",[61,25379,25380,25394,25398,25423,25445,25449,25467,25485,25489,25510,25514,25532,25547,25551],{"__ignoreMap":79},[83,25381,25382,25384,25386,25389,25391],{"class":85,"line":86},[83,25383,90],{"class":89},[83,25385,3453],{"class":233},[83,25387,25388],{"class":237},".\u002Fassets\u002Fmain.css",[83,25390,3459],{"class":233},[83,25392,25393],{"class":132},";\n",[83,25395,25396],{"class":85,"line":103},[83,25397,161],{"emptyLinePlaceholder":160},[83,25399,25400,25402,25405,25408,25411,25414,25416,25419,25421],{"class":85,"line":116},[83,25401,90],{"class":89},[83,25403,25404],{"class":132}," {",[83,25406,25407],{"class":811}," createApp",[83,25409,25410],{"class":132}," }",[83,25412,25413],{"class":89}," from",[83,25415,3453],{"class":233},[83,25417,25418],{"class":237},"vue",[83,25420,3459],{"class":233},[83,25422,25393],{"class":132},[83,25424,25425,25427,25429,25432,25434,25436,25438,25441,25443],{"class":85,"line":124},[83,25426,90],{"class":89},[83,25428,25404],{"class":132},[83,25430,25431],{"class":811}," createPinia",[83,25433,25410],{"class":132},[83,25435,25413],{"class":89},[83,25437,3453],{"class":233},[83,25439,25440],{"class":237},"pinia",[83,25442,3459],{"class":233},[83,25444,25393],{"class":132},[83,25446,25447],{"class":85,"line":144},[83,25448,161],{"emptyLinePlaceholder":160},[83,25450,25451,25453,25456,25458,25460,25463,25465],{"class":85,"line":157},[83,25452,90],{"class":89},[83,25454,25455],{"class":811}," App",[83,25457,25413],{"class":89},[83,25459,3453],{"class":233},[83,25461,25462],{"class":237},".\u002FApp.vue",[83,25464,3459],{"class":233},[83,25466,25393],{"class":132},[83,25468,25469,25471,25474,25476,25478,25481,25483],{"class":85,"line":164},[83,25470,90],{"class":89},[83,25472,25473],{"class":811}," router",[83,25475,25413],{"class":89},[83,25477,3453],{"class":233},[83,25479,25480],{"class":237},".\u002Frouter",[83,25482,3459],{"class":233},[83,25484,25393],{"class":132},[83,25486,25487],{"class":85,"line":190},[83,25488,161],{"emptyLinePlaceholder":160},[83,25490,25491,25494,25497,25500,25502,25504,25507],{"class":85,"line":205},[83,25492,25493],{"class":486},"const",[83,25495,25496],{"class":811}," app",[83,25498,25499],{"class":132}," =",[83,25501,25407],{"class":23718},[83,25503,180],{"class":132},[83,25505,25506],{"class":811},"App",[83,25508,25509],{"class":132},");\n",[83,25511,25512],{"class":85,"line":210},[83,25513,161],{"emptyLinePlaceholder":160},[83,25515,25516,25519,25521,25524,25526,25529],{"class":85,"line":222},[83,25517,25518],{"class":811},"app",[83,25520,133],{"class":132},[83,25522,25523],{"class":23718},"use",[83,25525,180],{"class":132},[83,25527,25528],{"class":23718},"createPinia",[83,25530,25531],{"class":132},"());\n",[83,25533,25534,25536,25538,25540,25542,25545],{"class":85,"line":266},[83,25535,25518],{"class":811},[83,25537,133],{"class":132},[83,25539,25523],{"class":23718},[83,25541,180],{"class":132},[83,25543,25544],{"class":811},"router",[83,25546,25509],{"class":132},[83,25548,25549],{"class":85,"line":277},[83,25550,161],{"emptyLinePlaceholder":160},[83,25552,25553,25555,25557,25560,25562,25564,25567,25569],{"class":85,"line":282},[83,25554,25518],{"class":811},[83,25556,133],{"class":132},[83,25558,25559],{"class":23718},"mount",[83,25561,180],{"class":132},[83,25563,3459],{"class":233},[83,25565,25566],{"class":237},"#app",[83,25568,3459],{"class":233},[83,25570,25509],{"class":132},[12,25572,25573],{},"Here's what we're doing:",[1077,25575,25576,25583,25592,25597,25603,25613,25620,25626],{},[1033,25577,25578,25579,25582],{},"We import the global styles from ",[61,25580,25581],{},"main.css",". This file contains any styles you want to apply globally.",[1033,25584,25585,25586,1626,25589,25591],{},"We import the ",[61,25587,25588],{},"createApp",[61,25590,25528],{}," functions to create new instances of Vue and Pinia.",[1033,25593,25594,25595,133],{},"We import the root component ",[61,25596,24394],{},[1033,25598,25599,25600,133],{},"We import the route configuration from ",[61,25601,25602],{},"src\u002Frouter\u002Findex.js",[1033,25604,25605,25606,25609,25610,25612],{},"We create the application instance with ",[61,25607,25608],{},"createApp(App)",", passing the root component ",[61,25611,25506],{}," as an argument, indicating that this will be the starting point of our Vue application, basically we're telling Vue: \"Here's the main component, you'll build the entire application from it\".",[1033,25614,25615,25616,25619],{},"We use ",[61,25617,25618],{},"app.use(createPinia())"," to register the Pinia instance, enabling global state management in our application.",[1033,25621,25615,25622,25625],{},[61,25623,25624],{},"app.use(router)"," to register the Vue Router instance and enable navigation between views.",[1033,25627,25628,25629,25631,25632,133],{},"Finally, we mount the Vue application on the DOM element with the id ",[61,25630,25518],{}," using ",[61,25633,25634],{},"app.mount('#app')",[12,25636,25637,25638,25641],{},"Now, open the ",[61,25639,25640],{},"index.html"," file located at the root of the project:",[74,25643,25647],{"className":25644,"code":25645,"language":25646,"meta":79,"style":79},"language-html shiki shiki-themes vitesse-light vitesse-dark","\u003C!DOCTYPE html>\n\u003Chtml lang=\"\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" \u002F>\n    \u003Clink rel=\"icon\" href=\"\u002Ffavicon.ico\" \u002F>\n    \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \u002F>\n    \u003Ctitle>Vite App\u003C\u002Ftitle>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Cdiv id=\"app\">\u003C\u002Fdiv>\n    \u003Cscript type=\"module\" src=\"\u002Fsrc\u002Fmain.js\">\u003C\u002Fscript>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html",[61,25648,25649,25663,25679,25688,25711,25744,25776,25795,25804,25813,25838,25875,25883],{"__ignoreMap":79},[83,25650,25651,25654,25657,25660],{"class":85,"line":86},[83,25652,25653],{"class":132},"\u003C!",[83,25655,25656],{"class":89},"DOCTYPE",[83,25658,25659],{"class":811}," html",[83,25661,25662],{"class":132},">\n",[83,25664,25665,25667,25669,25672,25674,25677],{"class":85,"line":103},[83,25666,20213],{"class":132},[83,25668,25646],{"class":89},[83,25670,25671],{"class":811}," lang",[83,25673,216],{"class":132},[83,25675,25676],{"class":233},"\"\"",[83,25678,25662],{"class":132},[83,25680,25681,25684,25686],{"class":85,"line":116},[83,25682,25683],{"class":132},"  \u003C",[83,25685,830],{"class":89},[83,25687,25662],{"class":132},[83,25689,25690,25693,25696,25699,25701,25703,25706,25708],{"class":85,"line":124},[83,25691,25692],{"class":132},"    \u003C",[83,25694,25695],{"class":89},"meta",[83,25697,25698],{"class":811}," charset",[83,25700,216],{"class":132},[83,25702,234],{"class":233},[83,25704,25705],{"class":237},"UTF-8",[83,25707,234],{"class":233},[83,25709,25710],{"class":132}," \u002F>\n",[83,25712,25713,25715,25718,25721,25723,25725,25728,25730,25733,25735,25737,25740,25742],{"class":85,"line":144},[83,25714,25692],{"class":132},[83,25716,25717],{"class":89},"link",[83,25719,25720],{"class":811}," rel",[83,25722,216],{"class":132},[83,25724,234],{"class":233},[83,25726,25727],{"class":237},"icon",[83,25729,234],{"class":233},[83,25731,25732],{"class":811}," href",[83,25734,216],{"class":132},[83,25736,234],{"class":233},[83,25738,25739],{"class":237},"\u002Ffavicon.ico",[83,25741,234],{"class":233},[83,25743,25710],{"class":132},[83,25745,25746,25748,25750,25753,25755,25757,25760,25762,25765,25767,25769,25772,25774],{"class":85,"line":157},[83,25747,25692],{"class":132},[83,25749,25695],{"class":89},[83,25751,25752],{"class":811}," name",[83,25754,216],{"class":132},[83,25756,234],{"class":233},[83,25758,25759],{"class":237},"viewport",[83,25761,234],{"class":233},[83,25763,25764],{"class":811}," content",[83,25766,216],{"class":132},[83,25768,234],{"class":233},[83,25770,25771],{"class":237},"width=device-width, initial-scale=1.0",[83,25773,234],{"class":233},[83,25775,25710],{"class":132},[83,25777,25778,25780,25782,25785,25788,25791,25793],{"class":85,"line":164},[83,25779,25692],{"class":132},[83,25781,1204],{"class":89},[83,25783,25784],{"class":132},">",[83,25786,25787],{"class":93},"Vite App",[83,25789,25790],{"class":132},"\u003C\u002F",[83,25792,1204],{"class":89},[83,25794,25662],{"class":132},[83,25796,25797,25800,25802],{"class":85,"line":190},[83,25798,25799],{"class":132},"  \u003C\u002F",[83,25801,830],{"class":89},[83,25803,25662],{"class":132},[83,25805,25806,25808,25811],{"class":85,"line":205},[83,25807,25683],{"class":132},[83,25809,25810],{"class":89},"body",[83,25812,25662],{"class":132},[83,25814,25815,25817,25820,25823,25825,25827,25829,25831,25834,25836],{"class":85,"line":210},[83,25816,25692],{"class":132},[83,25818,25819],{"class":89},"div",[83,25821,25822],{"class":811}," id",[83,25824,216],{"class":132},[83,25826,234],{"class":233},[83,25828,25518],{"class":237},[83,25830,234],{"class":233},[83,25832,25833],{"class":132},">\u003C\u002F",[83,25835,25819],{"class":89},[83,25837,25662],{"class":132},[83,25839,25840,25842,25845,25848,25850,25852,25855,25857,25860,25862,25864,25867,25869,25871,25873],{"class":85,"line":222},[83,25841,25692],{"class":132},[83,25843,25844],{"class":89},"script",[83,25846,25847],{"class":811}," type",[83,25849,216],{"class":132},[83,25851,234],{"class":233},[83,25853,25854],{"class":237},"module",[83,25856,234],{"class":233},[83,25858,25859],{"class":811}," src",[83,25861,216],{"class":132},[83,25863,234],{"class":233},[83,25865,25866],{"class":237},"\u002Fsrc\u002Fmain.js",[83,25868,234],{"class":233},[83,25870,25833],{"class":132},[83,25872,25844],{"class":89},[83,25874,25662],{"class":132},[83,25876,25877,25879,25881],{"class":85,"line":266},[83,25878,25799],{"class":132},[83,25880,25810],{"class":89},[83,25882,25662],{"class":132},[83,25884,25885,25887,25889],{"class":85,"line":277},[83,25886,25790],{"class":132},[83,25888,25646],{"class":89},[83,25890,25662],{"class":132},[12,25892,25893,25894,25897,25898,25900,25901,25904,25905,25907],{},"Here we see that the HTML file has a ",[61,25895,25896],{},"\u003Cdiv>"," with the id ",[61,25899,25518],{},", which is where Vue will mount our application. The ",[61,25902,25903],{},"\u003Cscript>"," that follows loads our ",[61,25906,24400],{}," file, which is where we initialize everything.",[12,25909,25910,25911,25372],{},"Open the ",[61,25912,25913],{},"src\u002FApp.vue",[74,25915,25918],{"className":25916,"code":25917,"language":25418,"meta":79,"style":79},"language-vue shiki shiki-themes vitesse-light vitesse-dark","\u003Cscript setup>\nimport { RouterLink, RouterView } from 'vue-router';\nimport HelloWorld from '.\u002Fcomponents\u002FHelloWorld.vue';\n\u003C\u002Fscript>\n\n\u003Cscript setup>\nimport { RouterLink, RouterView } from 'vue-router';\nimport HelloWorld from '.\u002Fcomponents\u002FHelloWorld.vue';\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cheader>\n    \u003Cimg alt=\"Vue logo\" class=\"logo\" src=\"@\u002Fassets\u002Flogo.svg\" width=\"125\" height=\"125\" \u002F>\n\n    \u003Cdiv class=\"wrapper\">\n      \u003CHelloWorld msg=\"You did it!\" \u002F>\n\n      \u003Cnav>\n        \u003CRouterLink to=\"\u002F\">Home\u003C\u002FRouterLink>\n        \u003CRouterLink to=\"\u002Fabout\">About\u003C\u002FRouterLink>\n      \u003C\u002Fnav>\n    \u003C\u002Fdiv>\n  \u003C\u002Fheader>\n\n  \u003CRouterView \u002F>\n\u003C\u002Ftemplate>\n\n\u003Cstyle scoped>\n\u002F* Estilos CSS *\u002F\n\u003C\u002Fstyle>\n",[61,25919,25920,25931,25958,25976,25984,25988,25998,26022,26038,26046,26050,26059,26068,26134,26138,26157,26179,26183,26192,26222,26250,26259,26268,26276,26280,26289,26297,26301,26312,26317],{"__ignoreMap":79},[83,25921,25922,25924,25926,25929],{"class":85,"line":86},[83,25923,20213],{"class":132},[83,25925,25844],{"class":89},[83,25927,25928],{"class":811}," setup",[83,25930,25662],{"class":132},[83,25932,25933,25935,25937,25940,25942,25945,25947,25949,25951,25954,25956],{"class":85,"line":103},[83,25934,90],{"class":89},[83,25936,25404],{"class":132},[83,25938,25939],{"class":811}," RouterLink",[83,25941,243],{"class":132},[83,25943,25944],{"class":811}," RouterView",[83,25946,25410],{"class":132},[83,25948,25413],{"class":89},[83,25950,3453],{"class":233},[83,25952,25953],{"class":237},"vue-router",[83,25955,3459],{"class":233},[83,25957,25393],{"class":132},[83,25959,25960,25962,25965,25967,25969,25972,25974],{"class":85,"line":116},[83,25961,90],{"class":89},[83,25963,25964],{"class":811}," HelloWorld",[83,25966,25413],{"class":89},[83,25968,3453],{"class":233},[83,25970,25971],{"class":237},".\u002Fcomponents\u002FHelloWorld.vue",[83,25973,3459],{"class":233},[83,25975,25393],{"class":132},[83,25977,25978,25980,25982],{"class":85,"line":124},[83,25979,25790],{"class":132},[83,25981,25844],{"class":89},[83,25983,25662],{"class":132},[83,25985,25986],{"class":85,"line":144},[83,25987,161],{"emptyLinePlaceholder":160},[83,25989,25990,25992,25994,25996],{"class":85,"line":157},[83,25991,20213],{"class":132},[83,25993,25844],{"class":89},[83,25995,25928],{"class":811},[83,25997,25662],{"class":132},[83,25999,26000,26002,26004,26006,26008,26010,26012,26014,26016,26018,26020],{"class":85,"line":164},[83,26001,90],{"class":89},[83,26003,25404],{"class":132},[83,26005,25939],{"class":811},[83,26007,243],{"class":132},[83,26009,25944],{"class":811},[83,26011,25410],{"class":132},[83,26013,25413],{"class":89},[83,26015,3453],{"class":233},[83,26017,25953],{"class":237},[83,26019,3459],{"class":233},[83,26021,25393],{"class":132},[83,26023,26024,26026,26028,26030,26032,26034,26036],{"class":85,"line":190},[83,26025,90],{"class":89},[83,26027,25964],{"class":811},[83,26029,25413],{"class":89},[83,26031,3453],{"class":233},[83,26033,25971],{"class":237},[83,26035,3459],{"class":233},[83,26037,25393],{"class":132},[83,26039,26040,26042,26044],{"class":85,"line":205},[83,26041,25790],{"class":132},[83,26043,25844],{"class":89},[83,26045,25662],{"class":132},[83,26047,26048],{"class":85,"line":210},[83,26049,161],{"emptyLinePlaceholder":160},[83,26051,26052,26054,26057],{"class":85,"line":222},[83,26053,20213],{"class":132},[83,26055,26056],{"class":89},"template",[83,26058,25662],{"class":132},[83,26060,26061,26063,26066],{"class":85,"line":266},[83,26062,25683],{"class":132},[83,26064,26065],{"class":89},"header",[83,26067,25662],{"class":132},[83,26069,26070,26072,26074,26077,26079,26081,26084,26086,26089,26091,26093,26096,26098,26100,26102,26104,26107,26109,26112,26114,26116,26119,26121,26124,26126,26128,26130,26132],{"class":85,"line":277},[83,26071,25692],{"class":132},[83,26073,1554],{"class":89},[83,26075,26076],{"class":811}," alt",[83,26078,216],{"class":132},[83,26080,234],{"class":233},[83,26082,26083],{"class":237},"Vue logo",[83,26085,234],{"class":233},[83,26087,26088],{"class":811}," class",[83,26090,216],{"class":132},[83,26092,234],{"class":233},[83,26094,26095],{"class":237},"logo",[83,26097,234],{"class":233},[83,26099,25859],{"class":811},[83,26101,216],{"class":132},[83,26103,234],{"class":233},[83,26105,26106],{"class":237},"@\u002Fassets\u002Flogo.svg",[83,26108,234],{"class":233},[83,26110,26111],{"class":811}," width",[83,26113,216],{"class":132},[83,26115,234],{"class":233},[83,26117,26118],{"class":237},"125",[83,26120,234],{"class":233},[83,26122,26123],{"class":811}," height",[83,26125,216],{"class":132},[83,26127,234],{"class":233},[83,26129,26118],{"class":237},[83,26131,234],{"class":233},[83,26133,25710],{"class":132},[83,26135,26136],{"class":85,"line":282},[83,26137,161],{"emptyLinePlaceholder":160},[83,26139,26140,26142,26144,26146,26148,26150,26153,26155],{"class":85,"line":306},[83,26141,25692],{"class":132},[83,26143,25819],{"class":89},[83,26145,26088],{"class":811},[83,26147,216],{"class":132},[83,26149,234],{"class":233},[83,26151,26152],{"class":237},"wrapper",[83,26154,234],{"class":233},[83,26156,25662],{"class":132},[83,26158,26159,26162,26165,26168,26170,26172,26175,26177],{"class":85,"line":344},[83,26160,26161],{"class":132},"      \u003C",[83,26163,26164],{"class":89},"HelloWorld",[83,26166,26167],{"class":811}," msg",[83,26169,216],{"class":132},[83,26171,234],{"class":233},[83,26173,26174],{"class":237},"You did it!",[83,26176,234],{"class":233},[83,26178,25710],{"class":132},[83,26180,26181],{"class":85,"line":379},[83,26182,161],{"emptyLinePlaceholder":160},[83,26184,26185,26187,26190],{"class":85,"line":408},[83,26186,26161],{"class":132},[83,26188,26189],{"class":89},"nav",[83,26191,25662],{"class":132},[83,26193,26194,26197,26200,26203,26205,26207,26209,26211,26213,26216,26218,26220],{"class":85,"line":443},[83,26195,26196],{"class":132},"        \u003C",[83,26198,26199],{"class":89},"RouterLink",[83,26201,26202],{"class":811}," to",[83,26204,216],{"class":132},[83,26206,234],{"class":233},[83,26208,68],{"class":237},[83,26210,234],{"class":233},[83,26212,25784],{"class":132},[83,26214,26215],{"class":93},"Home",[83,26217,25790],{"class":132},[83,26219,26199],{"class":89},[83,26221,25662],{"class":132},[83,26223,26224,26226,26228,26230,26232,26234,26237,26239,26241,26244,26246,26248],{"class":85,"line":464},[83,26225,26196],{"class":132},[83,26227,26199],{"class":89},[83,26229,26202],{"class":811},[83,26231,216],{"class":132},[83,26233,234],{"class":233},[83,26235,26236],{"class":237},"\u002Fabout",[83,26238,234],{"class":233},[83,26240,25784],{"class":132},[83,26242,26243],{"class":93},"About",[83,26245,25790],{"class":132},[83,26247,26199],{"class":89},[83,26249,25662],{"class":132},[83,26251,26252,26255,26257],{"class":85,"line":469},[83,26253,26254],{"class":132},"      \u003C\u002F",[83,26256,26189],{"class":89},[83,26258,25662],{"class":132},[83,26260,26261,26264,26266],{"class":85,"line":480},[83,26262,26263],{"class":132},"    \u003C\u002F",[83,26265,25819],{"class":89},[83,26267,25662],{"class":132},[83,26269,26270,26272,26274],{"class":85,"line":490},[83,26271,25799],{"class":132},[83,26273,26065],{"class":89},[83,26275,25662],{"class":132},[83,26277,26278],{"class":85,"line":511},[83,26279,161],{"emptyLinePlaceholder":160},[83,26281,26282,26284,26287],{"class":85,"line":528},[83,26283,25683],{"class":132},[83,26285,26286],{"class":89},"RouterView",[83,26288,25710],{"class":132},[83,26290,26291,26293,26295],{"class":85,"line":545},[83,26292,25790],{"class":132},[83,26294,26056],{"class":89},[83,26296,25662],{"class":132},[83,26298,26299],{"class":85,"line":560},[83,26300,161],{"emptyLinePlaceholder":160},[83,26302,26303,26305,26307,26310],{"class":85,"line":566},[83,26304,20213],{"class":132},[83,26306,3817],{"class":89},[83,26308,26309],{"class":811}," scoped",[83,26311,25662],{"class":132},[83,26313,26314],{"class":85,"line":571},[83,26315,26316],{"class":858},"\u002F* Estilos CSS *\u002F\n",[83,26318,26319,26321,26323],{"class":85,"line":601},[83,26320,25790],{"class":132},[83,26322,3817],{"class":89},[83,26324,25662],{"class":132},[12,26326,26327,26328,26330,26331,26333,26334,26337],{},"Here we see that ",[61,26329,24394],{}," contains a header with a logo, a ",[61,26332,26164],{}," component, and a navigation menu with links to the routes defined. The ",[61,26335,26336],{},"\u003CRouterView \u002F>"," is where the corresponding views will be rendered based on the current route, thanks to Vue Router.",[12,26339,26340,26341,25372],{},"Let's explore the router configuration. Open the ",[61,26342,25602],{},[74,26344,26346],{"className":25375,"code":26345,"language":25377,"meta":79,"style":79},"import { createRouter, createWebHistory } from 'vue-router';\nimport HomeView from '..\u002Fviews\u002FHomeView.vue';\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes: [\n    {\n      path: '\u002F',\n      name: 'home',\n      component: HomeView,\n    },\n    {\n      path: '\u002Fabout',\n      name: 'about',\n      \u002F* This route uses lazy loading *\u002F\n      component: () => import('..\u002Fviews\u002FAboutView.vue'),\n    },\n  ],\n});\n\nexport default router;\n",[61,26347,26348,26374,26392,26396,26408,26438,26448,26453,26468,26484,26495,26500,26504,26518,26533,26538,26564,26568,26573,26578,26582],{"__ignoreMap":79},[83,26349,26350,26352,26354,26357,26359,26362,26364,26366,26368,26370,26372],{"class":85,"line":86},[83,26351,90],{"class":89},[83,26353,25404],{"class":132},[83,26355,26356],{"class":811}," createRouter",[83,26358,243],{"class":132},[83,26360,26361],{"class":811}," createWebHistory",[83,26363,25410],{"class":132},[83,26365,25413],{"class":89},[83,26367,3453],{"class":233},[83,26369,25953],{"class":237},[83,26371,3459],{"class":233},[83,26373,25393],{"class":132},[83,26375,26376,26378,26381,26383,26385,26388,26390],{"class":85,"line":103},[83,26377,90],{"class":89},[83,26379,26380],{"class":811}," HomeView",[83,26382,25413],{"class":89},[83,26384,3453],{"class":233},[83,26386,26387],{"class":237},"..\u002Fviews\u002FHomeView.vue",[83,26389,3459],{"class":233},[83,26391,25393],{"class":132},[83,26393,26394],{"class":85,"line":116},[83,26395,161],{"emptyLinePlaceholder":160},[83,26397,26398,26400,26402,26404,26406],{"class":85,"line":124},[83,26399,25493],{"class":486},[83,26401,25473],{"class":811},[83,26403,25499],{"class":132},[83,26405,26356],{"class":23718},[83,26407,3567],{"class":132},[83,26409,26410,26413,26415,26417,26419,26421,26423,26425,26427,26430,26432,26435],{"class":85,"line":144},[83,26411,26412],{"class":294},"  history",[83,26414,589],{"class":132},[83,26416,26361],{"class":23718},[83,26418,180],{"class":132},[83,26420,90],{"class":89},[83,26422,133],{"class":132},[83,26424,25695],{"class":294},[83,26426,133],{"class":132},[83,26428,26429],{"class":811},"env",[83,26431,133],{"class":132},[83,26433,26434],{"class":811},"BASE_URL",[83,26436,26437],{"class":132},"),\n",[83,26439,26440,26443,26445],{"class":85,"line":157},[83,26441,26442],{"class":294},"  routes",[83,26444,589],{"class":132},[83,26446,26447],{"class":132}," [\n",[83,26449,26450],{"class":85,"line":164},[83,26451,26452],{"class":132},"    {\n",[83,26454,26455,26458,26460,26462,26464,26466],{"class":85,"line":190},[83,26456,26457],{"class":294},"      path",[83,26459,589],{"class":132},[83,26461,3453],{"class":233},[83,26463,68],{"class":237},[83,26465,3459],{"class":233},[83,26467,3589],{"class":132},[83,26469,26470,26473,26475,26477,26480,26482],{"class":85,"line":205},[83,26471,26472],{"class":294},"      name",[83,26474,589],{"class":132},[83,26476,3453],{"class":233},[83,26478,26479],{"class":237},"home",[83,26481,3459],{"class":233},[83,26483,3589],{"class":132},[83,26485,26486,26489,26491,26493],{"class":85,"line":210},[83,26487,26488],{"class":294},"      component",[83,26490,589],{"class":132},[83,26492,26380],{"class":811},[83,26494,3589],{"class":132},[83,26496,26497],{"class":85,"line":222},[83,26498,26499],{"class":132},"    },\n",[83,26501,26502],{"class":85,"line":266},[83,26503,26452],{"class":132},[83,26505,26506,26508,26510,26512,26514,26516],{"class":85,"line":277},[83,26507,26457],{"class":294},[83,26509,589],{"class":132},[83,26511,3453],{"class":233},[83,26513,26236],{"class":237},[83,26515,3459],{"class":233},[83,26517,3589],{"class":132},[83,26519,26520,26522,26524,26526,26529,26531],{"class":85,"line":282},[83,26521,26472],{"class":294},[83,26523,589],{"class":132},[83,26525,3453],{"class":233},[83,26527,26528],{"class":237},"about",[83,26530,3459],{"class":233},[83,26532,3589],{"class":132},[83,26534,26535],{"class":85,"line":306},[83,26536,26537],{"class":858},"      \u002F* This route uses lazy loading *\u002F\n",[83,26539,26540,26542,26544,26547,26550,26553,26555,26557,26560,26562],{"class":85,"line":344},[83,26541,26488],{"class":23718},[83,26543,589],{"class":132},[83,26545,26546],{"class":132}," ()",[83,26548,26549],{"class":132}," =>",[83,26551,26552],{"class":486}," import",[83,26554,180],{"class":132},[83,26556,3459],{"class":233},[83,26558,26559],{"class":237},"..\u002Fviews\u002FAboutView.vue",[83,26561,3459],{"class":233},[83,26563,26437],{"class":132},[83,26565,26566],{"class":85,"line":379},[83,26567,26499],{"class":132},[83,26569,26570],{"class":85,"line":408},[83,26571,26572],{"class":132},"  ],\n",[83,26574,26575],{"class":85,"line":443},[83,26576,26577],{"class":132},"});\n",[83,26579,26580],{"class":85,"line":464},[83,26581,161],{"emptyLinePlaceholder":160},[83,26583,26584,26587,26590,26592],{"class":85,"line":469},[83,26585,26586],{"class":89},"export",[83,26588,26589],{"class":89}," default",[83,26591,25473],{"class":811},[83,26593,25393],{"class":132},[12,26595,26596,26597,26600,26601,26604,26605,26607,26608,26610,26611,26613,26614,26616,26617,26622],{},"Here we're importing the necessary functions from Vue Router and defining a basic route for the ",[61,26598,26599],{},"HomeView"," view and another for ",[61,26602,26603],{},"AboutView",". The ",[61,26606,68],{}," route renders ",[61,26609,26599],{},", and the ",[61,26612,26236],{}," route loads ",[61,26615,26603],{}," using lazy loading (",[19,26618,26621],{"href":26619,"target":17018,"rel":26620},"https:\u002F\u002Fmedium.com\u002F@drewcauchi\u002Flazy-loading-in-vue-js-bb32018d2c2d",[17020,17021],"lazy loading",").",[12,26624,26625],{},"Let's review the complete flow:",[1077,26627,26628,26635,26644],{},[1033,26629,7799,26630,26632,26633,133],{},[61,26631,25640],{}," file is what the browser shows us, and the first thing it does is load ",[61,26634,24400],{},[1033,26636,26637,26638,26640,26641,26643],{},"In ",[61,26639,24400],{},", the Vue application is created with ",[61,26642,24394],{}," as the root component (apart from importing styles, configuring Pinia, Vue Router and other configurations).",[1033,26645,26646,26648,26649,26651],{},[61,26647,24394],{}," defines the main structure of the application (like a main layout) and uses ",[61,26650,26336],{}," to render views based on the current route.",[12,26653,26654,26658],{},[1554,26655],{"alt":26656,"src":26657},"Flow of a Vue app","\u002Fblog\u002Fgetting-started-vue-vite\u002Fen\u002Fexplaining-vue-app.webp",[1559,26659,26656],{},[12,26661,26662,26663,26665,26666,26668],{},"This means that everything you see inside ",[61,26664,24394],{}," will always be present (like the header and navigation menu), while the main content will be displayed inside ",[61,26667,26336],{}," and will change depending on the current route, thanks to our router.",[12,26670,26671,26672,26674,26675,133],{},"Normally, in more complex applications, ",[61,26673,24394],{}," will also contain other common elements like a footer, sidebars, global modals, etc.\nAnd when needed, specific layouts are created for different application modules, for example, a layout for admin views and another for public views like login. You can explore more at ",[19,26676,26679],{"href":26677,"target":17018,"rel":26678},"https:\u002F\u002Fvueschool.io\u002Farticles\u002Fvuejs-tutorials\u002Fcomposing-layouts-with-vue-router\u002F",[17020,17021],"this Vue School resource",[29,26681],{},[12,26683,26684],{},"At this point we already have a clear idea of how a Vue 3 application with Vite is structured and mounted. You can start to explore and modify the components, views and routes to become more familiar with the framework. Now we'll continue exploring other important concepts and tools in the ecosystem.",[29,26686],{},[32,26688,26690],{"id":26689},"pinia-for-global-state-management","Pinia for global state management",[12,26692,26693],{},"Pinia helps us manage the global state of our application: data that should be accessible from any part of the application, data that we need to share between multiple components or views.",[12,26695,26696],{},"For example, when we need access to authenticated user information in different parts of the app, or if we want to manage a shopping cart that can be consulted from different components.",[12,26698,26699,26700,589],{},"Let's see a basic example. Create the file ",[61,26701,26702],{},"src\u002Fstore\u002Fauth.store.js",[74,26704,26706],{"className":25375,"code":26705,"language":25377,"meta":79,"style":79},"import { defineStore } from 'pinia';\n\nexport const useAuthStore = defineStore('auth', {\n  state: () => ({\n    user: null,\n    token: null,\n  }),\n\n  actions: {\n    login(userData, token) {\n      this.user = userData;\n      this.token = token;\n    },\n\n    logout() {\n      this.user = null;\n      this.token = null;\n    },\n  },\n});\n",[61,26707,26708,26729,26733,26761,26775,26787,26798,26803,26807,26816,26835,26852,26867,26871,26875,26885,26899,26913,26917,26922],{"__ignoreMap":79},[83,26709,26710,26712,26714,26717,26719,26721,26723,26725,26727],{"class":85,"line":86},[83,26711,90],{"class":89},[83,26713,25404],{"class":132},[83,26715,26716],{"class":811}," defineStore",[83,26718,25410],{"class":132},[83,26720,25413],{"class":89},[83,26722,3453],{"class":233},[83,26724,25440],{"class":237},[83,26726,3459],{"class":233},[83,26728,25393],{"class":132},[83,26730,26731],{"class":85,"line":103},[83,26732,161],{"emptyLinePlaceholder":160},[83,26734,26735,26737,26740,26743,26745,26747,26749,26751,26754,26756,26758],{"class":85,"line":116},[83,26736,26586],{"class":89},[83,26738,26739],{"class":486}," const",[83,26741,26742],{"class":811}," useAuthStore",[83,26744,25499],{"class":132},[83,26746,26716],{"class":23718},[83,26748,180],{"class":132},[83,26750,3459],{"class":233},[83,26752,26753],{"class":237},"auth",[83,26755,3459],{"class":233},[83,26757,243],{"class":132},[83,26759,26760],{"class":132}," {\n",[83,26762,26763,26766,26768,26770,26772],{"class":85,"line":124},[83,26764,26765],{"class":23718},"  state",[83,26767,589],{"class":132},[83,26769,26546],{"class":132},[83,26771,26549],{"class":132},[83,26773,26774],{"class":132}," ({\n",[83,26776,26777,26780,26782,26785],{"class":85,"line":144},[83,26778,26779],{"class":294},"    user",[83,26781,589],{"class":132},[83,26783,26784],{"class":486}," null",[83,26786,3589],{"class":132},[83,26788,26789,26792,26794,26796],{"class":85,"line":157},[83,26790,26791],{"class":294},"    token",[83,26793,589],{"class":132},[83,26795,26784],{"class":486},[83,26797,3589],{"class":132},[83,26799,26800],{"class":85,"line":164},[83,26801,26802],{"class":132},"  }),\n",[83,26804,26805],{"class":85,"line":190},[83,26806,161],{"emptyLinePlaceholder":160},[83,26808,26809,26812,26814],{"class":85,"line":205},[83,26810,26811],{"class":294},"  actions",[83,26813,589],{"class":132},[83,26815,26760],{"class":132},[83,26817,26818,26821,26823,26826,26828,26831,26833],{"class":85,"line":210},[83,26819,26820],{"class":23718},"    login",[83,26822,180],{"class":132},[83,26824,26825],{"class":811},"userData",[83,26827,243],{"class":132},[83,26829,26830],{"class":811}," token",[83,26832,505],{"class":132},[83,26834,26760],{"class":132},[83,26836,26837,26840,26842,26845,26847,26850],{"class":85,"line":222},[83,26838,26839],{"class":3168},"      this",[83,26841,133],{"class":132},[83,26843,26844],{"class":811},"user",[83,26846,25499],{"class":132},[83,26848,26849],{"class":811}," userData",[83,26851,25393],{"class":132},[83,26853,26854,26856,26858,26861,26863,26865],{"class":85,"line":266},[83,26855,26839],{"class":3168},[83,26857,133],{"class":132},[83,26859,26860],{"class":811},"token",[83,26862,25499],{"class":132},[83,26864,26830],{"class":811},[83,26866,25393],{"class":132},[83,26868,26869],{"class":85,"line":277},[83,26870,26499],{"class":132},[83,26872,26873],{"class":85,"line":282},[83,26874,161],{"emptyLinePlaceholder":160},[83,26876,26877,26880,26883],{"class":85,"line":306},[83,26878,26879],{"class":23718},"    logout",[83,26881,26882],{"class":132},"()",[83,26884,26760],{"class":132},[83,26886,26887,26889,26891,26893,26895,26897],{"class":85,"line":344},[83,26888,26839],{"class":3168},[83,26890,133],{"class":132},[83,26892,26844],{"class":811},[83,26894,25499],{"class":132},[83,26896,26784],{"class":486},[83,26898,25393],{"class":132},[83,26900,26901,26903,26905,26907,26909,26911],{"class":85,"line":379},[83,26902,26839],{"class":3168},[83,26904,133],{"class":132},[83,26906,26860],{"class":811},[83,26908,25499],{"class":132},[83,26910,26784],{"class":486},[83,26912,25393],{"class":132},[83,26914,26915],{"class":85,"line":408},[83,26916,26499],{"class":132},[83,26918,26919],{"class":85,"line":443},[83,26920,26921],{"class":132},"  },\n",[83,26923,26924],{"class":85,"line":464},[83,26925,26577],{"class":132},[12,26927,26928,26929,26931,26932,1626,26934,26936,26937,589],{},"Here we're defining a store called ",[61,26930,26753],{}," that has a state with the properties ",[61,26933,26844],{},[61,26935,26860],{},", and two actions to log in and log out.\nNow, let's see how to use this store in a component. Create a Vue component, for example ",[61,26938,26939],{},"src\u002Fcomponents\u002FAuth.vue",[74,26941,26943],{"className":25916,"code":26942,"language":25418,"meta":79,"style":79},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Cdiv v-if=\"authStore.user\">\n      \u003Cp>Welcome, {{ authStore.user.name }}!\u003C\u002Fp>\n      \u003Cbutton @click=\"logout\">Logout\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n    \u003Cdiv v-else>\n      \u003Cbutton @click=\"login\">Login\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n\u003Cscript setup>\nimport { useAuthStore } from '..\u002Fstore\u002Fauth.store';\nconst authStore = useAuthStore();\nconst login = () => {\n  \u002F\u002F Simulate a login\n  const userData = { name: 'John Doe', email: 'john.doe@example.com' };\n  const token = 'fake-jwt-token';\n  authStore.login(userData, token);\n};\n\nconst logout = () => {\n  authStore.logout();\n};\n\u003C\u002Fscript>\n",[61,26944,26945,26953,26961,26981,26998,27028,27036,27047,27075,27083,27091,27099,27109,27130,27144,27159,27164,27203,27220,27239,27244,27248,27263,27273,27277],{"__ignoreMap":79},[83,26946,26947,26949,26951],{"class":85,"line":86},[83,26948,20213],{"class":132},[83,26950,26056],{"class":89},[83,26952,25662],{"class":132},[83,26954,26955,26957,26959],{"class":85,"line":103},[83,26956,25683],{"class":132},[83,26958,25819],{"class":89},[83,26960,25662],{"class":132},[83,26962,26963,26965,26967,26970,26972,26974,26977,26979],{"class":85,"line":116},[83,26964,25692],{"class":132},[83,26966,25819],{"class":89},[83,26968,26969],{"class":811}," v-if",[83,26971,216],{"class":132},[83,26973,234],{"class":233},[83,26975,26976],{"class":237},"authStore.user",[83,26978,234],{"class":233},[83,26980,25662],{"class":132},[83,26982,26983,26985,26987,26989,26992,26994,26996],{"class":85,"line":124},[83,26984,26161],{"class":132},[83,26986,12],{"class":89},[83,26988,25784],{"class":132},[83,26990,26991],{"class":93},"Welcome, {{ authStore.user.name }}!",[83,26993,25790],{"class":132},[83,26995,12],{"class":89},[83,26997,25662],{"class":132},[83,26999,27000,27002,27005,27008,27010,27012,27015,27017,27019,27022,27024,27026],{"class":85,"line":144},[83,27001,26161],{"class":132},[83,27003,27004],{"class":89},"button",[83,27006,27007],{"class":811}," @click",[83,27009,216],{"class":132},[83,27011,234],{"class":233},[83,27013,27014],{"class":237},"logout",[83,27016,234],{"class":233},[83,27018,25784],{"class":132},[83,27020,27021],{"class":93},"Logout",[83,27023,25790],{"class":132},[83,27025,27004],{"class":89},[83,27027,25662],{"class":132},[83,27029,27030,27032,27034],{"class":85,"line":157},[83,27031,26263],{"class":132},[83,27033,25819],{"class":89},[83,27035,25662],{"class":132},[83,27037,27038,27040,27042,27045],{"class":85,"line":164},[83,27039,25692],{"class":132},[83,27041,25819],{"class":89},[83,27043,27044],{"class":811}," v-else",[83,27046,25662],{"class":132},[83,27048,27049,27051,27053,27055,27057,27059,27062,27064,27066,27069,27071,27073],{"class":85,"line":190},[83,27050,26161],{"class":132},[83,27052,27004],{"class":89},[83,27054,27007],{"class":811},[83,27056,216],{"class":132},[83,27058,234],{"class":233},[83,27060,27061],{"class":237},"login",[83,27063,234],{"class":233},[83,27065,25784],{"class":132},[83,27067,27068],{"class":93},"Login",[83,27070,25790],{"class":132},[83,27072,27004],{"class":89},[83,27074,25662],{"class":132},[83,27076,27077,27079,27081],{"class":85,"line":205},[83,27078,26263],{"class":132},[83,27080,25819],{"class":89},[83,27082,25662],{"class":132},[83,27084,27085,27087,27089],{"class":85,"line":210},[83,27086,25799],{"class":132},[83,27088,25819],{"class":89},[83,27090,25662],{"class":132},[83,27092,27093,27095,27097],{"class":85,"line":222},[83,27094,25790],{"class":132},[83,27096,26056],{"class":89},[83,27098,25662],{"class":132},[83,27100,27101,27103,27105,27107],{"class":85,"line":266},[83,27102,20213],{"class":132},[83,27104,25844],{"class":89},[83,27106,25928],{"class":811},[83,27108,25662],{"class":132},[83,27110,27111,27113,27115,27117,27119,27121,27123,27126,27128],{"class":85,"line":277},[83,27112,90],{"class":89},[83,27114,25404],{"class":132},[83,27116,26742],{"class":811},[83,27118,25410],{"class":132},[83,27120,25413],{"class":89},[83,27122,3453],{"class":233},[83,27124,27125],{"class":237},"..\u002Fstore\u002Fauth.store",[83,27127,3459],{"class":233},[83,27129,25393],{"class":132},[83,27131,27132,27134,27137,27139,27141],{"class":85,"line":282},[83,27133,25493],{"class":486},[83,27135,27136],{"class":811}," authStore",[83,27138,25499],{"class":132},[83,27140,26742],{"class":23718},[83,27142,27143],{"class":132},"();\n",[83,27145,27146,27148,27151,27153,27155,27157],{"class":85,"line":306},[83,27147,25493],{"class":486},[83,27149,27150],{"class":23718}," login",[83,27152,25499],{"class":132},[83,27154,26546],{"class":132},[83,27156,26549],{"class":132},[83,27158,26760],{"class":132},[83,27160,27161],{"class":85,"line":344},[83,27162,27163],{"class":858},"  \u002F\u002F Simulate a login\n",[83,27165,27166,27169,27171,27173,27175,27177,27179,27181,27184,27186,27188,27191,27193,27195,27198,27200],{"class":85,"line":379},[83,27167,27168],{"class":486},"  const",[83,27170,26849],{"class":811},[83,27172,25499],{"class":132},[83,27174,25404],{"class":132},[83,27176,25752],{"class":294},[83,27178,589],{"class":132},[83,27180,3453],{"class":233},[83,27182,27183],{"class":237},"John Doe",[83,27185,3459],{"class":233},[83,27187,243],{"class":132},[83,27189,27190],{"class":294}," email",[83,27192,589],{"class":132},[83,27194,3453],{"class":233},[83,27196,27197],{"class":237},"john.doe@example.com",[83,27199,3459],{"class":233},[83,27201,27202],{"class":132}," };\n",[83,27204,27205,27207,27209,27211,27213,27216,27218],{"class":85,"line":408},[83,27206,27168],{"class":486},[83,27208,26830],{"class":811},[83,27210,25499],{"class":132},[83,27212,3453],{"class":233},[83,27214,27215],{"class":237},"fake-jwt-token",[83,27217,3459],{"class":233},[83,27219,25393],{"class":132},[83,27221,27222,27225,27227,27229,27231,27233,27235,27237],{"class":85,"line":443},[83,27223,27224],{"class":811},"  authStore",[83,27226,133],{"class":132},[83,27228,27061],{"class":23718},[83,27230,180],{"class":132},[83,27232,26825],{"class":811},[83,27234,243],{"class":132},[83,27236,26830],{"class":811},[83,27238,25509],{"class":132},[83,27240,27241],{"class":85,"line":464},[83,27242,27243],{"class":132},"};\n",[83,27245,27246],{"class":85,"line":469},[83,27247,161],{"emptyLinePlaceholder":160},[83,27249,27250,27252,27255,27257,27259,27261],{"class":85,"line":480},[83,27251,25493],{"class":486},[83,27253,27254],{"class":23718}," logout",[83,27256,25499],{"class":132},[83,27258,26546],{"class":132},[83,27260,26549],{"class":132},[83,27262,26760],{"class":132},[83,27264,27265,27267,27269,27271],{"class":85,"line":490},[83,27266,27224],{"class":811},[83,27268,133],{"class":132},[83,27270,27014],{"class":23718},[83,27272,27143],{"class":132},[83,27274,27275],{"class":85,"line":511},[83,27276,27243],{"class":132},[83,27278,27279,27281,27283],{"class":85,"line":528},[83,27280,25790],{"class":132},[83,27282,25844],{"class":89},[83,27284,25662],{"class":132},[12,27286,27287,27288,27291,27292,27294,27295,1626,27297,27299],{},"Here we're importing the ",[61,27289,27290],{},"useAuthStore"," store and using it to access the ",[61,27293,26844],{}," state and the ",[61,27296,27061],{},[61,27298,27014],{}," actions.",[12,27301,27302],{},"Thanks to Pinia, the user state is kept consistent everywhere, and any change (like logging in or out) is automatically reflected in all components that use this store.",[12,27304,27305],{},"Some real-world use cases:",[1030,27307,27308,27314,27320],{},[1033,27309,27310,27313],{},[40,27311,27312],{},"User Authentication",": You create a store to manage the state of the authenticated user, with data like the token, name, roles, etc. You can create actions to log in, log out, and update user information.",[1033,27315,27316,27319],{},[40,27317,27318],{},"Shopping Cart",": You create a store to manage the products in the cart, with actions to add, remove, and update products. This state can be accessed from any part of the application, like the products page and the cart page.",[1033,27321,27322,27325],{},[40,27323,27324],{},"User Preferences",": You create a store to manage user preferences, like theme (light\u002Fdark), language, etc. You can create actions to update these preferences and reflect them throughout the application.",[12,27327,27328,27329,133],{},"You can explore more about Pinia in the ",[19,27330,24031],{"href":24371,"target":17018,"rel":27331},[17020,17021],[29,27333],{},[32,27335,27337],{"id":27336},"composables","Composables",[12,27339,27340],{},"Composables are reusable functions that encapsulate specific logic, with state, and can be used across different components.",[12,27342,27343,27344,27347],{},"They allow us to organize our code better, promoting reuse and separation of concerns. Normally all logic with state we would put inside a ",[61,27345,27346],{},"\u003Cscript setup>"," in a Vue component, but if that logic is something that could be useful in multiple components, we can extract it to a composable.",[12,27349,27350,27351,589],{},"Let's see a fairly basic example. Create a file called ",[61,27352,27353],{},"src\u002Fcomposables\u002FuseClipboard.js",[74,27355,27357],{"className":25375,"code":27356,"language":25377,"meta":79,"style":79},"import { ref } from 'vue';\n\nexport function useClipboard() {\n  const copied = ref(false);\n\n  const copyToClipboard = async (text) => {\n    try {\n      await navigator.clipboard.writeText(text);\n      copied.value = true;\n      setTimeout(() => {\n        copied.value = false;\n      }, 2000);\n    } catch (error) {\n      console.error('Failed to copy:', error);\n    }\n  };\n\n  return {\n    copied,\n    copyToClipboard,\n  };\n}\n",[61,27358,27359,27380,27384,27398,27415,27419,27441,27448,27472,27489,27501,27517,27527,27544,27569,27574,27579,27583,27590,27597,27604,27608],{"__ignoreMap":79},[83,27360,27361,27363,27365,27368,27370,27372,27374,27376,27378],{"class":85,"line":86},[83,27362,90],{"class":89},[83,27364,25404],{"class":132},[83,27366,27367],{"class":811}," ref",[83,27369,25410],{"class":132},[83,27371,25413],{"class":89},[83,27373,3453],{"class":233},[83,27375,25418],{"class":237},[83,27377,3459],{"class":233},[83,27379,25393],{"class":132},[83,27381,27382],{"class":85,"line":103},[83,27383,161],{"emptyLinePlaceholder":160},[83,27385,27386,27388,27391,27394,27396],{"class":85,"line":116},[83,27387,26586],{"class":89},[83,27389,27390],{"class":486}," function",[83,27392,27393],{"class":23718}," useClipboard",[83,27395,26882],{"class":132},[83,27397,26760],{"class":132},[83,27399,27400,27402,27405,27407,27409,27411,27413],{"class":85,"line":124},[83,27401,27168],{"class":486},[83,27403,27404],{"class":811}," copied",[83,27406,25499],{"class":132},[83,27408,27367],{"class":23718},[83,27410,180],{"class":132},[83,27412,5711],{"class":89},[83,27414,25509],{"class":132},[83,27416,27417],{"class":85,"line":144},[83,27418,161],{"emptyLinePlaceholder":160},[83,27420,27421,27423,27426,27428,27431,27433,27435,27437,27439],{"class":85,"line":157},[83,27422,27168],{"class":486},[83,27424,27425],{"class":23718}," copyToClipboard",[83,27427,25499],{"class":132},[83,27429,27430],{"class":486}," async",[83,27432,22732],{"class":132},[83,27434,1885],{"class":811},[83,27436,505],{"class":132},[83,27438,26549],{"class":132},[83,27440,26760],{"class":132},[83,27442,27443,27446],{"class":85,"line":164},[83,27444,27445],{"class":89},"    try",[83,27447,26760],{"class":132},[83,27449,27450,27453,27456,27458,27461,27463,27466,27468,27470],{"class":85,"line":190},[83,27451,27452],{"class":89},"      await",[83,27454,27455],{"class":811}," navigator",[83,27457,133],{"class":132},[83,27459,27460],{"class":811},"clipboard",[83,27462,133],{"class":132},[83,27464,27465],{"class":23718},"writeText",[83,27467,180],{"class":132},[83,27469,1885],{"class":811},[83,27471,25509],{"class":132},[83,27473,27474,27477,27479,27482,27484,27487],{"class":85,"line":205},[83,27475,27476],{"class":811},"      copied",[83,27478,133],{"class":132},[83,27480,27481],{"class":811},"value",[83,27483,25499],{"class":132},[83,27485,27486],{"class":89}," true",[83,27488,25393],{"class":132},[83,27490,27491,27494,27497,27499],{"class":85,"line":210},[83,27492,27493],{"class":23718},"      setTimeout",[83,27495,27496],{"class":132},"(()",[83,27498,26549],{"class":132},[83,27500,26760],{"class":132},[83,27502,27503,27506,27508,27510,27512,27515],{"class":85,"line":222},[83,27504,27505],{"class":811},"        copied",[83,27507,133],{"class":132},[83,27509,27481],{"class":811},[83,27511,25499],{"class":132},[83,27513,27514],{"class":89}," false",[83,27516,25393],{"class":132},[83,27518,27519,27522,27525],{"class":85,"line":266},[83,27520,27521],{"class":132},"      },",[83,27523,27524],{"class":183}," 2000",[83,27526,25509],{"class":132},[83,27528,27529,27532,27535,27537,27540,27542],{"class":85,"line":277},[83,27530,27531],{"class":132},"    }",[83,27533,27534],{"class":89}," catch",[83,27536,22732],{"class":132},[83,27538,27539],{"class":811},"error",[83,27541,505],{"class":132},[83,27543,26760],{"class":132},[83,27545,27546,27549,27551,27553,27555,27557,27560,27562,27564,27567],{"class":85,"line":282},[83,27547,27548],{"class":811},"      console",[83,27550,133],{"class":132},[83,27552,27539],{"class":23718},[83,27554,180],{"class":132},[83,27556,3459],{"class":233},[83,27558,27559],{"class":237},"Failed to copy:",[83,27561,3459],{"class":233},[83,27563,243],{"class":132},[83,27565,27566],{"class":811}," error",[83,27568,25509],{"class":132},[83,27570,27571],{"class":85,"line":306},[83,27572,27573],{"class":132},"    }\n",[83,27575,27576],{"class":85,"line":344},[83,27577,27578],{"class":132},"  };\n",[83,27580,27581],{"class":85,"line":379},[83,27582,161],{"emptyLinePlaceholder":160},[83,27584,27585,27588],{"class":85,"line":408},[83,27586,27587],{"class":89},"  return",[83,27589,26760],{"class":132},[83,27591,27592,27595],{"class":85,"line":443},[83,27593,27594],{"class":811},"    copied",[83,27596,3589],{"class":132},[83,27598,27599,27602],{"class":85,"line":464},[83,27600,27601],{"class":811},"    copyToClipboard",[83,27603,3589],{"class":132},[83,27605,27606],{"class":85,"line":469},[83,27607,27578],{"class":132},[83,27609,27610],{"class":85,"line":480},[83,27611,27612],{"class":132},"}\n",[12,27614,27615,27616,27619,27620,27623,27624,27627],{},"Here we're defining a composable called ",[61,27617,27618],{},"useClipboard"," that provides a function to copy text to the clipboard and a ",[40,27621,27622],{},"reactive"," state ",[61,27625,27626],{},"copied"," that indicates whether the text was copied successfully.",[12,27629,27630,27631,589],{},"When implementing it we could have something like this. Create a component called ",[61,27632,27633],{},"src\u002Fcomponents\u002FClipboardExample.vue",[74,27635,27637],{"className":25916,"code":27636,"language":25418,"meta":79,"style":79},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Cinput v-model=\"textToCopy\" placeholder=\"Type something to copy\" \u002F>\n    \u003Cbutton @click=\"copyToClipboard(textToCopy)\">Copy to Clipboard\u003C\u002Fbutton>\n    \u003Cp v-if=\"copied\">Text copied!\u003C\u002Fp>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n\u003Cscript setup>\nimport { ref } from 'vue';\nimport { useClipboard } from '..\u002Fcomposables\u002FuseClipboard';\nconst { copied, copyToClipboard } = useClipboard();\nconst textToCopy = ref('');\n\u003C\u002Fscript>\n",[61,27638,27639,27647,27655,27688,27716,27743,27751,27759,27769,27789,27810,27830,27848],{"__ignoreMap":79},[83,27640,27641,27643,27645],{"class":85,"line":86},[83,27642,20213],{"class":132},[83,27644,26056],{"class":89},[83,27646,25662],{"class":132},[83,27648,27649,27651,27653],{"class":85,"line":103},[83,27650,25683],{"class":132},[83,27652,25819],{"class":89},[83,27654,25662],{"class":132},[83,27656,27657,27659,27662,27665,27667,27669,27672,27674,27677,27679,27681,27684,27686],{"class":85,"line":116},[83,27658,25692],{"class":132},[83,27660,27661],{"class":89},"input",[83,27663,27664],{"class":811}," v-model",[83,27666,216],{"class":132},[83,27668,234],{"class":233},[83,27670,27671],{"class":237},"textToCopy",[83,27673,234],{"class":233},[83,27675,27676],{"class":811}," placeholder",[83,27678,216],{"class":132},[83,27680,234],{"class":233},[83,27682,27683],{"class":237},"Type something to copy",[83,27685,234],{"class":233},[83,27687,25710],{"class":132},[83,27689,27690,27692,27694,27696,27698,27700,27703,27705,27707,27710,27712,27714],{"class":85,"line":124},[83,27691,25692],{"class":132},[83,27693,27004],{"class":89},[83,27695,27007],{"class":811},[83,27697,216],{"class":132},[83,27699,234],{"class":233},[83,27701,27702],{"class":237},"copyToClipboard(textToCopy)",[83,27704,234],{"class":233},[83,27706,25784],{"class":132},[83,27708,27709],{"class":93},"Copy to Clipboard",[83,27711,25790],{"class":132},[83,27713,27004],{"class":89},[83,27715,25662],{"class":132},[83,27717,27718,27720,27722,27724,27726,27728,27730,27732,27734,27737,27739,27741],{"class":85,"line":144},[83,27719,25692],{"class":132},[83,27721,12],{"class":89},[83,27723,26969],{"class":811},[83,27725,216],{"class":132},[83,27727,234],{"class":233},[83,27729,27626],{"class":237},[83,27731,234],{"class":233},[83,27733,25784],{"class":132},[83,27735,27736],{"class":93},"Text copied!",[83,27738,25790],{"class":132},[83,27740,12],{"class":89},[83,27742,25662],{"class":132},[83,27744,27745,27747,27749],{"class":85,"line":157},[83,27746,25799],{"class":132},[83,27748,25819],{"class":89},[83,27750,25662],{"class":132},[83,27752,27753,27755,27757],{"class":85,"line":164},[83,27754,25790],{"class":132},[83,27756,26056],{"class":89},[83,27758,25662],{"class":132},[83,27760,27761,27763,27765,27767],{"class":85,"line":190},[83,27762,20213],{"class":132},[83,27764,25844],{"class":89},[83,27766,25928],{"class":811},[83,27768,25662],{"class":132},[83,27770,27771,27773,27775,27777,27779,27781,27783,27785,27787],{"class":85,"line":205},[83,27772,90],{"class":89},[83,27774,25404],{"class":132},[83,27776,27367],{"class":811},[83,27778,25410],{"class":132},[83,27780,25413],{"class":89},[83,27782,3453],{"class":233},[83,27784,25418],{"class":237},[83,27786,3459],{"class":233},[83,27788,25393],{"class":132},[83,27790,27791,27793,27795,27797,27799,27801,27803,27806,27808],{"class":85,"line":210},[83,27792,90],{"class":89},[83,27794,25404],{"class":132},[83,27796,27393],{"class":811},[83,27798,25410],{"class":132},[83,27800,25413],{"class":89},[83,27802,3453],{"class":233},[83,27804,27805],{"class":237},"..\u002Fcomposables\u002FuseClipboard",[83,27807,3459],{"class":233},[83,27809,25393],{"class":132},[83,27811,27812,27814,27816,27818,27820,27822,27824,27826,27828],{"class":85,"line":222},[83,27813,25493],{"class":486},[83,27815,25404],{"class":132},[83,27817,27404],{"class":811},[83,27819,243],{"class":132},[83,27821,27425],{"class":811},[83,27823,25410],{"class":132},[83,27825,25499],{"class":132},[83,27827,27393],{"class":23718},[83,27829,27143],{"class":132},[83,27831,27832,27834,27837,27839,27841,27843,27846],{"class":85,"line":266},[83,27833,25493],{"class":486},[83,27835,27836],{"class":811}," textToCopy",[83,27838,25499],{"class":132},[83,27840,27367],{"class":23718},[83,27842,180],{"class":132},[83,27844,27845],{"class":233},"''",[83,27847,25509],{"class":132},[83,27849,27850,27852,27854],{"class":85,"line":277},[83,27851,25790],{"class":132},[83,27853,25844],{"class":89},[83,27855,25662],{"class":132},[12,27857,27858,27859,27861,27862,27864],{},"And then import this component in ",[61,27860,24394],{}," and add it below the ",[61,27863,26164],{}," component to test it:",[74,27866,27868],{"className":25916,"code":27867,"language":25418,"meta":79,"style":79},"\u003Cscript setup>\nimport { RouterLink, RouterView } from 'vue-router';\nimport HelloWorld from '.\u002Fcomponents\u002FHelloWorld.vue';\nimport ClipboardExample from '.\u002Fcomponents\u002FClipboardExample.vue';\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cheader>\n    \u003Cimg alt=\"Vue logo\" class=\"logo\" src=\"@\u002Fassets\u002Flogo.svg\" width=\"125\" height=\"125\" \u002F>\n\n    \u003Cdiv class=\"wrapper\">\n      \u003CHelloWorld msg=\"You did it!\" \u002F>\n      \u003CClipboardExample \u002F>\n      \u003C!-- Aquí -->\n      \u003Cnav>\n        \u003CRouterLink to=\"\u002F\">Home\u003C\u002FRouterLink>\n        \u003CRouterLink to=\"\u002Fabout\">About\u003C\u002FRouterLink>\n      \u003C\u002Fnav>\n    \u003C\u002Fdiv>\n  \u003C\u002Fheader>\n\n  \u003CRouterView \u002F>\n\u003C\u002Ftemplate>\n",[61,27869,27870,27880,27904,27920,27938,27946,27950,27958,27966,28024,28028,28046,28064,28073,28078,28086,28112,28138,28146,28154,28162,28166,28174],{"__ignoreMap":79},[83,27871,27872,27874,27876,27878],{"class":85,"line":86},[83,27873,20213],{"class":132},[83,27875,25844],{"class":89},[83,27877,25928],{"class":811},[83,27879,25662],{"class":132},[83,27881,27882,27884,27886,27888,27890,27892,27894,27896,27898,27900,27902],{"class":85,"line":103},[83,27883,90],{"class":89},[83,27885,25404],{"class":132},[83,27887,25939],{"class":811},[83,27889,243],{"class":132},[83,27891,25944],{"class":811},[83,27893,25410],{"class":132},[83,27895,25413],{"class":89},[83,27897,3453],{"class":233},[83,27899,25953],{"class":237},[83,27901,3459],{"class":233},[83,27903,25393],{"class":132},[83,27905,27906,27908,27910,27912,27914,27916,27918],{"class":85,"line":116},[83,27907,90],{"class":89},[83,27909,25964],{"class":811},[83,27911,25413],{"class":89},[83,27913,3453],{"class":233},[83,27915,25971],{"class":237},[83,27917,3459],{"class":233},[83,27919,25393],{"class":132},[83,27921,27922,27924,27927,27929,27931,27934,27936],{"class":85,"line":124},[83,27923,90],{"class":89},[83,27925,27926],{"class":811}," ClipboardExample",[83,27928,25413],{"class":89},[83,27930,3453],{"class":233},[83,27932,27933],{"class":237},".\u002Fcomponents\u002FClipboardExample.vue",[83,27935,3459],{"class":233},[83,27937,25393],{"class":132},[83,27939,27940,27942,27944],{"class":85,"line":144},[83,27941,25790],{"class":132},[83,27943,25844],{"class":89},[83,27945,25662],{"class":132},[83,27947,27948],{"class":85,"line":157},[83,27949,161],{"emptyLinePlaceholder":160},[83,27951,27952,27954,27956],{"class":85,"line":164},[83,27953,20213],{"class":132},[83,27955,26056],{"class":89},[83,27957,25662],{"class":132},[83,27959,27960,27962,27964],{"class":85,"line":190},[83,27961,25683],{"class":132},[83,27963,26065],{"class":89},[83,27965,25662],{"class":132},[83,27967,27968,27970,27972,27974,27976,27978,27980,27982,27984,27986,27988,27990,27992,27994,27996,27998,28000,28002,28004,28006,28008,28010,28012,28014,28016,28018,28020,28022],{"class":85,"line":205},[83,27969,25692],{"class":132},[83,27971,1554],{"class":89},[83,27973,26076],{"class":811},[83,27975,216],{"class":132},[83,27977,234],{"class":233},[83,27979,26083],{"class":237},[83,27981,234],{"class":233},[83,27983,26088],{"class":811},[83,27985,216],{"class":132},[83,27987,234],{"class":233},[83,27989,26095],{"class":237},[83,27991,234],{"class":233},[83,27993,25859],{"class":811},[83,27995,216],{"class":132},[83,27997,234],{"class":233},[83,27999,26106],{"class":237},[83,28001,234],{"class":233},[83,28003,26111],{"class":811},[83,28005,216],{"class":132},[83,28007,234],{"class":233},[83,28009,26118],{"class":237},[83,28011,234],{"class":233},[83,28013,26123],{"class":811},[83,28015,216],{"class":132},[83,28017,234],{"class":233},[83,28019,26118],{"class":237},[83,28021,234],{"class":233},[83,28023,25710],{"class":132},[83,28025,28026],{"class":85,"line":210},[83,28027,161],{"emptyLinePlaceholder":160},[83,28029,28030,28032,28034,28036,28038,28040,28042,28044],{"class":85,"line":222},[83,28031,25692],{"class":132},[83,28033,25819],{"class":89},[83,28035,26088],{"class":811},[83,28037,216],{"class":132},[83,28039,234],{"class":233},[83,28041,26152],{"class":237},[83,28043,234],{"class":233},[83,28045,25662],{"class":132},[83,28047,28048,28050,28052,28054,28056,28058,28060,28062],{"class":85,"line":266},[83,28049,26161],{"class":132},[83,28051,26164],{"class":89},[83,28053,26167],{"class":811},[83,28055,216],{"class":132},[83,28057,234],{"class":233},[83,28059,26174],{"class":237},[83,28061,234],{"class":233},[83,28063,25710],{"class":132},[83,28065,28066,28068,28071],{"class":85,"line":277},[83,28067,26161],{"class":132},[83,28069,28070],{"class":89},"ClipboardExample",[83,28072,25710],{"class":132},[83,28074,28075],{"class":85,"line":282},[83,28076,28077],{"class":858},"      \u003C!-- Aquí -->\n",[83,28079,28080,28082,28084],{"class":85,"line":306},[83,28081,26161],{"class":132},[83,28083,26189],{"class":89},[83,28085,25662],{"class":132},[83,28087,28088,28090,28092,28094,28096,28098,28100,28102,28104,28106,28108,28110],{"class":85,"line":344},[83,28089,26196],{"class":132},[83,28091,26199],{"class":89},[83,28093,26202],{"class":811},[83,28095,216],{"class":132},[83,28097,234],{"class":233},[83,28099,68],{"class":237},[83,28101,234],{"class":233},[83,28103,25784],{"class":132},[83,28105,26215],{"class":93},[83,28107,25790],{"class":132},[83,28109,26199],{"class":89},[83,28111,25662],{"class":132},[83,28113,28114,28116,28118,28120,28122,28124,28126,28128,28130,28132,28134,28136],{"class":85,"line":379},[83,28115,26196],{"class":132},[83,28117,26199],{"class":89},[83,28119,26202],{"class":811},[83,28121,216],{"class":132},[83,28123,234],{"class":233},[83,28125,26236],{"class":237},[83,28127,234],{"class":233},[83,28129,25784],{"class":132},[83,28131,26243],{"class":93},[83,28133,25790],{"class":132},[83,28135,26199],{"class":89},[83,28137,25662],{"class":132},[83,28139,28140,28142,28144],{"class":85,"line":408},[83,28141,26254],{"class":132},[83,28143,26189],{"class":89},[83,28145,25662],{"class":132},[83,28147,28148,28150,28152],{"class":85,"line":443},[83,28149,26263],{"class":132},[83,28151,25819],{"class":89},[83,28153,25662],{"class":132},[83,28155,28156,28158,28160],{"class":85,"line":464},[83,28157,25799],{"class":132},[83,28159,26065],{"class":89},[83,28161,25662],{"class":132},[83,28163,28164],{"class":85,"line":469},[83,28165,161],{"emptyLinePlaceholder":160},[83,28167,28168,28170,28172],{"class":85,"line":480},[83,28169,25683],{"class":132},[83,28171,26286],{"class":89},[83,28173,25710],{"class":132},[83,28175,28176,28178,28180],{"class":85,"line":490},[83,28177,25790],{"class":132},[83,28179,26056],{"class":89},[83,28181,25662],{"class":132},[12,28183,7799,28184,28186],{},[61,28185,27626],{}," state allows us to show a message when the text has been copied successfully.",[12,28188,28189],{},"What do we achieve with this?",[1030,28191,28192,28201,28207],{},[1033,28193,28194,28197,28198,28200],{},[40,28195,28196],{},"Reusability",": We can use ",[61,28199,27618],{}," in any component that needs clipboard copy functionality, without duplicating code.",[1033,28202,28203,28206],{},[40,28204,28205],{},"Organization",": The logic related to the clipboard is encapsulated in a single place.",[1033,28208,28209,28212],{},[40,28210,28211],{},"Maintenance",": If we need to change how we copy to the clipboard, we only have to modify the composable, not all the components that use it.",[53,28214,28216],{"id":28215},"whats-the-difference-between-a-composable-and-a-pinia-store","What's the difference between a composable and a Pinia store?",[12,28218,28219,28222,28223,28226],{},[40,28220,28221],{},"Global state vs local state",": Pinia stores are designed to manage global application state, data that must be ",[40,28224,28225],{},"accessible and shared"," from anywhere.",[12,28228,28229,28230,28233,28234,28236],{},"Composables, on the other hand, handle logic and state that can be reused in multiple components, but ",[40,28231,28232],{},"none of that is shared",". For example, if I have multiple components that need clipboard copy functionality (and need some state control), I would use a composable, and the ",[61,28235,27626],{}," state would be local in each instance of the composable. On the other hand, if I need to know in multiple places if a copy to the clipboard has been performed at the application level, I would use a Pinia store, because here all components would be aware and could react to that change.",[12,28238,28239,28240,28242,28243,28246],{},"Let's put it as an example: thanks to the ",[61,28241,27626],{}," variable, I can display something within the same component, such as the message \"Text copied\". Now, if I wanted, for example, my application's layout to display an icon in the navigation bar every time something is copied to the clipboard, then it would be better to use a Pinia store to manage that state globally, so that when copying from my ",[61,28244,28245],{},"ClipboardExample.vue"," component, the layout would also notice the change and could display the icon.",[53,28248,28250],{"id":28249},"whats-the-difference-between-a-composable-and-a-utility-file-utils","What's the difference between a composable and a utility file (utils)?",[12,28252,28253,28254,28256],{},"Utility functions are generally simpler and don't have state, they take inputs (some) and return outputs without side effects. For example, if we didn't need the ",[61,28255,27626],{}," state and only wanted a function to copy text, we could create a simple utility function instead of a composable:",[74,28258,28260],{"className":25375,"code":28259,"language":25377,"meta":79,"style":79},"export function copyToClipboard(text) {\n  return navigator.clipboard.writeText(text);\n}\n",[61,28261,28262,28278,28298],{"__ignoreMap":79},[83,28263,28264,28266,28268,28270,28272,28274,28276],{"class":85,"line":86},[83,28265,26586],{"class":89},[83,28267,27390],{"class":486},[83,28269,27425],{"class":23718},[83,28271,180],{"class":132},[83,28273,1885],{"class":811},[83,28275,505],{"class":132},[83,28277,26760],{"class":132},[83,28279,28280,28282,28284,28286,28288,28290,28292,28294,28296],{"class":85,"line":103},[83,28281,27587],{"class":89},[83,28283,27455],{"class":811},[83,28285,133],{"class":132},[83,28287,27460],{"class":811},[83,28289,133],{"class":132},[83,28291,27465],{"class":23718},[83,28293,180],{"class":132},[83,28295,1885],{"class":811},[83,28297,25509],{"class":132},[83,28299,28300],{"class":85,"line":116},[83,28301,27612],{"class":132},[12,28303,28304],{},"Recommended readings:",[1030,28306,28307,28314,28321],{},[1033,28308,28309],{},[19,28310,28313],{"href":28311,"target":17018,"rel":28312},"https:\u002F\u002Fvuejs.org\u002Fguide\u002Freusability\u002Fcomposables.html",[17020,17021],"Composables - Vue.js Documentation",[1033,28315,28316],{},[19,28317,28320],{"href":28318,"target":17018,"rel":28319},"https:\u002F\u002Fdev.to\u002Fjacobandrewsky\u002Fgood-practices-and-design-patterns-for-vue-composables-24lk",[17020,17021],"Good Practices and Design Patterns for Vue Composables",[1033,28322,28323],{},[19,28324,28327],{"href":28325,"target":17018,"rel":28326},"https:\u002F\u002Frobconery.com\u002Ffrontend\u002Fwhat-should-be-a-plugin-vs-a-composable-vs-a-store-in-nuxt\u002F",[17020,17021],"What should be a Plugin vs a Composable vs a Store in Nuxt",[53,28329,28331],{"id":28330},"vueuse","VueUse",[12,28333,28334,28338],{},[19,28335,28331],{"href":28336,"target":17018,"rel":28337},"https:\u002F\u002Fvueuse.org\u002F",[17020,17021]," is a collection of composables for Vue 3. It provides a wide range of ready-to-use features, from state management to DOM interactions and browser APIs. You can explore the official documentation to see all available composables and how to use them in your projects.",[12,28340,28341,28344],{},[1554,28342],{"alt":28331,"src":28343},"\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fvue-use.webp",[1559,28345,28331],{},[12,28347,28348],{},"Some popular examples of composables in VueUse include:",[1030,28350,28351,28357,28363,28369,28375],{},[1033,28352,28353,28356],{},[61,28354,28355],{},"useBreakpoints",": to be able to manage breakpoints in your application and help with responsive design.",[1033,28358,28359,28362],{},[61,28360,28361],{},"useFetch",": to make HTTP requests easily.",[1033,28364,28365,28368],{},[61,28366,28367],{},"useLocalStorage",": to sync data with the browser's local storage.",[1033,28370,28371,28374],{},[61,28372,28373],{},"useDark",": to handle dark and light themes in the application.",[1033,28376,28377,28379],{},[61,28378,27618],{},": to copy text to the clipboard (similar to the one we created before).",[12,28381,28382],{},"It's a very useful collection that can save you time if you need any of these features.\nJust be careful not to overload your project with unnecessary dependencies, install only what you're really going to use and only if you really need a library for it.",[29,28384],{},[32,28386,28388],{"id":28387},"eslint-and-prettier","ESLint and Prettier",[12,28390,28391,28392,28395],{},"Get used to using ",[40,28393,28394],{},"ESLint",", it's too useful for maintaining code quality and avoiding common errors.\nThe configuration generated by Vite is a good starting point, but I always recommend personalizing it.",[12,28397,28398,28399,1626,28403,133],{},"You can explore the available rules in the official documentation of ",[19,28400,28394],{"href":28401,"target":17018,"rel":28402},"https:\u002F\u002Feslint.org\u002Fdocs\u002Frules\u002F",[17020,17021],[19,28404,28407],{"href":28405,"target":17018,"rel":28406},"https:\u002F\u002Feslint.vuejs.org\u002Frules\u002F",[17020,17021],"eslint-plugin-vue",[12,28409,28410],{},"All rules can be configured as \"off\", \"warn\" or \"error\", depending on the severity you want to assign:",[74,28412,28416],{"className":28413,"code":28414,"language":28415,"meta":79,"style":79},"language-js shiki shiki-themes vitesse-light vitesse-dark","\"no-console\": \"warn\", \u002F\u002F Shows a warning if console.log is used\n\"eqeqeq\": \"error\", \u002F\u002F Forces the use of === and !== instead of == and !=\n\"vue\u002Fmulti-word-component-names\": \"off\", \u002F\u002F Disables the rule that forces multi-word component names\n","js",[61,28417,28418,28441,28463],{"__ignoreMap":79},[83,28419,28420,28422,28425,28427,28429,28431,28434,28436,28438],{"class":85,"line":86},[83,28421,234],{"class":233},[83,28423,28424],{"class":237},"no-console",[83,28426,234],{"class":233},[83,28428,4373],{"class":93},[83,28430,234],{"class":233},[83,28432,28433],{"class":237},"warn",[83,28435,234],{"class":233},[83,28437,243],{"class":132},[83,28439,28440],{"class":858}," \u002F\u002F Shows a warning if console.log is used\n",[83,28442,28443,28445,28448,28450,28452,28454,28456,28458,28460],{"class":85,"line":103},[83,28444,234],{"class":233},[83,28446,28447],{"class":237},"eqeqeq",[83,28449,234],{"class":233},[83,28451,4373],{"class":93},[83,28453,234],{"class":233},[83,28455,27539],{"class":237},[83,28457,234],{"class":233},[83,28459,243],{"class":132},[83,28461,28462],{"class":858}," \u002F\u002F Forces the use of === and !== instead of == and !=\n",[83,28464,28465,28467,28470,28472,28474,28476,28479,28481,28483],{"class":85,"line":116},[83,28466,234],{"class":233},[83,28468,28469],{"class":237},"vue\u002Fmulti-word-component-names",[83,28471,234],{"class":233},[83,28473,4373],{"class":93},[83,28475,234],{"class":233},[83,28477,28478],{"class":237},"off",[83,28480,234],{"class":233},[83,28482,243],{"class":132},[83,28484,28485],{"class":858}," \u002F\u002F Disables the rule that forces multi-word component names\n",[12,28487,28488,28489,28492,28493,24319],{},"In the project we created, you can use the ",[61,28490,28491],{},"npm run lint"," command to review all your code according to the configuration in the ",[61,28494,28495],{},"eslint.config.js",[12,28497,28498,28501],{},[40,28499,28500],{},"About Prettier",", there's some debate about its use, many people don't like it because it can impose a style you don't like, so try it, explore it, and use it only if you're comfortable with it.\nInstead of Prettier, to try to always maintain consistent style, you can use alternatives like EditorConfig, ESLint's own rules, or your code editor's configuration.",[12,28503,28504],{},"If you use some of these tools you can explore their extensions:",[1030,28506,28507,28514,28521],{},[1033,28508,28509],{},[19,28510,28513],{"href":28511,"target":17018,"rel":28512},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=dbaeumer.vscode-eslint",[17020,17021],"ESLint extension for VS Code",[1033,28515,28516],{},[19,28517,28520],{"href":28518,"target":17018,"rel":28519},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=esbenp.prettier-vscode",[17020,17021],"Prettier - Code formatter",[1033,28522,28523],{},[19,28524,28527],{"href":28525,"target":17018,"rel":28526},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=EditorConfig.EditorConfig",[17020,17021],"EditorConfig for VS Code",[29,28529],{},[32,28531,28533],{"id":28532},"extra-installing-tailwind-css-v4","EXTRA: Installing Tailwind CSS v4",[12,28535,28536,28537,28542],{},"Pure CSS is more than fine, you can achieve incredible results (sometimes even ",[19,28538,28541],{"href":28539,"target":17018,"rel":28540},"https:\u002F\u002Fgithub.com\u002Fyou-dont-need\u002FYou-Dont-Need-JavaScript",[17020,17021],"without needing JavaScript","), but an option you have to speed up your development and maintain consistent style is Tailwind CSS.",[12,28544,28545,28546,28551],{},"Following the official steps in the ",[19,28547,28550],{"href":28548,"target":17018,"rel":28549},"https:\u002F\u002Ftailwindcss.com\u002Fdocs\u002Finstallation\u002Fusing-vite",[17020,17021],"Tailwind CSS documentation",", let's install Tailwind CSS v4 in our Vue project with Vite.",[12,28553,28554],{},"First (being inside the project folder), install Tailwind CSS and its Vite plugin:",[74,28556,28558],{"className":23709,"code":28557,"language":23711,"meta":79,"style":79},"npm install tailwindcss @tailwindcss\u002Fvite\n",[61,28559,28560],{"__ignoreMap":79},[83,28561,28562,28564,28567,28570],{"class":85,"line":86},[83,28563,23647],{"class":23718},[83,28565,28566],{"class":237}," install",[83,28568,28569],{"class":237}," tailwindcss",[83,28571,28572],{"class":237}," @tailwindcss\u002Fvite\n",[12,28574,28575,28576,25372],{},"Then, we add the plugin to our ",[61,28577,28578],{},"vite.config.js",[74,28580,28582],{"className":25375,"code":28581,"language":25377,"meta":79,"style":79},"import { fileURLToPath, URL } from 'node:url';\n\nimport { defineConfig } from 'vite';\nimport vue from '@vitejs\u002Fplugin-vue';\nimport vueDevTools from 'vite-plugin-vue-devtools';\nimport tailwindcss from '@tailwindcss\u002Fvite'; \u002F\u002F Import the plugin\n\n\u002F\u002F https:\u002F\u002Fvite.dev\u002Fconfig\u002F\nexport default defineConfig({\n  plugins: [\n    vue(),\n    vueDevTools(),\n    tailwindcss(), \u002F\u002F Add to Vite configuration\n  ],\n  resolve: {\n    alias: {\n      '@': fileURLToPath(new URL('.\u002Fsrc', import.meta.url)),\n    },\n  },\n});\n",[61,28583,28584,28611,28615,28637,28655,28673,28694,28698,28703,28713,28722,28730,28737,28747,28751,28760,28769,28815,28819,28823],{"__ignoreMap":79},[83,28585,28586,28588,28590,28593,28595,28598,28600,28602,28604,28607,28609],{"class":85,"line":86},[83,28587,90],{"class":89},[83,28589,25404],{"class":132},[83,28591,28592],{"class":811}," fileURLToPath",[83,28594,243],{"class":132},[83,28596,28597],{"class":811}," URL",[83,28599,25410],{"class":132},[83,28601,25413],{"class":89},[83,28603,3453],{"class":233},[83,28605,28606],{"class":237},"node:url",[83,28608,3459],{"class":233},[83,28610,25393],{"class":132},[83,28612,28613],{"class":85,"line":103},[83,28614,161],{"emptyLinePlaceholder":160},[83,28616,28617,28619,28621,28624,28626,28628,28630,28633,28635],{"class":85,"line":116},[83,28618,90],{"class":89},[83,28620,25404],{"class":132},[83,28622,28623],{"class":811}," defineConfig",[83,28625,25410],{"class":132},[83,28627,25413],{"class":89},[83,28629,3453],{"class":233},[83,28631,28632],{"class":237},"vite",[83,28634,3459],{"class":233},[83,28636,25393],{"class":132},[83,28638,28639,28641,28644,28646,28648,28651,28653],{"class":85,"line":124},[83,28640,90],{"class":89},[83,28642,28643],{"class":811}," vue",[83,28645,25413],{"class":89},[83,28647,3453],{"class":233},[83,28649,28650],{"class":237},"@vitejs\u002Fplugin-vue",[83,28652,3459],{"class":233},[83,28654,25393],{"class":132},[83,28656,28657,28659,28662,28664,28666,28669,28671],{"class":85,"line":144},[83,28658,90],{"class":89},[83,28660,28661],{"class":811}," vueDevTools",[83,28663,25413],{"class":89},[83,28665,3453],{"class":233},[83,28667,28668],{"class":237},"vite-plugin-vue-devtools",[83,28670,3459],{"class":233},[83,28672,25393],{"class":132},[83,28674,28675,28677,28679,28681,28683,28686,28688,28691],{"class":85,"line":157},[83,28676,90],{"class":89},[83,28678,28569],{"class":811},[83,28680,25413],{"class":89},[83,28682,3453],{"class":233},[83,28684,28685],{"class":237},"@tailwindcss\u002Fvite",[83,28687,3459],{"class":233},[83,28689,28690],{"class":132},";",[83,28692,28693],{"class":858}," \u002F\u002F Import the plugin\n",[83,28695,28696],{"class":85,"line":164},[83,28697,161],{"emptyLinePlaceholder":160},[83,28699,28700],{"class":85,"line":190},[83,28701,28702],{"class":858},"\u002F\u002F https:\u002F\u002Fvite.dev\u002Fconfig\u002F\n",[83,28704,28705,28707,28709,28711],{"class":85,"line":205},[83,28706,26586],{"class":89},[83,28708,26589],{"class":89},[83,28710,28623],{"class":23718},[83,28712,3567],{"class":132},[83,28714,28715,28718,28720],{"class":85,"line":210},[83,28716,28717],{"class":294},"  plugins",[83,28719,589],{"class":132},[83,28721,26447],{"class":132},[83,28723,28724,28727],{"class":85,"line":222},[83,28725,28726],{"class":23718},"    vue",[83,28728,28729],{"class":132},"(),\n",[83,28731,28732,28735],{"class":85,"line":266},[83,28733,28734],{"class":23718},"    vueDevTools",[83,28736,28729],{"class":132},[83,28738,28739,28742,28744],{"class":85,"line":277},[83,28740,28741],{"class":23718},"    tailwindcss",[83,28743,3422],{"class":132},[83,28745,28746],{"class":858}," \u002F\u002F Add to Vite configuration\n",[83,28748,28749],{"class":85,"line":282},[83,28750,26572],{"class":132},[83,28752,28753,28756,28758],{"class":85,"line":306},[83,28754,28755],{"class":294},"  resolve",[83,28757,589],{"class":132},[83,28759,26760],{"class":132},[83,28761,28762,28765,28767],{"class":85,"line":344},[83,28763,28764],{"class":294},"    alias",[83,28766,589],{"class":132},[83,28768,26760],{"class":132},[83,28770,28771,28774,28777,28779,28781,28783,28785,28788,28790,28792,28794,28797,28799,28801,28803,28805,28807,28809,28812],{"class":85,"line":379},[83,28772,28773],{"class":233},"      '",[83,28775,28776],{"class":237},"@",[83,28778,3459],{"class":233},[83,28780,589],{"class":132},[83,28782,28592],{"class":23718},[83,28784,180],{"class":132},[83,28786,28787],{"class":486},"new",[83,28789,28597],{"class":23718},[83,28791,180],{"class":132},[83,28793,3459],{"class":233},[83,28795,28796],{"class":237},".\u002Fsrc",[83,28798,3459],{"class":233},[83,28800,243],{"class":132},[83,28802,26552],{"class":89},[83,28804,133],{"class":132},[83,28806,25695],{"class":294},[83,28808,133],{"class":132},[83,28810,28811],{"class":811},"url",[83,28813,28814],{"class":132},")),\n",[83,28816,28817],{"class":85,"line":408},[83,28818,26499],{"class":132},[83,28820,28821],{"class":85,"line":443},[83,28822,26921],{"class":132},[83,28824,28825],{"class":85,"line":464},[83,28826,26577],{"class":132},[12,28828,28829,28830,28833],{},"Then in the ",[61,28831,28832],{},"src\u002Fassets\u002Fmain.css"," file, replace all content with the following:",[74,28835,28839],{"className":28836,"code":28837,"language":28838,"meta":79,"style":79},"language-css shiki shiki-themes vitesse-light vitesse-dark","@import '.\u002Fbase.css';\n\n@import 'tailwindcss';\n","css",[61,28840,28841,28856,28860],{"__ignoreMap":79},[83,28842,28843,28845,28847,28849,28852,28854],{"class":85,"line":86},[83,28844,28776],{"class":132},[83,28846,90],{"class":89},[83,28848,3453],{"class":233},[83,28850,28851],{"class":237},".\u002Fbase.css",[83,28853,3459],{"class":233},[83,28855,25393],{"class":132},[83,28857,28858],{"class":85,"line":103},[83,28859,161],{"emptyLinePlaceholder":160},[83,28861,28862,28864,28866,28868,28871,28873],{"class":85,"line":116},[83,28863,28776],{"class":132},[83,28865,90],{"class":89},[83,28867,3453],{"class":233},[83,28869,28870],{"class":237},"tailwindcss",[83,28872,3459],{"class":233},[83,28874,25393],{"class":132},[12,28876,28877,28878,28881],{},"We take the opportunity to clean up the ",[61,28879,28880],{},"src\u002Fassets\u002Fbase.css"," file and leave only what's necessary:",[74,28883,28885],{"className":28836,"code":28884,"language":28838,"meta":79,"style":79},"*,\n*::before,\n*::after {\n  box-sizing: border-box;\n  margin: 0;\n  font-weight: normal;\n}\n\nbody {\n  min-height: 100vh;\n  color: var(--color-text);\n  background: var(--color-background);\n  transition:\n    color 0.5s,\n    background-color 0.5s;\n  line-height: 1.6;\n  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n  font-size: 15px;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n",[61,28886,28887,28893,28905,28916,28928,28940,28952,28956,28960,28966,28981,28998,29014,29022,29035,29046,29058,29095,29109,29121,29133,29145],{"__ignoreMap":79},[83,28888,28889,28891],{"class":85,"line":86},[83,28890,499],{"class":89},[83,28892,3589],{"class":132},[83,28894,28895,28897,28900,28903],{"class":85,"line":103},[83,28896,499],{"class":89},[83,28898,28899],{"class":132},"::",[83,28901,28902],{"class":811},"before",[83,28904,3589],{"class":132},[83,28906,28907,28909,28911,28914],{"class":85,"line":116},[83,28908,499],{"class":89},[83,28910,28899],{"class":132},[83,28912,28913],{"class":811},"after",[83,28915,26760],{"class":132},[83,28917,28918,28921,28923,28926],{"class":85,"line":124},[83,28919,28920],{"class":294},"  box-sizing",[83,28922,589],{"class":132},[83,28924,28925],{"class":3168}," border-box",[83,28927,25393],{"class":132},[83,28929,28930,28933,28935,28938],{"class":85,"line":144},[83,28931,28932],{"class":294},"  margin",[83,28934,589],{"class":132},[83,28936,28937],{"class":183}," 0",[83,28939,25393],{"class":132},[83,28941,28942,28945,28947,28950],{"class":85,"line":157},[83,28943,28944],{"class":294},"  font-weight",[83,28946,589],{"class":132},[83,28948,28949],{"class":3168}," normal",[83,28951,25393],{"class":132},[83,28953,28954],{"class":85,"line":164},[83,28955,27612],{"class":132},[83,28957,28958],{"class":85,"line":190},[83,28959,161],{"emptyLinePlaceholder":160},[83,28961,28962,28964],{"class":85,"line":205},[83,28963,25810],{"class":89},[83,28965,26760],{"class":132},[83,28967,28968,28971,28973,28976,28979],{"class":85,"line":210},[83,28969,28970],{"class":294},"  min-height",[83,28972,589],{"class":132},[83,28974,28975],{"class":183}," 100",[83,28977,28978],{"class":486},"vh",[83,28980,25393],{"class":132},[83,28982,28983,28986,28988,28991,28993,28996],{"class":85,"line":222},[83,28984,28985],{"class":294},"  color",[83,28987,589],{"class":132},[83,28989,28990],{"class":294}," var",[83,28992,180],{"class":132},[83,28994,28995],{"class":811},"--color-text",[83,28997,25509],{"class":132},[83,28999,29000,29003,29005,29007,29009,29012],{"class":85,"line":266},[83,29001,29002],{"class":294},"  background",[83,29004,589],{"class":132},[83,29006,28990],{"class":294},[83,29008,180],{"class":132},[83,29010,29011],{"class":811},"--color-background",[83,29013,25509],{"class":132},[83,29015,29016,29019],{"class":85,"line":277},[83,29017,29018],{"class":294},"  transition",[83,29020,29021],{"class":132},":\n",[83,29023,29024,29027,29030,29033],{"class":85,"line":282},[83,29025,29026],{"class":3168},"    color",[83,29028,29029],{"class":183}," 0.5",[83,29031,29032],{"class":486},"s",[83,29034,3589],{"class":132},[83,29036,29037,29040,29042,29044],{"class":85,"line":306},[83,29038,29039],{"class":93},"    background-color ",[83,29041,20145],{"class":183},[83,29043,29032],{"class":486},[83,29045,25393],{"class":132},[83,29047,29048,29051,29053,29056],{"class":85,"line":344},[83,29049,29050],{"class":294},"  line-height",[83,29052,589],{"class":132},[83,29054,29055],{"class":183}," 1.6",[83,29057,25393],{"class":132},[83,29059,29060,29063,29065,29068,29070,29073,29075,29078,29080,29083,29085,29088,29090,29093],{"class":85,"line":379},[83,29061,29062],{"class":294},"  font-family",[83,29064,589],{"class":132},[83,29066,29067],{"class":93}," Inter",[83,29069,243],{"class":132},[83,29071,29072],{"class":3168}," system-ui",[83,29074,243],{"class":132},[83,29076,29077],{"class":93}," Avenir",[83,29079,243],{"class":132},[83,29081,29082],{"class":3168}," Helvetica",[83,29084,243],{"class":132},[83,29086,29087],{"class":3168}," Arial",[83,29089,243],{"class":132},[83,29091,29092],{"class":3168}," sans-serif",[83,29094,25393],{"class":132},[83,29096,29097,29100,29102,29104,29107],{"class":85,"line":408},[83,29098,29099],{"class":294},"  font-size",[83,29101,589],{"class":132},[83,29103,433],{"class":183},[83,29105,29106],{"class":486},"px",[83,29108,25393],{"class":132},[83,29110,29111,29114,29116,29119],{"class":85,"line":443},[83,29112,29113],{"class":294},"  text-rendering",[83,29115,589],{"class":132},[83,29117,29118],{"class":3168}," optimizeLegibility",[83,29120,25393],{"class":132},[83,29122,29123,29126,29128,29131],{"class":85,"line":464},[83,29124,29125],{"class":294},"  -webkit-font-smoothing",[83,29127,589],{"class":132},[83,29129,29130],{"class":3168}," antialiased",[83,29132,25393],{"class":132},[83,29134,29135,29138,29140,29143],{"class":85,"line":469},[83,29136,29137],{"class":294},"  -moz-osx-font-smoothing",[83,29139,589],{"class":132},[83,29141,29142],{"class":3168}," grayscale",[83,29144,25393],{"class":132},[83,29146,29147],{"class":85,"line":480},[83,29148,27612],{"class":132},[12,29150,29151,29152,29155],{},"Now let's test that everything works correctly. First, stop the development server if it's running (",[61,29153,29154],{},"Ctrl + C"," in the terminal) and then start it again:",[74,29157,29158],{"className":23709,"code":23959,"language":23711,"meta":79,"style":79},[61,29159,29160],{"__ignoreMap":79},[83,29161,29162,29164,29166],{"class":85,"line":86},[83,29163,23647],{"class":23718},[83,29165,23948],{"class":237},[83,29167,23970],{"class":237},[12,29169,25910,29170,29172],{},[61,29171,25913],{}," file and replace all content with the following:",[74,29174,29176],{"className":25916,"code":29175,"language":25418,"meta":79,"style":79},"\u003Cscript setup>\nimport { RouterLink, RouterView } from 'vue-router';\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"flex h-screen flex-col bg-gray-50\">\n    \u003C!-- App Bar -->\n    \u003Cheader class=\"flex h-16 items-center justify-between bg-white px-6 shadow-sm\">\n      \u003Cdiv class=\"text-xl font-bold text-gray-800\">My Project\u003C\u002Fdiv>\n      \u003Cnav class=\"flex gap-4\" aria-label=\"Main Navigation\">\n        \u003Ca href=\"#\" class=\"text-gray-600 hover:text-gray-900\">Home\u003C\u002Fa>\n        \u003Ca href=\"#\" class=\"text-gray-600 hover:text-gray-900\">Profile\u003C\u002Fa>\n      \u003C\u002Fnav>\n    \u003C\u002Fheader>\n\n    \u003Cdiv class=\"flex flex-1 overflow-hidden\">\n      \u003C!-- Sidebar -->\n      \u003Caside class=\"w-64 overflow-y-auto bg-white border-r border-gray-200\">\n        \u003Cnav class=\"p-4 space-y-2\" aria-label=\"Sidebar Navigation\">\n          \u003CRouterLink\n            to=\"\u002F\"\n            class=\"block rounded-md px-4 py-2 text-gray-700 hover:bg-gray-100\"\n            exact-active-class=\"text-indigo-700 font-bold\"\n          >\n            Home\n          \u003C\u002FRouterLink>\n          \u003CRouterLink\n            to=\"\u002Fabout\"\n            class=\"block rounded-md px-4 py-2 text-gray-700 hover:bg-gray-100\"\n            exact-active-class=\"text-indigo-700 font-bold\"\n          >\n            About\n          \u003C\u002FRouterLink>\n        \u003C\u002Fnav>\n      \u003C\u002Faside>\n\n      \u003C!-- Main Content -->\n      \u003Cmain class=\"flex-1 overflow-y-auto p-6\">\n        \u003CRouterView \u002F>\n      \u003C\u002Fmain>\n    \u003C\u002Fdiv>\n\n    \u003C!-- Footer -->\n    \u003Cfooter\n      class=\"flex h-12 items-center justify-center bg-white border-t border-gray-200 text-sm text-gray-500\"\n    >\n      &copy; 2025 My Project. All rights reserved.\n    \u003C\u002Ffooter>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[61,29177,29178,29188,29212,29220,29224,29232,29251,29256,29275,29303,29334,29372,29409,29417,29425,29429,29448,29453,29473,29503,29511,29525,29539,29553,29558,29563,29572,29578,29590,29602,29614,29618,29623,29631,29640,29648,29652,29657,29677,29685,29693,29701,29705,29710,29717,29731,29736,29750,29760,29769],{"__ignoreMap":79},[83,29179,29180,29182,29184,29186],{"class":85,"line":86},[83,29181,20213],{"class":132},[83,29183,25844],{"class":89},[83,29185,25928],{"class":811},[83,29187,25662],{"class":132},[83,29189,29190,29192,29194,29196,29198,29200,29202,29204,29206,29208,29210],{"class":85,"line":103},[83,29191,90],{"class":89},[83,29193,25404],{"class":132},[83,29195,25939],{"class":811},[83,29197,243],{"class":132},[83,29199,25944],{"class":811},[83,29201,25410],{"class":132},[83,29203,25413],{"class":89},[83,29205,3453],{"class":233},[83,29207,25953],{"class":237},[83,29209,3459],{"class":233},[83,29211,25393],{"class":132},[83,29213,29214,29216,29218],{"class":85,"line":116},[83,29215,25790],{"class":132},[83,29217,25844],{"class":89},[83,29219,25662],{"class":132},[83,29221,29222],{"class":85,"line":124},[83,29223,161],{"emptyLinePlaceholder":160},[83,29225,29226,29228,29230],{"class":85,"line":144},[83,29227,20213],{"class":132},[83,29229,26056],{"class":89},[83,29231,25662],{"class":132},[83,29233,29234,29236,29238,29240,29242,29244,29247,29249],{"class":85,"line":157},[83,29235,25683],{"class":132},[83,29237,25819],{"class":89},[83,29239,26088],{"class":811},[83,29241,216],{"class":132},[83,29243,234],{"class":233},[83,29245,29246],{"class":237},"flex h-screen flex-col bg-gray-50",[83,29248,234],{"class":233},[83,29250,25662],{"class":132},[83,29252,29253],{"class":85,"line":164},[83,29254,29255],{"class":858},"    \u003C!-- App Bar -->\n",[83,29257,29258,29260,29262,29264,29266,29268,29271,29273],{"class":85,"line":190},[83,29259,25692],{"class":132},[83,29261,26065],{"class":89},[83,29263,26088],{"class":811},[83,29265,216],{"class":132},[83,29267,234],{"class":233},[83,29269,29270],{"class":237},"flex h-16 items-center justify-between bg-white px-6 shadow-sm",[83,29272,234],{"class":233},[83,29274,25662],{"class":132},[83,29276,29277,29279,29281,29283,29285,29287,29290,29292,29294,29297,29299,29301],{"class":85,"line":205},[83,29278,26161],{"class":132},[83,29280,25819],{"class":89},[83,29282,26088],{"class":811},[83,29284,216],{"class":132},[83,29286,234],{"class":233},[83,29288,29289],{"class":237},"text-xl font-bold text-gray-800",[83,29291,234],{"class":233},[83,29293,25784],{"class":132},[83,29295,29296],{"class":93},"My Project",[83,29298,25790],{"class":132},[83,29300,25819],{"class":89},[83,29302,25662],{"class":132},[83,29304,29305,29307,29309,29311,29313,29315,29318,29320,29323,29325,29327,29330,29332],{"class":85,"line":210},[83,29306,26161],{"class":132},[83,29308,26189],{"class":89},[83,29310,26088],{"class":811},[83,29312,216],{"class":132},[83,29314,234],{"class":233},[83,29316,29317],{"class":237},"flex gap-4",[83,29319,234],{"class":233},[83,29321,29322],{"class":811}," aria-label",[83,29324,216],{"class":132},[83,29326,234],{"class":233},[83,29328,29329],{"class":237},"Main Navigation",[83,29331,234],{"class":233},[83,29333,25662],{"class":132},[83,29335,29336,29338,29340,29342,29344,29346,29349,29351,29353,29355,29357,29360,29362,29364,29366,29368,29370],{"class":85,"line":222},[83,29337,26196],{"class":132},[83,29339,19],{"class":89},[83,29341,25732],{"class":811},[83,29343,216],{"class":132},[83,29345,234],{"class":233},[83,29347,29348],{"class":237},"#",[83,29350,234],{"class":233},[83,29352,26088],{"class":811},[83,29354,216],{"class":132},[83,29356,234],{"class":233},[83,29358,29359],{"class":237},"text-gray-600 hover:text-gray-900",[83,29361,234],{"class":233},[83,29363,25784],{"class":132},[83,29365,26215],{"class":93},[83,29367,25790],{"class":132},[83,29369,19],{"class":89},[83,29371,25662],{"class":132},[83,29373,29374,29376,29378,29380,29382,29384,29386,29388,29390,29392,29394,29396,29398,29400,29403,29405,29407],{"class":85,"line":266},[83,29375,26196],{"class":132},[83,29377,19],{"class":89},[83,29379,25732],{"class":811},[83,29381,216],{"class":132},[83,29383,234],{"class":233},[83,29385,29348],{"class":237},[83,29387,234],{"class":233},[83,29389,26088],{"class":811},[83,29391,216],{"class":132},[83,29393,234],{"class":233},[83,29395,29359],{"class":237},[83,29397,234],{"class":233},[83,29399,25784],{"class":132},[83,29401,29402],{"class":93},"Profile",[83,29404,25790],{"class":132},[83,29406,19],{"class":89},[83,29408,25662],{"class":132},[83,29410,29411,29413,29415],{"class":85,"line":277},[83,29412,26254],{"class":132},[83,29414,26189],{"class":89},[83,29416,25662],{"class":132},[83,29418,29419,29421,29423],{"class":85,"line":282},[83,29420,26263],{"class":132},[83,29422,26065],{"class":89},[83,29424,25662],{"class":132},[83,29426,29427],{"class":85,"line":306},[83,29428,161],{"emptyLinePlaceholder":160},[83,29430,29431,29433,29435,29437,29439,29441,29444,29446],{"class":85,"line":344},[83,29432,25692],{"class":132},[83,29434,25819],{"class":89},[83,29436,26088],{"class":811},[83,29438,216],{"class":132},[83,29440,234],{"class":233},[83,29442,29443],{"class":237},"flex flex-1 overflow-hidden",[83,29445,234],{"class":233},[83,29447,25662],{"class":132},[83,29449,29450],{"class":85,"line":379},[83,29451,29452],{"class":858},"      \u003C!-- Sidebar -->\n",[83,29454,29455,29457,29460,29462,29464,29466,29469,29471],{"class":85,"line":408},[83,29456,26161],{"class":132},[83,29458,29459],{"class":89},"aside",[83,29461,26088],{"class":811},[83,29463,216],{"class":132},[83,29465,234],{"class":233},[83,29467,29468],{"class":237},"w-64 overflow-y-auto bg-white border-r border-gray-200",[83,29470,234],{"class":233},[83,29472,25662],{"class":132},[83,29474,29475,29477,29479,29481,29483,29485,29488,29490,29492,29494,29496,29499,29501],{"class":85,"line":443},[83,29476,26196],{"class":132},[83,29478,26189],{"class":89},[83,29480,26088],{"class":811},[83,29482,216],{"class":132},[83,29484,234],{"class":233},[83,29486,29487],{"class":237},"p-4 space-y-2",[83,29489,234],{"class":233},[83,29491,29322],{"class":811},[83,29493,216],{"class":132},[83,29495,234],{"class":233},[83,29497,29498],{"class":237},"Sidebar Navigation",[83,29500,234],{"class":233},[83,29502,25662],{"class":132},[83,29504,29505,29508],{"class":85,"line":464},[83,29506,29507],{"class":132},"          \u003C",[83,29509,29510],{"class":89},"RouterLink\n",[83,29512,29513,29516,29518,29520,29522],{"class":85,"line":469},[83,29514,29515],{"class":811},"            to",[83,29517,216],{"class":132},[83,29519,234],{"class":233},[83,29521,68],{"class":237},[83,29523,29524],{"class":233},"\"\n",[83,29526,29527,29530,29532,29534,29537],{"class":85,"line":480},[83,29528,29529],{"class":811},"            class",[83,29531,216],{"class":132},[83,29533,234],{"class":233},[83,29535,29536],{"class":237},"block rounded-md px-4 py-2 text-gray-700 hover:bg-gray-100",[83,29538,29524],{"class":233},[83,29540,29541,29544,29546,29548,29551],{"class":85,"line":490},[83,29542,29543],{"class":811},"            exact-active-class",[83,29545,216],{"class":132},[83,29547,234],{"class":233},[83,29549,29550],{"class":237},"text-indigo-700 font-bold",[83,29552,29524],{"class":233},[83,29554,29555],{"class":85,"line":511},[83,29556,29557],{"class":132},"          >\n",[83,29559,29560],{"class":85,"line":528},[83,29561,29562],{"class":93},"            Home\n",[83,29564,29565,29568,29570],{"class":85,"line":545},[83,29566,29567],{"class":132},"          \u003C\u002F",[83,29569,26199],{"class":89},[83,29571,25662],{"class":132},[83,29573,29574,29576],{"class":85,"line":560},[83,29575,29507],{"class":132},[83,29577,29510],{"class":89},[83,29579,29580,29582,29584,29586,29588],{"class":85,"line":566},[83,29581,29515],{"class":811},[83,29583,216],{"class":132},[83,29585,234],{"class":233},[83,29587,26236],{"class":237},[83,29589,29524],{"class":233},[83,29591,29592,29594,29596,29598,29600],{"class":85,"line":571},[83,29593,29529],{"class":811},[83,29595,216],{"class":132},[83,29597,234],{"class":233},[83,29599,29536],{"class":237},[83,29601,29524],{"class":233},[83,29603,29604,29606,29608,29610,29612],{"class":85,"line":601},[83,29605,29543],{"class":811},[83,29607,216],{"class":132},[83,29609,234],{"class":233},[83,29611,29550],{"class":237},[83,29613,29524],{"class":233},[83,29615,29616],{"class":85,"line":627},[83,29617,29557],{"class":132},[83,29619,29620],{"class":85,"line":632},[83,29621,29622],{"class":93},"            About\n",[83,29624,29625,29627,29629],{"class":85,"line":662},[83,29626,29567],{"class":132},[83,29628,26199],{"class":89},[83,29630,25662],{"class":132},[83,29632,29633,29636,29638],{"class":85,"line":667},[83,29634,29635],{"class":132},"        \u003C\u002F",[83,29637,26189],{"class":89},[83,29639,25662],{"class":132},[83,29641,29642,29644,29646],{"class":85,"line":719},[83,29643,26254],{"class":132},[83,29645,29459],{"class":89},[83,29647,25662],{"class":132},[83,29649,29650],{"class":85,"line":724},[83,29651,161],{"emptyLinePlaceholder":160},[83,29653,29654],{"class":85,"line":788},[83,29655,29656],{"class":858},"      \u003C!-- Main Content -->\n",[83,29658,29659,29661,29664,29666,29668,29670,29673,29675],{"class":85,"line":822},[83,29660,26161],{"class":132},[83,29662,29663],{"class":89},"main",[83,29665,26088],{"class":811},[83,29667,216],{"class":132},[83,29669,234],{"class":233},[83,29671,29672],{"class":237},"flex-1 overflow-y-auto p-6",[83,29674,234],{"class":233},[83,29676,25662],{"class":132},[83,29678,29679,29681,29683],{"class":85,"line":25247},[83,29680,26196],{"class":132},[83,29682,26286],{"class":89},[83,29684,25710],{"class":132},[83,29686,29687,29689,29691],{"class":85,"line":25259},[83,29688,26254],{"class":132},[83,29690,29663],{"class":89},[83,29692,25662],{"class":132},[83,29694,29695,29697,29699],{"class":85,"line":25271},[83,29696,26263],{"class":132},[83,29698,25819],{"class":89},[83,29700,25662],{"class":132},[83,29702,29703],{"class":85,"line":25278},[83,29704,161],{"emptyLinePlaceholder":160},[83,29706,29707],{"class":85,"line":25287},[83,29708,29709],{"class":858},"    \u003C!-- Footer -->\n",[83,29711,29712,29714],{"class":85,"line":25302},[83,29713,25692],{"class":132},[83,29715,29716],{"class":89},"footer\n",[83,29718,29719,29722,29724,29726,29729],{"class":85,"line":25312},[83,29720,29721],{"class":811},"      class",[83,29723,216],{"class":132},[83,29725,234],{"class":233},[83,29727,29728],{"class":237},"flex h-12 items-center justify-center bg-white border-t border-gray-200 text-sm text-gray-500",[83,29730,29524],{"class":233},[83,29732,29733],{"class":85,"line":25321},[83,29734,29735],{"class":132},"    >\n",[83,29737,29739,29742,29745,29747],{"class":85,"line":29738},47,[83,29740,29741],{"class":132},"      &",[83,29743,29744],{"class":3168},"copy",[83,29746,28690],{"class":132},[83,29748,29749],{"class":93}," 2025 My Project. All rights reserved.\n",[83,29751,29753,29755,29758],{"class":85,"line":29752},48,[83,29754,26263],{"class":132},[83,29756,29757],{"class":89},"footer",[83,29759,25662],{"class":132},[83,29761,29763,29765,29767],{"class":85,"line":29762},49,[83,29764,25799],{"class":132},[83,29766,25819],{"class":89},[83,29768,25662],{"class":132},[83,29770,29772,29774,29776],{"class":85,"line":29771},50,[83,29773,25790],{"class":132},[83,29775,26056],{"class":89},[83,29777,25662],{"class":132},[12,29779,29780,29781,29783],{},"With this, we have created a basic structure with an app bar, a sidebar, a main content area, and a footer, all styled with Tailwind CSS classes.\nIdeally, each block (AppBar, Sidebar, Footer) should be a separate component to promote reuse and maintenance, but for this example, we leave everything in ",[61,29782,24394],{}," for simplicity.",[12,29785,29786,29787,29790],{},"Verify that everything works correctly by opening ",[61,29788,29789],{},"http:\u002F\u002Flocalhost:5173"," in your browser. You should see the basic structure with styles applied.",[12,29792,29793,29794,29798,29799,133],{},"With that, you now have Tailwind CSS v4 working in your project. Explore its ",[19,29795,24031],{"href":29796,"target":17018,"rel":29797},"https:\u002F\u002Ftailwindcss.com",[17020,17021]," and install its extension for better autocompletion in VS Code: ",[19,29800,29803],{"href":29801,"target":17018,"rel":29802},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=bradlc.vscode-tailwindcss",[17020,17021],"Tailwind CSS IntelliSense",[29,29805],{},[32,29807,29809],{"id":29808},"extra-uploading-the-project-to-github","EXTRA: Uploading the project to GitHub",[12,29811,29812],{},"For this, we have many options. Before starting, I assume you already have a GitHub account and Git installed on your machine.",[1077,29814,29815],{},[1033,29816,29817],{},"First, initialize a Git repository in the project folder (if you haven't already):",[74,29819,29821],{"className":23709,"code":29820,"language":23711,"meta":79,"style":79},"git init\n",[61,29822,29823],{"__ignoreMap":79},[83,29824,29825,29828],{"class":85,"line":86},[83,29826,29827],{"class":23718},"git",[83,29829,29830],{"class":237}," init\n",[1077,29832,29833],{"start":103},[1033,29834,29835,29836,29839],{},"Then create a ",[61,29837,29838],{},".gitignore"," file in the root of the project (you probably already have one) and make sure it contains the following lines to ignore unnecessary files and folders:",[74,29841,29844],{"className":29842,"code":29843,"language":1885},[2384],"# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n# Editor directories and files\n.vscode\u002F*\n!.vscode\u002Fextensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\n*.tsbuildinfo\n\n.eslintcache\n\n# Cypress\n\u002Fcypress\u002Fvideos\u002F\n\u002Fcypress\u002Fscreenshots\u002F\n\n# Vitest\n__screenshots__\u002F\n\n",[61,29845,29843],{"__ignoreMap":79},[1077,29847,29848],{"start":116},[1033,29849,29850],{},"Now let's add all files and make the initial commit:",[74,29852,29854],{"className":23709,"code":29853,"language":23711,"meta":79,"style":79},"git add .\n",[61,29855,29856],{"__ignoreMap":79},[83,29857,29858,29860,29863],{"class":85,"line":86},[83,29859,29827],{"class":23718},[83,29861,29862],{"class":237}," add",[83,29864,29865],{"class":237}," .\n",[74,29867,29869],{"className":23709,"code":29868,"language":23711,"meta":79,"style":79},"git commit -m \"Initial commit\"\n",[61,29870,29871],{"__ignoreMap":79},[83,29872,29873,29875,29878,29881,29883,29886],{"class":85,"line":86},[83,29874,29827],{"class":23718},[83,29876,29877],{"class":237}," commit",[83,29879,29880],{"class":3168}," -m",[83,29882,246],{"class":233},[83,29884,29885],{"class":237},"Initial commit",[83,29887,29524],{"class":233},[1077,29889,29890,29897],{"start":124},[1033,29891,29892,29893,29896],{},"Now, go to GitHub and create a new repository. You can do this by clicking the \"+\" icon in the top right corner and selecting \"New repository\". Give it a name (for example, ",[61,29894,29895],{},"my-vue-app","), add a description if you want, and choose whether it will be public or private. Do not initialize it with a README, .gitignore, or license, since we already have those locally.",[1033,29898,29899],{},"Then, follow the instructions GitHub gives you to connect your local repository with the remote one. They are usually something like this:",[74,29901,29903],{"className":23709,"code":29902,"language":23711,"meta":79,"style":79},"git remote add origin https:\u002F\u002Fexample-url.git\n",[61,29904,29905],{"__ignoreMap":79},[83,29906,29907,29909,29912,29914,29917],{"class":85,"line":86},[83,29908,29827],{"class":23718},[83,29910,29911],{"class":237}," remote",[83,29913,29862],{"class":237},[83,29915,29916],{"class":237}," origin",[83,29918,29919],{"class":237}," https:\u002F\u002Fexample-url.git\n",[74,29921,29923],{"className":23709,"code":29922,"language":23711,"meta":79,"style":79},"git branch -M main\n",[61,29924,29925],{"__ignoreMap":79},[83,29926,29927,29929,29932,29935],{"class":85,"line":86},[83,29928,29827],{"class":23718},[83,29930,29931],{"class":237}," branch",[83,29933,29934],{"class":3168}," -M",[83,29936,29937],{"class":237}," main\n",[74,29939,29941],{"className":23709,"code":29940,"language":23711,"meta":79,"style":79},"git push -u origin main\n",[61,29942,29943],{"__ignoreMap":79},[83,29944,29945,29947,29950,29953,29955],{"class":85,"line":86},[83,29946,29827],{"class":23718},[83,29948,29949],{"class":237}," push",[83,29951,29952],{"class":3168}," -u",[83,29954,29916],{"class":237},[83,29956,29937],{"class":237},[1077,29958,29959],{"start":157},[1033,29960,29961],{},"We check status",[74,29963,29965],{"className":23709,"code":29964,"language":23711,"meta":79,"style":79},"git status\n",[61,29966,29967],{"__ignoreMap":79},[83,29968,29969,29971],{"class":85,"line":86},[83,29970,29827],{"class":23718},[83,29972,29973],{"class":237}," status\n",[12,29975,29976,29977,29979,29980,29983],{},"It should say that we are on the ",[61,29978,29663],{}," branch, we are synchronized with the remote repository ",[61,29981,29982],{},"origin\u002Fmain",", and there is nothing to commit.",[1077,29985,29986],{"start":164},[1033,29987,29988],{},"Finally, whenever we make changes and want to push them to GitHub, we do:",[74,29990,29992],{"className":23709,"code":29991,"language":23711,"meta":79,"style":79},"git add .\ngit commit -m \"Description of the changes\"\ngit push\n",[61,29993,29994,30002,30017],{"__ignoreMap":79},[83,29995,29996,29998,30000],{"class":85,"line":86},[83,29997,29827],{"class":23718},[83,29999,29862],{"class":237},[83,30001,29865],{"class":237},[83,30003,30004,30006,30008,30010,30012,30015],{"class":85,"line":103},[83,30005,29827],{"class":23718},[83,30007,29877],{"class":237},[83,30009,29880],{"class":3168},[83,30011,246],{"class":233},[83,30013,30014],{"class":237},"Description of the changes",[83,30016,29524],{"class":233},[83,30018,30019,30021],{"class":85,"line":116},[83,30020,29827],{"class":23718},[83,30022,30023],{"class":237}," push\n",[12,30025,30026],{},"And that's it! You now have your Vue 3 project with Vite uploaded to GitHub.",[12,30028,30029],{},"It's common to always use a version control system like Git to manage your code, even in personal projects. It will help you keep a history of changes, collaborate with others, and protect your work.",[12,30031,30032,30033,30038],{},"I also recommend exploring ",[19,30034,30037],{"href":30035,"target":17018,"rel":30036},"https:\u002F\u002Fwww.conventionalcommits.org\u002Fen\u002Fv1.0.0\u002F",[17020,17021],"Conventional Commits"," to maintain consistent and meaningful commit messages. It's something many companies, teams, and open source projects use.",[12,30040,30041],{},"Some resources to learn more about Git and GitHub:",[1030,30043,30044,30051,30058],{},[1033,30045,30046],{},[19,30047,30050],{"href":30048,"target":17018,"rel":30049},"https:\u002F\u002Fgithub.com\u002Fdjayepro3\u002FGuide-Git-GitHub-VSCode",[17020,17021],"Git & GitHub with VS Code: A Beginner's Guide",[1033,30052,30053],{},[19,30054,30057],{"href":30055,"target":17018,"rel":30056},"https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fstart-your-journey",[17020,17021],"GitHub Quickstart Guide",[1033,30059,30060],{},[19,30061,30064],{"href":30062,"target":17018,"rel":30063},"https:\u002F\u002Fgit-scm.com\u002Fdoc",[17020,17021],"Git Documentation",[12,30066,30067],{},"VS Code Extensions:",[1030,30069,30070,30077],{},[1033,30071,30072],{},[19,30073,30076],{"href":30074,"target":17018,"rel":30075},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=eamodio.gitlens",[17020,17021],"Gitlens",[1033,30078,30079],{},[19,30080,30083],{"href":30081,"target":17018,"rel":30082},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=mhutchie.git-graph",[17020,17021],"Git Graph",[29,30085],{},[32,30087,30089],{"id":30088},"extra-other-useful-extensions-for-vs-code","EXTRA: Other Useful Extensions for VS Code",[12,30091,30092],{},"Some extensions that I always recommend for VS Code (regardless of the type of project):",[1030,30094,30095,30103,30111,30119],{},[1033,30096,30097,30102],{},[19,30098,30101],{"href":30099,"target":17018,"rel":30100},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=usernamehw.errorlens",[17020,17021],"Error Lens",": Highlights errors and warnings directly in the code, making them easier to identify and fix.",[1033,30104,30105,30110],{},[19,30106,30109],{"href":30107,"target":17018,"rel":30108},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=naumovs.color-highlight",[17020,17021],"Color Highlight",": Highlights colors defined in your CSS code, making them easier to visualize.",[1033,30112,30113,30118],{},[19,30114,30117],{"href":30115,"target":17018,"rel":30116},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=aaron-bond.better-comments",[17020,17021],"Better Comments",": Improves the readability of comments in the code through colors and styles.",[1033,30120,30121,30126,30127,30132],{},[19,30122,30125],{"href":30123,"target":17018,"rel":30124},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=antfu.iconify",[17020,17021],"Iconify Intellisense",": If you want to work with icons, this extension allows you to search and insert icons from multiple libraries directly into your code. Additionally, I recommend exploring its library ",[19,30128,30131],{"href":30129,"target":17018,"rel":30130},"https:\u002F\u002Ficon-sets.iconify.design\u002F",[17020,17021],"Iconify"," where you can find a wide variety of free icon sets.",[29,30134],{},[12,30136,30137],{},"Well, that's it for this introductory guide to Vue 3 with Vite. I hope you found it useful for starting your journey with this framework and its ecosystem.",[29,30139],{},[3817,30141,30142],{},"html pre.shiki code .s_xSY, html code.shiki .s_xSY{--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .spP0B, html code.shiki .spP0B{--shiki-default:#B56959;--shiki-dark:#C98A7D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHLBJ, html code.shiki .sHLBJ{--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .snYqZ, html code.shiki .snYqZ{--shiki-default:#A0ADA0;--shiki-dark:#758575DD}html pre.shiki code .sTPum, html code.shiki .sTPum{--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .scnC2, html code.shiki .scnC2{--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .si6no, html code.shiki .si6no{--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .s9nN2, html code.shiki .s9nN2{--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .s5TCs, html code.shiki .s5TCs{--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .s8w-G, html code.shiki .s8w-G{--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sfsYZ, html code.shiki .sfsYZ{--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .sqbOQ, html code.shiki .sqbOQ{--shiki-default:#2F798A;--shiki-dark:#4C9A91}",{"title":79,"searchDepth":116,"depth":116,"links":30144},[30145,30146,30147,30148,30152,30153,30154,30159,30160,30161,30162],{"id":23622,"depth":103,"text":23623},{"id":23682,"depth":103,"text":23683},{"id":23702,"depth":103,"text":23703},{"id":24037,"depth":103,"text":24038,"children":30149},[30150,30151],{"id":24322,"depth":116,"text":24323},{"id":24404,"depth":116,"text":24405},{"id":25361,"depth":103,"text":25362},{"id":26689,"depth":103,"text":26690},{"id":27336,"depth":103,"text":27337,"children":30155},[30156,30157,30158],{"id":28215,"depth":116,"text":28216},{"id":28249,"depth":116,"text":28250},{"id":28330,"depth":116,"text":28331},{"id":28387,"depth":103,"text":28388},{"id":28532,"depth":103,"text":28533},{"id":29808,"depth":103,"text":29809},{"id":30088,"depth":103,"text":30089},"2025-12-04","\u002Fblog\u002Fgetting-started-vue-vite\u002Fshared\u002Fvite+vue.webp","2025-12-22",{},"\u002Fblog\u002Fblog\u002Fgetting-started-vue-vite",{"title":23610,"description":23615},{"loc":30170,"priority":3837,"lastmod":30165},"\u002Fblog\u002Fgetting-started-vue-vite","getting-started-vue-vite","blog\u002Fblog\u002Fgetting-started-vue-vite","A complete guide to configure your first Vue 3 project with Vite, including best practices and modern tools.",[30175,30176,30177],"Vue.js","Vite","Tailwind CSS","b6SxZbQcC3iRayzSkSVPR9EKbnU-AnUSqrWp6kaVGa8",1776805792058]