<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Artificial Corner: Behind AI 🤖]]></title><description><![CDATA[For everyone: Learn what's behind the AI products you love. No programming knowledge is required. Tech concepts (if any) will be explained in plain English.]]></description><link>https://artificialcorner.com/s/behind-ai</link><image><url>https://substackcdn.com/image/fetch/$s_!JsL9!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3e1cd4a-d846-4e20-ad60-d8573787c94d_1080x1080.png</url><title>Artificial Corner: Behind AI 🤖</title><link>https://artificialcorner.com/s/behind-ai</link></image><generator>Substack</generator><lastBuildDate>Thu, 23 Apr 2026 20:52:10 GMT</lastBuildDate><atom:link href="https://artificialcorner.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Frank Andrade]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[artificialcorner@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[artificialcorner@substack.com]]></itunes:email><itunes:name><![CDATA[Frank Andrade]]></itunes:name></itunes:owner><itunes:author><![CDATA[Frank Andrade]]></itunes:author><googleplay:owner><![CDATA[artificialcorner@substack.com]]></googleplay:owner><googleplay:email><![CDATA[artificialcorner@substack.com]]></googleplay:email><googleplay:author><![CDATA[Frank Andrade]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[What China’s Rise Means for the Future of AI]]></title><description><![CDATA[For many of us, it wouldn&#8217;t be surprising if, in the not-so-distant future, the global center of gravity for AI shifted from Silicon Valley to a Chinese city like Shenzhen or Beijing.]]></description><link>https://artificialcorner.com/p/what-chinas-rise-means-for-the-future</link><guid isPermaLink="false">https://artificialcorner.com/p/what-chinas-rise-means-for-the-future</guid><dc:creator><![CDATA[Kevin Gargate Osorio]]></dc:creator><pubDate>Tue, 25 Mar 2025 17:17:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Op_H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Op_H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Op_H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Op_H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241110,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://artificialcorner.com/i/159784940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Op_H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!Op_H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f4a8400-a7e2-49b2-8fa7-353b9b9c49e1_1024x1024.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image made with DALL-E 3</figcaption></figure></div><p>For many of us, it wouldn&#8217;t be surprising if, in the not-so-distant future, the global center of gravity for AI shifted from Silicon Valley to a Chinese city like Shenzhen or Beijing.</p><p>A series of telling developments in 2025 suggests that China is mounting a serious challenge to the United States' long-standing dominance in artificial intelligence.</p><p>The Chinese AI lab DeepSeek captured global attention in early 2025 when its chatbot app surged to the number one spot on both the Apple App Store and Google Play. This &#8220;DeepSeek moment&#8221; took technologists and Wall Street analysts by surprise. The company&#8212;relatively unknown at the time and based in Hangzhou&#8212;<a href="https://www.reuters.com/technology/artificial-intelligence/deepseek-rushes-launch-new-ai-model-china-goes-all-2025-02-25/#:~:text=The%20Chinese%20startup%20triggered%20a,that%20outperformed%20many%20Western%20competitors">delivered</a> an AI model on par with its Western counterparts, but developed at a significantly lower cost.</p><p>But the rise of DeepSeek has broader implications.</p><p>First, it validated China&#8217;s AI strategy focused on computational efficiency: training large-scale models using less advanced hardware.</p><p>Second, by open-sourcing its &#8230;</p>
      <p>
          <a href="https://artificialcorner.com/p/what-chinas-rise-means-for-the-future">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Behind AI #8: Here's Everything You Can Do With Python]]></title><description><![CDATA[Python is the language of choice for AI & data science. Discover what other things you can do with Python (plus free tutorials to get started).]]></description><link>https://artificialcorner.com/p/behind-ai-8-heres-everything-you</link><guid isPermaLink="false">https://artificialcorner.com/p/behind-ai-8-heres-everything-you</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 06 Feb 2025 18:05:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!D4dM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D4dM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D4dM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D4dM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:661103,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D4dM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!D4dM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb14f999f-9e19-4c26-81e5-a6b071681f3f_6000x4000.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Pexels</figcaption></figure></div><p>Whether you&#8217;re new to programming or an experienced developer, Python has one or two applications that might interest you.</p><p>The best thing is that you don&#8217;t need to be an expert programmer to get started with Python. Python&#8217;s syntax makes Python code similar to natural language, which makes it even easier for beginners to learn.</p><p>In this article, I&#8217;ll list all the things you can do with Python from simple applications that don&#8217;t require previous knowledge to advanced stuff that requires knowledge in other fields besides programming.</p><p>I&#8217;ll leave links to free tutorials to get you started.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Automation</h3><p>Probably the most fun and easiest application of Python is automation. You don&#8217;t need to become an expert in Python to build simple automation that will save you from doing repetitive tasks.</p><p>The only thing you need to do is find something worth automating and then learn the Python libraries that will help you automate this task.</p><h4>What can you automate with Python?</h4><p>What&#8217;s worth automating?&#8230;</p>
      <p>
          <a href="https://artificialcorner.com/p/behind-ai-8-heres-everything-you">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Behind AI #7: Top Python Libraries Any AI Enthusiast Should Know]]></title><description><![CDATA[Python libraries explained in plain English (with a bit of code).]]></description><link>https://artificialcorner.com/p/behind-ai-7-top-python-libraries</link><guid isPermaLink="false">https://artificialcorner.com/p/behind-ai-7-top-python-libraries</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 09 Oct 2024 15:59:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KvXs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KvXs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KvXs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KvXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KvXs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KvXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9438019-3eb2-48cc-bc9d-d67f18c695cd_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@johnschno?utm_source=medium&amp;utm_medium=referral">John Schnobrich</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Python is the language of choice in AI. It offers a large number of libraries that provide great functionality in mathematics, statistics, and scientific functions.</p><p>However, Python has applications beyond AI, so there are a good number of Python libraries that you will never use in an AI project.</p><p>In this article, I will show you the top Python libraries any AI enthusiast should know. and I will share resources to help you learn them.</p><p>Note: I added some lines of code to complement the explanation. That said, you don&#8217;t need to be an expert programmer to follow this article.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Python libraries for Data Collection</h3><p>Every data project starts with data collection. Sometimes the data is available in a CSV format or needs to be extracted from a database. However, when the data isn&#8217;t available, you could get public data from the biggest database in the world&#8202;&#8212;&#8202;the internet. The libraries below help you extract data from the internet with a technique called web scraping.</p><h4>Request &amp; Beautiful Soup</h4><p>By using both the Request and Beautiful Soup library we can extract data from websites that don&#8217;t run JavaScript.</p><p>The requests library helps us make HTTP requests in Python. Thanks to this, we can get the content of a website. Then we use a parser (e.g., html.parser, lxml, etc) and Beautiful Soup to extract any data within the website.</p><p>Let&#8217;s see an example:</p><pre><code><strong>import</strong> requests
<strong>from</strong> bs4 <strong>import</strong> BeautifulSoup

# sending request and parsing
website = requests.get('https://example.com').text
soup = BeautifulSoup(website, 'html.parser')

# extracting data
headlines = soup.find_all('span', class_='class-example')
data = [headline.text for headline in headlines]</code></pre><h4>Selenium/Scrapy</h4><p>Selenium and Scrapy do the same job as Beautiful Soup; however, they&#8217;re more powerful.</p><p>Both of them can extract data from JavaScript-driven websites. Selenium can be also used for web automation, while Scrapy is fast, allows you to easily export data to a database, and have other functionalities that make it the most complete tool.</p><p>Below you will find guides to start learning these libraries from scratch:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-5-web-scraping-in-python">&#8203;Beautiful Soup Guide</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-6-web-scraping-in-python">&#8203;Selenium Guide</a></p></li><li><p><a href="https://artificialcorner.com/p/ai-and-python-20-web-scraping-projects">4 Web Scraping Project to Automate Your Life</a></p></li></ul><h3>Python libraries for Data Cleaning &amp; Wrangling</h3><p>Once you have the data in a readable format (CSV, JSON, etc), it&#8217;s time to clean it. The Pandas and Numpy libraries can help with it.</p><h4>Pandas</h4><p>Pandas is a powerful tool that offers a variety of ways to manipulate and clean data. Pandas work with dataframes that structures data in a table similar to an Excel spreadsheet, but faster and with all the power of Python.</p><p>This is how you create a Pandas dataframe:</p><pre><code><strong>import</strong> pandas <strong>as</strong> pd

# data used for the example (stored in lists)
states = ["California", "Texas", "Florida", "New York"]
population = [39613493, 29730311, 21944577, 19299981]

# Storing lists within a dictionary
dict_states = {'States': states, 'Population': population}

# Creating the dataframe
df_population = pd.DataFrame.from_dict(dict_states)

print(df_population)</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A_2Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A_2Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 424w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 848w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 1272w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A_2Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png" width="289" height="224" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4764391-7e57-4057-ae87-e97853db84e4_289x224.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:224,&quot;width&quot;:289,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A_2Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 424w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 848w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 1272w, https://substackcdn.com/image/fetch/$s_!A_2Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4764391-7e57-4057-ae87-e97853db84e4_289x224.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><h4>Numpy</h4><p>Numpy is a Python library with math functionalities. It allows us to work with multi-dimensional arrays, matrices, generate random numbers, linear algebra routines, and more.</p><p>When it comes to wrangling and transforming data, some Numpy methods such as <code>np.where</code> and <code>np.select</code> are often used. In addition to that, other libraries such as Matplotlib, and Scikit-learn depend on NumPy to some extent.</p><p>Let&#8217;s see how to create a two-dimensional array with NumPy.</p><pre><code><strong>import</strong> numpy <strong>as</strong> np

b = np.array([[1.5,2,3], [4,5,6]],dtype=float)

IN [0]: print(b)
IN [1]: print(f'Dimension: {b.ndim}')

OUT [0]: [[1.5  2.  3. ]
          [4.   5.  6. ]]
OUT [1]: Dimension: 2</code></pre><h4>Imbalanced-learn</h4><p>Imbalanced-learn is a library that helps us deal with imbalanced data. Imbalanced data happens when the number of observations per class is not equally distributed. For example, in the review section of an Amazon product, you will typically see a high number of positive reviews (the majority class) and a low number of negative reviews (the minority class<em>).</em></p><p>We use the imbalanced-learn (imblearn) library to resample our data. For example, you can undersample positive reviews or oversample negative reviews.</p><p>Below you will find guides to start learning these libraries from scratch:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-18-ai-enthusiasts-should">Pandas &amp; Numpy Guide for Excel users</a></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Python libraries for Data Visualization</h3><p>Plots such as pie charts, bar plots, boxplots, and histograms are often used in Exploratory Data Analysis and also when presenting results. Python libraries allow us to make traditional as well as interactive plots.</p><h4>Matplotlib/Seaborn</h4><p>Matplotlib is a library that allows us to make basic plots, while Seaborn specializes in statistics visualization.</p><p>The main difference is in the lines of code you need to write to create a plot. Seaborn is easier to learn, has default themes, and makes better-looking plots than Matplotlib by default.</p><p>Let&#8217;s create a barplot of the <code>df_population</code> dataframe we created in the Pandas section.</p><pre><code><strong>import</strong> matplotlib.pyplot <strong>as</strong> plt

plt.bar(x=df_population['States'],
        height=df_population['Population'])

plt.xlabel('States')
plt.ylabel('Population')
plt.show()</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S_NS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S_NS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 424w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 848w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 1272w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S_NS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png" width="386" height="273" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:273,&quot;width&quot;:386,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S_NS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 424w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 848w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 1272w, https://substackcdn.com/image/fetch/$s_!S_NS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652195f7-4c01-462f-9ecc-fe6bec97d5b0_386x273.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>Now let&#8217;s create the same plot with Seaborn.</p><pre><code><strong>import</strong> seaborn <strong>as</strong> sns

sns.barplot(x=df_population['States'],
            y=df_population['Population'],
            palette='deep')
plt.show()</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QZp8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QZp8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 424w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 848w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 1272w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QZp8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png" width="386" height="273" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:273,&quot;width&quot;:386,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QZp8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 424w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 848w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 1272w, https://substackcdn.com/image/fetch/$s_!QZp8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4264cb59-0131-44ee-a163-a1935a1c2973_386x273.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>As you can see, we don&#8217;t need to specify the axes names in Seaborn (it takes it from the dataframe columns), while Matplotlib needs more lines of code and the plots aren&#8217;t good looking at all by default.</p><h4>Plotly/Bokeh (Pandas integration)</h4><p>If you want to go to the next level, you should try making interactive visualization with Plotly or Bokeh. Both allow creating a good number of interactive plots and the coolest thing is that you can use any of them to plot directly with Pandas plotting syntax.</p><p>Both make it easy to plot interactive visualization, but in my opinion, Plotly creates better-looking plots by default.</p><p>Here&#8217;s an example of how to create interactive plots with Plotly using Pandas plotting syntax.</p><pre><code><strong>import</strong> pandas <strong>as</strong> pd
<strong>import</strong> cufflinks <strong>as</strong> cf
<strong>from</strong> IPython.display <strong>import</strong> display,HTML
cf.set_config_file(sharing='public',theme='white',offline=True) 

df_population = df_population.set_index('States')
df_population.iplot(kind='bar', color='red',
                    xTitle='States', yTitle='Population')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eDvh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eDvh!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 424w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 848w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eDvh!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif" width="1268" height="650" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1268,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eDvh!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 424w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 848w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!eDvh!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aebcfb7-2c76-431d-b139-6abfcecd5bc7_1268x650.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><h4>Wordcloud/Stylecloud</h4><p>Wordclouds allows us to identify keywords in a piece of text. Python has two libraries for this type of graphs &#8212;wordclouds and stylecloud.</p><p>The first makes basic wordclouds and even allows us to upload our own image as a mask for the wordcloud, while the second creates gorgeous wordclouds with a few lines of codes and offers a good number of high-quality icons that you can use in your wordcloud.</p><p>Let&#8217;s make a wordcloud of the famous Steve Job&#8217;s speech at Standford.</p><pre><code><strong>import</strong> stylecloud

stylecloud.gen_stylecloud(file_path='SJ-Speech.txt',
                          icon_name= "fas fa-apple-alt")</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jF_F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jF_F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 424w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 848w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 1272w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jF_F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jF_F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 424w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 848w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 1272w, https://substackcdn.com/image/fetch/$s_!jF_F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59fc715a-4b12-42ed-9f34-8dc9ab472332_512x512.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That&#8217;s all you need to make this wordcloud! You can remove stopwords and use other functionalities. For more details, check my wordcloud guide.</p><p>Below you will find guides to start learning these libraries from scratch:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-19-how-to-create-beautiful">Matplotlib &amp; Seaborn Guide</a></p></li></ul><h3>Python libraries used in AI &amp; ML models</h3><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/behind-ai-7-top-python-libraries">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Behind AI #6: The 4 Stages of Learning Python for AI & ML]]></title><description><![CDATA[What stage are you in?]]></description><link>https://artificialcorner.com/p/behind-ai-6-the-4-stages-of-learning</link><guid isPermaLink="false">https://artificialcorner.com/p/behind-ai-6-the-4-stages-of-learning</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Fri, 27 Sep 2024 13:11:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eQKx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eQKx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eQKx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eQKx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1684479,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eQKx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!eQKx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4263d156-0a71-42ce-bf4e-f1d05a62d821_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image made with Midjourney</figcaption></figure></div><blockquote><p><em>As we&#8217;ve seen in previous articles <a href="https://artificialcorner.com/p/behind-ai-1-how-to-learn-python-with">Python is the language of choice for AI</a>. In this article, I present you the 4 stages to learn Python for AI &amp; Machine Learning. I left many links to resources that will come in handy for you.</em></p></blockquote><p>Python is the most popular language in the AI community due to its simplicity, flexibility, and data science libraries such as Pandas, Numpy, and Scikit-learn. This is why, in this article, we will see the Python stuff you need for AI and Machine Learning and discover what stage you&#8217;re in.</p><p>I&#8217;ll describe each stage and give you tips on how to master them so that you can move to the next stage.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Stage 1: The Basics of&nbsp;Python</h3><p>This stage is for anyone who is learning the basics of Python.</p><p>At this level, you should at least know basic concepts such as data types and variables. Knowing the most popular options to store data (lists, dictionaries, and tuples.) is a must at this level. Also, you should be able to use conditional statements and control flow tools. This includes the if/else statements, boolean operations, and different types of loops (for, while, and nested).</p><p>Conditional statements, control flow, and loops open the door for a large variety of things you can do with Python, so use them and stay curious to develop a strong foundation necessary for the next stage.</p><p>One last important thing at this level is to start getting familiar with Jupyter Notebook. Jupyter allows us to create not only code but equations, visualizations, and text.</p><p><strong>Topics:</strong> Data types, variables, lists, dictionaries, tuples, conditions, operators, control flow (if / else), loops, iterables, functions, file I/O operations (read, write to text files), and common methods.</p><p><strong>How to master this level? </strong>As I mentioned before, solving problems that involve conditional statements, control flow, and loops will help you master stage 1. </p><blockquote><p>Projects for beginners:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-10-automate-4-boring-tasks">Automate 4 Boring Tasks in Python with 5 Lines of Code</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-11-how-to-automate-emails">How to Automate Emails with Python</a></p></li></ul></blockquote><h3>Stage 2: Python for Data&nbsp;Analysis</h3><p>This is what I call the &#8220;essential Python stuff to work with data.&#8221; This means having at least a basic understanding of libraries used for data analysis such as Pandas, NumPy, Matplotlib, and Seaborn.</p><p>Using those libraries to solve common data analysis tasks such as data cleaning, exploratory data analysis (EDA) through visualizations, and feature engineering is important at this level.</p><blockquote><p>Data analysis tutorials:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-18-ai-enthusiasts-should">Pandas &amp; Numpy for beginners</a></p></li><li><p><a href="https://youtu.be/oK3_YzUG4xc">Data Cleaning</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-19-how-to-create-beautiful">Data Visualization</a></p></li></ul></blockquote><p>If you&#8217;re able to understand the code in the tutorials above, then you&#8217;re at this stage. </p><p>Regarding the stuff you already knew in stage 1, there&#8217;s still room for improvement&#8202;&#8212;&#8202;especially for the stuff you would frequently use for data analysis. Some of them are list comprehension, lambda, zip(), f-string, and the <code>with</code> statement.</p><p>Last but not least, acquiring skills necessary for data collection like web scraping will come in handy. Below are guides to learning web scraping from scratch.</p><blockquote><p>Web scraping guides:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-4-the-easiest-way-to-web">Web scraping with pandas</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-5-web-scraping-in-python">Web scraping with Beautiful Soup</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-6-web-scraping-in-python">Web scraping with Selenium</a></p></li></ul></blockquote><p><strong>Topics</strong>: Most of the methods/functions used in Pandas, NumPy, Matplotlib, Seaborn, and web scraping libraries (Selenium and Scrapy). List comprehension, lambda, zip(), f-string, the <code>with</code> statement, and any other stuff that helps you write better code.</p><p><strong>How to master this level? </strong>Solving Python projects. At this stage, projects usually involve all the data analysis libraries mentioned before. Make sure you start projects that have topics you&#8217;re interested in (that&#8217;s more fun!)</p><blockquote><p>Projects for stage 2:</p><ul><li><p><a href="https://artificialcorner.com/p/ai-and-python-20-web-scraping-projects">4 Web Scraping Projects That Will Help Automate Your Life</a></p></li><li><p><a href="https://youtu.be/yat7soj__4w?si=9-l3Z6CN64h8caS-">Predicting Football Games With a Simple Model</a></p></li></ul></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Stage 3: Python for Statistics &amp;&nbsp;Math</h3><p>In Stage 3 different fields get together, so your Python project will become an ML project. You already know how to clean data and conduct EDA from stage 2, but also you&#8217;re supposed to know all the fundamental statistics and math behind ML.</p><p>Statistics is crucial to make sure the data you are using to train a model is not biased. For example, using Matplotlib and Seaborn to plot histograms and boxplots will help you identify outliers. In addition to that, you should know how to apply most statistical concepts to a project. You should know how to deal with imbalanced data, segment train/test data, and formulate a problem and hypothesis.</p><p>Some topics in math you should know are functions and matrices. This stuff is implemented in Python through Numpy. Numpy has support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.</p><p>Another important thing you should understand is how machine learning algorithms work. There&#8217;s a lot of math and statistics behind those algorithms, so make sure you understand them before learning the Python code that lets you build them.</p><blockquote><p>Guides for stage 3:</p><ul><li><p><a href="https://artificialcorner.com/p/behind-ai-1-machine-learning-algorithms">Machine Learning Algorithms Any AI Enthusiast Should Know</a> (Part 1)</p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-5-machine-learning-algorithms">Machine Learning Algorithms Any AI Enthusiast Should Know</a> (Part 2)</p></li></ul></blockquote><p><strong>Topics</strong>: Imbalanced data, segment train/test data, machine learning algorithms, arrays/matrices (Numpy), data visualization (Matplotlib/Seaborn). Above all, you should know how to apply statistics and math to a project.</p><p><strong>How to master this level? </strong>Solving projects such as sentiment analysis, credit card fraud detection, and customer churn prediction. </p><h3>Stage 4: Python for Machine&nbsp;Learning</h3><p>The last stage is all about developing machine learning models. The scikit-learn library is a good start to this. Some basic things you should be able to do with this library are text representation (BOW, Count Vectorizer, TF-IDF), model selection, evaluation, and parameter tuning. <a href="https://artificialcorner.com/p/ai-and-python-25-lets-build-your">This project</a> covers all these topics. If you&#8217;re able to understand the code, then you&#8217;re at this level.</p><p>Other important libraries for data scientists at this level are Keras and TensorFlow. Keras features several of the building blocks and tools necessary for creating a neural network such as neural layers, activation and cost functions, objectives, etc. TensorFlow is one of the best library available for working with Machine Learning on Python. It makes machine learning model building easy for beginners and professionals alike.</p><blockquote><p>Guides for stage 4:</p><ul><li><p><a href="https://artificialcorner.com/p/ai-and-python-25-lets-build-your">Building a Basic Machine Learning Model in Python</a></p></li><li><p><a href="https://artificialcorner.com/p/behind-ai-4-what-is-nlp-and-why-is">What is NLP And Why is Important in AI </a> (7 NLP Techniques)</p></li></ul></blockquote><p><strong>Topics</strong>: Text representation, model selection, evaluation, and parameter tuning, among others.</p><p><strong>How to master this level and beyond? </strong>This will depend on the area you&#8217;re interested in. Find an area you like and learn the necessary libraries you need for it. For example, if you&#8217;re into NLP, learning NLTK and solving projects like building a movie recommender system or a chatbot would help you get started in this area.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/behind-ai-6-the-4-stages-of-learning?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/behind-ai-6-the-4-stages-of-learning?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Behind AI #5: Machine Learning Algorithms Any AI Enthusiast Should Know - Part 2]]></title><description><![CDATA[Machine learning algorithms explained in plain English]]></description><link>https://artificialcorner.com/p/algorithms-2</link><guid isPermaLink="false">https://artificialcorner.com/p/algorithms-2</guid><dc:creator><![CDATA[Kevin Gargate Osorio]]></dc:creator><pubDate>Wed, 18 Sep 2024 13:25:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RGmy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RGmy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RGmy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RGmy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:447582,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RGmy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!RGmy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8a5290-30ff-453b-bd91-8ab0c9a6d900_1024x1024.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image made with DALL-E 3</figcaption></figure></div><p>In this second part, we will continue exploring how some algorithms used in Machine Learning work. As we discussed in the <a href="https://artificialcorner.com/p/behind-ai-1-machine-learning-algorithms">first part</a>, there are both supervised and unsupervised algorithms.</p><p>Let&#8217;s see 6 more algorithms you should know.</p><h4><strong>1.K-Nearest Neighbors (kNN)</strong></h4><p>KNN algorithm is a supervised learning technique used for both classification and regression. It&#8217;s a simple yet practical method for making predictions. The goal is to find the "k" nearest observations in the feature space and make a decision based on the labels of these neighbors.</p><p>Let's break down the key concepts to get a better understanding of how this algorithm works:</p><ul><li><p>The value of "k" is an integer that defines how many neighboring points will be considered.</p></li><li><p><strong>Distance:</strong> To measure how close two points are, a distance metric is usually used. The most common is Euclidean distance, though others like Manhattan, Minkowski, and more can also be applied.</p></li><li><p>If we use it for <strong>classification</strong>, the new point is assigned t&#8230;</p></li></ul>
      <p>
          <a href="https://artificialcorner.com/p/algorithms-2">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Behind AI #4: What is NLP And Why is Important in AI]]></title><description><![CDATA[This is what makes chatbots possible.]]></description><link>https://artificialcorner.com/p/nlp</link><guid isPermaLink="false">https://artificialcorner.com/p/nlp</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Mon, 02 Sep 2024 14:17:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_vnL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_vnL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_vnL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_vnL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80418,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_vnL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_vnL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e0bfa1-0398-4875-8dba-3ac5e1130369_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Via <a href="https://pixabay.com/es/photos/audio-la-pnl-5418642/">Pixabay</a></figcaption></figure></div><blockquote><p><em>Natural language processing (NLP) is a subfield of AI that uses machine learning to enable computers to understand and communicate with human language. NLP is used in various AI applications like chabots.</em></p><p><em>Today, we&#8217;ll learn some common NLP techniques. We&#8217;ll focus on the concepts. That said, I added some lines of Python code to better understand the techniques with examples (you don&#8217;t need to know coding to understand the examples though).</em></p></blockquote><p>Natural Language Processing (NLP) is focused on enabling computers to understand and process human language. Computers are great at working with structured data like spreadsheets; however, a lot of the data we generate is <a href="https://artificialcorner.com/p/behind-ai-3-vector-databases-taking">unstructured</a>.</p><p>We can implement many NLP techniques with just a few lines of Python code thanks to open-source libraries such as spaCy and NLTK. In this article, we&#8217;ll dive into the world of NLP by learning some common techniques.</p><pre><code><strong>Table of Contents
</strong>1. Sentiment Analysis
2. Named Entity Recognition (NER)
3. Stemming
4. Lemmatization
5. Bag of Words (BoW)
6. Term Frequency&#8211;Inverse Document Frequency (TF-IDF)
7. Bonus: Wordcloud</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>1. Sentiment Analysis</h3><p>Sentiment Analysis is a popular NLP technique that involves taking a piece of text (e.g., a comment, review, or a document) and determining whether it&#8217;s positive, negative, or neutral. It has many applications in healthcare, customer service, banking, etc.</p><h4>Python Implementation</h4><p>For simple cases, in Python, we can use VADER (Valence Aware Dictionary for Sentiment Reasoning) which is available in the NLTK package and can be applied directly to unlabeled text data. </p><p>As an example, let&#8217;s get all sentiment scores of the lines spoken by characters in a TV show. First, we wrangle a dataset available on <a href="https://www.kaggle.com/ekrembayar/avatar-the-last-air-bender">Kaggle</a> named &#8216;avatar.csv&#8217;, and then with VADER we calculate the score of each line spoken. All of this is stored in the <code>df_character_sentiment</code> dataframe.</p><pre><code><strong>import</strong> pandas <strong>as</strong> pd
<strong>import</strong> nltk
<strong>from</strong> nltk.sentiment.vader <strong>import</strong> SentimentIntensityAnalyzer

# reading and wragling data
df_avatar = pd.read_csv('avatar.csv', engine='python')
df_avatar_lines = df_avatar.groupby('character').count()
df_avatar_lines = df_avatar_lines.sort_values(by=['character_words'], ascending=False)[:10]
top_character_names = df_avatar_lines.index.values

# filtering out non-top characters
df_character_sentiment = df_avatar[df_avatar['character'].isin(top_character_names)]
df_character_sentiment = df_character_sentiment[['character', 'character_words']]

# calculating sentiment score
sid = SentimentIntensityAnalyzer()
df_character_sentiment.reset_index(inplace=True, drop=True)
df_character_sentiment[['neg', 'neu', 'pos', 'compound']] = df_character_sentiment['character_words'].apply(sid.polarity_scores).apply(pd.Series)
df_character_sentiment</code></pre><p>In the <code>df_character_sentiment</code> below, we can see that every sentence receives a negative, neutral, and positive score.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xWTK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xWTK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 424w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 848w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 1272w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xWTK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png" width="582" height="374" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:374,&quot;width&quot;:582,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xWTK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 424w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 848w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 1272w, https://substackcdn.com/image/fetch/$s_!xWTK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc46baeb1-783a-4812-9b46-fe7a4eb15247_582x374.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>We could group the scores by character and calculate the mean to obtain the sentiment score for a character and then represent it with horizontal bar plots as shown below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QRR2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QRR2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 424w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 848w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 1272w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QRR2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png" width="700" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QRR2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 424w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 848w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 1272w, https://substackcdn.com/image/fetch/$s_!QRR2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3330f094-3837-42e2-902c-5860c4e93dc0_700x501.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em>Note: VADER is optimized for social media text, so we should take the results with a grain of salt. You can use a more complete algorithm or develop your own with machine learning libraries. In the link below, there&#8217;s a complete guide on how to create one from scratch with Python using the sklearn library.</em></p></blockquote><h3>2. Named Entity Recognition (NER)</h3><p>Named Entity Recognition is a technique used to locate and classify named entities in text into categories such as persons, organizations, locations, expressions of times, quantities, monetary values, percentages, etc. It&#8216;s used for optimizing search engine algorithms, recommendation systems, customer support, content classification, etc.</p><h4>Python Implementation</h4><p>In Python, we can use SpaCy&#8217;s named entity recognition that supports the following entity types.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8m30!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8m30!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 424w, https://substackcdn.com/image/fetch/$s_!8m30!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 848w, https://substackcdn.com/image/fetch/$s_!8m30!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 1272w, https://substackcdn.com/image/fetch/$s_!8m30!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8m30!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png" width="511" height="494" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:494,&quot;width&quot;:511,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8m30!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 424w, https://substackcdn.com/image/fetch/$s_!8m30!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 848w, https://substackcdn.com/image/fetch/$s_!8m30!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 1272w, https://substackcdn.com/image/fetch/$s_!8m30!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc5d0b9-84cf-4068-90be-63170072e180_511x494.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source (Spacy documentation)</figcaption></figure></div><p>To see it in action, we first import <code>spacy</code>, and then create a <code>nlp</code> variable that will store the <code>en_core_web_sm</code> pipeline. This is a small English pipeline trained on written web text (blogs, news, comments), that includes vocabulary, vectors, syntax, and entities. To find the entities, we apply nlp to a sentence.</p><p>Let&#8217;s do a test with the following sentence "Biden invites Ukrainian president to White House this summer."</p><pre><code><strong>import</strong> spacy

nlp = spacy.load("en_core_web_sm")
doc = nlp("Biden invites Ukrainian president to White House this summer")

print([(X.text, X.label_) for X in doc.ents])</code></pre><p>Here are the entities we get.</p><pre><code>[('Biden', 'PERSON'), ('Ukrainian', 'GPE'), ('White House', 'ORG'), ('this summer', 'DATE')]</code></pre><p>Spacy found that &#8220;Biden&#8221; is a person, &#8220;Ukranian&#8221; is GPE (countries, cities, states, &#8220;White House&#8221; is an organization, and &#8220;this summer&#8221; is a date.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>3. Stemming &amp; Lemmatization</h3><p>Stemming and lemmatization are 2 popular techniques in NLP. Both normalize a word but in different ways.</p><ul><li><p><strong>Stemming:</strong> It truncates a word to its stem word. For example, the words &#8220;friends,&#8221; &#8220;friendship,&#8221; and &#8220;friendships&#8221; will be reduced to <strong>&#8220;friend.&#8221; </strong>Stemming may not give us a dictionary, or grammatical word for a particular set of words.</p></li><li><p><strong>Lemmatization</strong>: Unlike the stemming technique, lemmatization finds the dictionary word instead of truncating the original word. Lemmatization algorithms extract the correct lemma of each word, so they often require a dictionary of the language to be able to categorize each word correctly.</p></li></ul><p>Both techniques are widely used and you should choose them wisely based on your project&#8217;s goals. Lemmatization has a lower processing speed, compared to stemming so if accuracy is not the project&#8217;s goal but speed, then stemming is an appropriate approach; however. if accuracy is crucial, then consider using lemmatization.</p><p>Python&#8217;s library NLTK makes it easy to work with both techniques. Let&#8217;s see it in action.</p><h4>Python Implementation (Stemming)</h4><p>For the English language, there are two popular libraries available in nltk&#8202;&#8212;&#8202;Porter Stemmer and LancasterStemmer.</p><pre><code><strong>from</strong> nltk.stem <strong>import</strong> PorterStemmer
<strong>from</strong> nltk.stem <strong>import</strong> LancasterStemmer

# PorterStemmer
porter = PorterStemmer()
# LancasterStemmer
lancaster = LancasterStemmer()

print(porter.stem("friendship"))
print(lancaster.stem("friendship"))</code></pre><p>PorterStemmer algorithm doesn&#8217;t follow linguistics, but a set of 5 rules for different cases that are applied in phases to generate stems. The <code>print(porter.stem(&#8220;friendship&#8221;))</code> code will print the word <code>friendship</code></p><p>LancasterStemmer is simple, but heavy stemming due to iterations and over-stemming may occur. This causes the stems to be not linguistic, or they may have no meaning. The <code>print(lancaster.stem(&#8220;friendship&#8221;))</code> code will print the word <code>friend</code>.</p><p>You can try any other word to see how both algorithms differ. In the case of other languages, you can import <code>SnowballStemme </code>from <code>nltk.stem</code></p><h4>Python Implementation (Lemmatization)</h4><p>We&#8217;ll use NLTK again, but this time we import <code>WordNetLemmatizer</code> as shown in the code below.</p><pre><code><strong>from</strong> nltk <strong>import</strong> WordNetLemmatizer

lemmatizer = WordNetLemmatizer()
words = ['articles', 'friendship', 'studies', 'phones']

for word in words:
    print(lemmatizer.lemmatize(word))</code></pre><p>Lemmatization generates different outputs for different Part Of Speech (POS) values. Some of the most common POS values are verb (v), noun (n), adjective (a), and adverb (r). The default POS value in lemmatization is a noun, so the printed values for the previous example will be <code>article</code>, <code>friendship</code>, <code>study</code> and <code>phone</code>.</p><p>Let&#8217;s change the POS<em> </em>value to verb (v).</p><pre><code>from nltk import WordNetLemmatizer

lemmatizer = WordNetLemmatizer()
words = ['be', 'is', 'are', 'were', 'was']

for word in words:
    print(lemmatizer.lemmatize(word, pos='v'))</code></pre><p>In this case, Python will print the word <code>be</code> for all the values in the list.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>5. Bag of&nbsp;Words</h3><p>The Bag of Words (BoW) model is a representation that turns text into fixed-length vectors. This helps us represent text into numbers so we can use it for machine learning models. The model doesn&#8217;t care about the word order, but it&#8217;s only concerned with the frequency of words in the text. It has applications in NLP, information retrieval from documents, and classifications of documents.</p><p>The typical BoW workflow involves cleaning raw text, tokenization, building a vocabulary, and generating vectors.</p><h4>Python Implementation</h4><p>Python&#8217;s library sklearn contains a tool called CountVectorizer that takes care of most of the BoW workflow.</p><p>Let&#8217;s use the following 2 sentences as examples.</p><p><strong>Sentence 1: </strong>&#8220;I love writing code in Python. I love Python code&#8221;</p><p><strong>Sentence 2: </strong>&#8220;I hate writing code in Java. I hate Java code&#8221;</p><p>Both sentences will be stored in a list named <code>text</code>. Then we&#8217;re going to create a dataframe <code>df</code> to store this <code>text</code> list. After this, we&#8216;ll initiate an instance of CountVectorizer<code>(cv)</code>, and then we&#8217;ll fit and transform the text data to obtain the numeric representation. This will be stored in a document-term matrix <code>df_dtm</code>.</p><pre><code><strong>import</strong> pandas <strong>as</strong> pd
<strong>from</strong> sklearn.feature_extraction.text <strong>import</strong> CountVectorizer

text = ["I love writing code in Python. I love Python code",
        "I hate writing code in Java. I hate Java code"]

df = pd.DataFrame({'review': ['review1', 'review2'], 'text':text})
cv = CountVectorizer(stop_words='english')
cv_matrix = cv.fit_transform(df['text'])
df_dtm = pd.DataFrame(cv_matrix.toarray(),
                      index=df['review'].values,
                      columns=cv.get_feature_names())
df_dtm</code></pre><p>The BoW representation made with CountVectorizer stored in <code>df_dtm </code>looks like the picture below. Keep in mind that words with 2 letters or fewer are not taken into account by the CountVectorizer.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iISR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iISR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 424w, https://substackcdn.com/image/fetch/$s_!iISR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 848w, https://substackcdn.com/image/fetch/$s_!iISR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 1272w, https://substackcdn.com/image/fetch/$s_!iISR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iISR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png" width="459" height="105" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:105,&quot;width&quot;:459,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iISR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 424w, https://substackcdn.com/image/fetch/$s_!iISR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 848w, https://substackcdn.com/image/fetch/$s_!iISR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 1272w, https://substackcdn.com/image/fetch/$s_!iISR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28eda185-a59d-4627-a73e-18de8f91bf74_459x105.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>As you can see the numbers inside the matrix represent the number of times each word was mentioned in each review. Words like &#8220;love,&#8221; &#8220;hate,&#8221; and &#8220;code&#8221; have the same frequency (2) in this example.</p><p>Overall, we can say that CountVectorizer does a good job tokenizing text, building a vocabulary, and generating vectors.</p><h3>6. Term Frequency&#8211;Inverse Document Frequency (TF-IDF)</h3><p>Unlike the CountVectorizer, the TF-IDF computes &#8220;weights&#8221; that represent how relevant a word is to a document in a collection of documents (aka corpus). The TF-IDF value increases proportionally to the number of times a word appears in the document and is offset by the number of documents in the corpus that contain the word.<strong> Simply put, the higher the TF-IDF score, the rarer or unique or valuable the term and vice versa. </strong>It has applications in information retrieval like search engines that aim to deliver results that are most relevant to what you&#8217;re searching for.</p><p>Before we see the Python implementation, let&#8217;s see an example so you have an idea of how the TF and IDF are calculated. For the following example, we&#8217;ll use the same sentences used for the CountVectorizer example.</p><p><strong>Sentence 1:</strong> &#8220;I love writing code in Python. I love Python code&#8221;</p><p><strong>Sentence 2: </strong>&#8220;I hate writing code in Java. I hate Java code&#8221;</p><h4>Term Frequency (TF)</h4><p>There are different ways to define the term frequency. One suggests the raw count itself (i.e., what the Count Vectorizer does), but others suggest it&#8217;s the frequency of the word in the sentence divided by the total number of words in the sentence<em>. </em></p><p>For this simple example, we&#8217;ll use the first criteria. The term frequency is shown in the following table.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!znzj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!znzj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 424w, https://substackcdn.com/image/fetch/$s_!znzj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 848w, https://substackcdn.com/image/fetch/$s_!znzj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 1272w, https://substackcdn.com/image/fetch/$s_!znzj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!znzj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png" width="729" height="358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:358,&quot;width&quot;:729,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!znzj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 424w, https://substackcdn.com/image/fetch/$s_!znzj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 848w, https://substackcdn.com/image/fetch/$s_!znzj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 1272w, https://substackcdn.com/image/fetch/$s_!znzj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e9338d-3846-4e11-934b-ed0b2d9a6aa8_729x358.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>As you can see, the values are the same as the ones calculated for the CountVectorizer before. Also, words with 2 letters or fewer are not taken into account.</p><h4>Inverse Document Frequency (IDF)</h4><p>The IDF is also calculated in different ways. Although standard textbook notation defines the IDF as idf(t) = log [ n / (df(t) + 1), the sklearn library we&#8217;ll use later in Python calculates the formula by default as follows.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4_N8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4_N8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 424w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 848w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 1272w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4_N8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png" width="637" height="125" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84974128-10b7-43cd-9168-56ca641574cc_637x125.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:125,&quot;width&quot;:637,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4_N8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 424w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 848w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 1272w, https://substackcdn.com/image/fetch/$s_!4_N8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84974128-10b7-43cd-9168-56ca641574cc_637x125.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Also, sklearn assumes natural logarithm <code>ln</code> instead of <code>log</code> and smoothing <em>(smooth_idf=True)</em>. Let&#8217;s calculate the IDF values for each word as sklearn will do it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h_rA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h_rA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 424w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 848w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 1272w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h_rA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png" width="800" height="323" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:323,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h_rA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 424w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 848w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 1272w, https://substackcdn.com/image/fetch/$s_!h_rA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff359ed7f-9258-420f-ac6f-59c1604c0ee4_800x323.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><h4>TF-IDF</h4><p>Once we have the TF and IDF values, we can obtain the TF-IDF by multiplying both values (TF-IDF = TF * IDF). The values are shown in the table below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U1Xf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U1Xf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 424w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 848w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 1272w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U1Xf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png" width="800" height="325" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:325,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U1Xf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 424w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 848w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 1272w, https://substackcdn.com/image/fetch/$s_!U1Xf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45599e70-cb63-4e61-88ef-ce2f849157a3_800x325.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><h4>Python Implementation</h4><p>Calculating the TF-IDF shown in the table above in Python requires a few lines of code thanks to the sklearn library.</p><pre><code><strong>import</strong> pandas <strong>as</strong> pd
<strong>from</strong> sklearn.feature_extraction.text <strong>import</strong> TfidfVectorizer

text = ["I love writing code in Python. I love Python code",
        "I hate writing code in Java. I hate Java code"]

df = pd.DataFrame({'review': ['review1', 'review2'], 'text':text})
tfidf = TfidfVectorizer(stop_words='english', norm=None)
tfidf_matrix = tfidf.fit_transform(df['text'])
df_dtm = pd.DataFrame(tfidf_matrix.toarray(),
                      index=df['review'].values,
                      columns=tfidf.get_feature_names())
df_dtm</code></pre><p>The TF-IDF representation stored in <code>df_dtm </code>is presented below.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JMet!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JMet!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 424w, https://substackcdn.com/image/fetch/$s_!JMet!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 848w, https://substackcdn.com/image/fetch/$s_!JMet!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 1272w, https://substackcdn.com/image/fetch/$s_!JMet!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JMet!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png" width="549" height="114" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:114,&quot;width&quot;:549,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JMet!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 424w, https://substackcdn.com/image/fetch/$s_!JMet!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 848w, https://substackcdn.com/image/fetch/$s_!JMet!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 1272w, https://substackcdn.com/image/fetch/$s_!JMet!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44b7ee57-a336-4d29-925b-7dd6069f7868_549x114.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><blockquote><p><em>Note: By default TfidfVectorizer() uses l2 normalization, but to use the same formulas shown above we set </em><code>norm=None</code><em> as a parameter. For more details of the formulas used by default in sklearn and how you can customize it check its <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfTransformer.html">documentation</a>.</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Bonus: Wordcloud</h3><p>Wordcloud is a popular technique that helps us identify the keywords in a text. It&#8217;s not considered as a NLP technique but it still uses some of the techniques explained in this article.</p><p>In a wordcloud, more frequent words have a larger and bolder font, while less frequent words have smaller or thinner fonts. In Python, you can make simple wordclouds with the <code>wordcloud</code> library and nice-looking wordclouds with the <code>stylecloud</code>library.</p><p>Below you can find the code to make a wordcloud in Python. I&#8217;m using a text file of a Steve Jobs speech.</p><pre><code><strong>import</strong> stylecloud

stylecloud.gen_stylecloud(file_path='SJ-Speech.txt',
                          icon_name= "fas fa-apple-alt")</code></pre><p>This is the result of the code above.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xelw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xelw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 424w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 848w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 1272w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xelw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xelw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 424w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 848w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 1272w, https://substackcdn.com/image/fetch/$s_!Xelw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaf4bc67-0418-4ea2-8427-8dcd2e11f654_512x512.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>Wordclouds are popular because they&#8217;re engaging, easy to understand, and easy to create.</p><p>You can take customization even further by changing the colors, removing stopwords, choosing your image, or even adding your own image as a mask of the wordcloud.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/nlp?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/nlp?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/nlp/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/nlp/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[Behind AI #3: Vector Databases - Taking Data Revolution to The Next Level]]></title><description><![CDATA[Here's how AI-centric vector databases are gaining their place in modern software stacks.]]></description><link>https://artificialcorner.com/p/vector-database</link><guid isPermaLink="false">https://artificialcorner.com/p/vector-database</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 28 Aug 2024 13:10:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!kR5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kR5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kR5p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kR5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33075,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kR5p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kR5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e90691-33ae-44e7-9580-c8cf0e0af2af_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em>In the previous article</em> <em>of our <a href="https://artificialcorner.com/s/behind-ai">Behind AI</a> series, we explained in plain English what  databases are and compared the top DBMS. Today, we&#8217;ll focus on a type of database that has become increasingly important in AI: vector databases.</em></p></blockquote><p>The internet contains a huge amount of data in different forms. In the past, this data was mostly structured, but as the internet grew, unstructured data such as photos, audio, text, and video files became more common.</p><p>Analysts estimate that 80-90% of any organization&#8217;s data is unstructured, so how can we deal with this unstructured data?</p><p>Traditional relational databases and NoSQL databases struggle to analyze unstructured data especially when it comes to doing it in real-time. Here&#8217;s when vector databases can help. They were built to manage massive embeddings vectors converted from unstructured data.</p><p>In this article, we&#8217;ll learn more about vector databases, how they can help us manage unstructured data, and the solutions they offer.</p><h3>Vector Databases vs Tradition&#8230;</h3>
      <p>
          <a href="https://artificialcorner.com/p/vector-database">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Behind AI #2: What Is a Database and Why Is Important in AI]]></title><description><![CDATA[Here's everything you need to know about databases]]></description><link>https://artificialcorner.com/p/database</link><guid isPermaLink="false">https://artificialcorner.com/p/database</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Mon, 26 Aug 2024 13:19:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Q6QL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q6QL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q6QL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 424w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 848w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 1272w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q6QL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp" width="720" height="540" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:540,&quot;width&quot;:720,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:21914,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q6QL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 424w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 848w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 1272w, https://substackcdn.com/image/fetch/$s_!Q6QL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bd5531f-6382-40ee-a95e-c4a39b217d71_720x540.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Via Shutterstock</figcaption></figure></div><blockquote><p><em>Hi!</em></p><p><em>Data is <a href="https://artificialcorner.com/p/data-an-important-resource-in-the">an important resource in AI</a>. Companies store data in different types of databases and today we&#8217;ll learn everything about them (in the next article, we&#8217;ll focus on a type of database that is specially used in AI, so stay tuned!)</em></p></blockquote><p>No matter what your job is probably you&#8217;ve ever heard of the word database.</p><p>Companies out there use different types of databases to store all the information they collected throughout the years. Although all these databases might seem the same, they have some functionalities that make them more suitable for certain situations, so it&#8217;s worth learning more about them.</p><p>In this article, we&#8217;ll see what databases are and the most commonly used in companies.</p><pre><code><strong>Table of Contents
</strong>1. What is a Database?
2. Types of Databases
 - Relational databases
 - Non-Relational databases
3. Top databases</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>What is a Database?</h3><p>A database is a collection of data typically stored electronically in a computer system and controlled by a database management system (DBMS). The data, the DBMS, and the applications associated with them are referred to as a database system (or just &#8220;database&#8221;).</p><p>The words database management system and database are often used interchangeably, but technically they&#8217;re not the same.</p><p>To distinguish them consider the case of a social media app that stores different information about its users such as messages, photos, comments, etc. The database stores this big collection of data, but that&#8217;s pretty much what it does. If you want to edit, update, or delete data, you need a DBMS that does the talking for you. Some of the most popular DBMS are Oracle, MySQL, SQL Server, and PostgreSQL.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Izbl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Izbl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 424w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 848w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 1272w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Izbl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png" width="800" height="471" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:471,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Izbl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 424w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 848w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 1272w, https://substackcdn.com/image/fetch/$s_!Izbl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd00e0b5-5d5c-4769-b023-72424702b0de_800x471.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author made on&nbsp;Canva</figcaption></figure></div><p>Again, people often refer to both the DBMS and DB simply as &#8220;database&#8221; but now you know how this actually works.</p><p>Another way to think of a database is as a big spreadsheet with many rows and columns. That&#8217;s a good comparison, but a database goes beyond that. Both the database and spreadsheet are good for storing information, but they mainly differ in the following aspects:</p><ul><li><p>How the data is stored and manipulated: Databases allow complex data manipulation, while spreadsheets aren't meant for users who need much data manipulation.</p></li><li><p>Who can access the data: Databases allow multiple users to quickly access and query the data, while spreadsheets were designed only for a single user or a small number of users.</p></li><li><p>The amount of data that can be stored: Databases are designed to store larger collections of data, while spreadsheets have a limitation.</p></li></ul><p>Last but not least, a database cannot only store data in tables and rows. That&#8217;s how relational databases typically work, but there&#8217;s also another type of database called non-relational database. This leads us to our next point.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Types of Databases</h3><p>Databases are typically divided into relational and non-relational databases. Among the top 10 databases, you&#8217;ll see both relational and non-relational databases. One type of database is not better than the other, but they suit different needs.</p><h4>Relational databases</h4><p>A relational database (aka SQL database), stores data in tables and rows also referred to as records. This type of database links information from different tables through keys.</p><p>A key is a unique value in a table that is also known as the &#8220;primary key&#8221;. When this key is added to a record located in another table, it&#8217;s called &#8220;foreign key&#8221; in this second table. This connection between primary and foreign keys creates a relationship between records within both tables.</p><p>Some popular relational database management systems (RDBMS) are Oracle, MySQL, SQL Server, and PostgreSQL.</p><p>Here&#8217;s a basic schema that shows how a relational database works.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WlpV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WlpV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 424w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 848w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 1272w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WlpV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png" width="800" height="699" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7607089-3832-455c-be4a-1de84a99de04_800x699.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:699,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WlpV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 424w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 848w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 1272w, https://substackcdn.com/image/fetch/$s_!WlpV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7607089-3832-455c-be4a-1de84a99de04_800x699.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://pixabay.com/vectors/database-schema-data-tables-schema-1895779/">Pixabay</a></figcaption></figure></div><p>To query data in a RDBMS, we use Structured Querying Language (SQL). With SQL we can create new records, update them, and more. This makes the RDBMS good for apps that need transactional functionality, data mining, and complex reporting.</p><h4>Non-Relational databases</h4><p>A non-relational database (aka NoSQL database), stores data without tables, rows, or keys. In other words, a non-relational database stores data in a non-tabular form. This adds some flexibility and helps satisfy specific requirements of the type of data being stored.</p><p>You can think of a non-relational database as a collection of documents. A document can contain a lot of detailed information about a customer. Each customer can have different types of information, but they can be stored in the same document.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FqxM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FqxM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 424w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 848w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 1272w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FqxM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png" width="800" height="471" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:471,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FqxM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 424w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 848w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 1272w, https://substackcdn.com/image/fetch/$s_!FqxM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f86ff2-7f22-49b4-a75f-bcaa43ff04b5_800x471.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>The ability to process and organize different types of information makes non-relational databases more flexible than relational databases.</p><p>There are four popular non-relational types: document data store, column-oriented database, key-value store, and graph database. One of the most popular NoSQL databases is MongoDB.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>What are the top databases?</h3><p>It&#8217;s hard to rank the database based on their functionality because they suit different needs and can be more convenient in certain scenarios than in others. That said, it&#8217;s possible to rank the database management systems according to their popularity.</p><p>In fact, <a href="https://db-engines.com/en/ranking">DB-Engine</a> ranks DBMS by their current popularity. To do so, they calculate scores following different <a href="https://db-engines.com/en/ranking_definition">parameters</a>.</p><p>Here are the top 10 databases by their popularity.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/qDEH5/4/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3fa2ba4-d67f-4a16-920c-b6789c7bb696_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:523,&quot;title&quot;:&quot;Top 10 Databases&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/qDEH5/4/" width="730" height="523" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>Now let&#8217;s see more about them, compare them, and see their pros and cons.</p><h3>1. Oracle</h3><p>Oracle Database is a widely used RDBMS across industries. In fact, it has the largest market share of around 30.2% in the RDBMS market.</p><p>Oracle Database supports SQL language to interact with the database. It&#8217;s considered one of the best databases because it supports all data types involving relational, graph, structured, and unstructured information. In addition to that, Oracle Database is preferred for its flexible standards, scalability, high availability, and strong security.</p><h4>Pros</h4><ul><li><p>It&#8217;s highly compatible with different apps and platforms</p></li><li><p>Helps with scalability</p></li><li><p>It offers good privacy and security</p></li></ul><h4>Cons</h4><ul><li><p>The license is expensive</p></li><li><p>Users might need extensive SQL knowledge to use Oracle Database</p></li></ul><h4>Popularity</h4><p>Google Trends shows more interest in Oracle than in MySQL over the past 5 years. The graph also reveals the same ups and downs for both databases.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jJb8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jJb8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 424w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 848w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 1272w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jJb8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png" width="800" height="395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:395,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jJb8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 424w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 848w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 1272w, https://substackcdn.com/image/fetch/$s_!jJb8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f11db8-a37b-4054-8f31-d41f4a05f5c8_800x395.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Google&nbsp;Trends</figcaption></figure></div><h3>2. MySQL</h3><p>MySQL is one of the most popular databases. It&#8217;s open-source so any person or company can use MySQL for free, but if the code needs to be integrated into a commercial application, you need to purchase a license. That said, this database is still worth it for anyone who wants to experiment with a friendly yet powerful database.</p><p>MySQL was developed by Oracle and it&#8217;s a relational database management system. As explained before, the relation model consists in organizing data in tables with rows and columns, while the relationship between elements follows a logical structure. Companies such as Facebook, Twitter, Wikipedia, and YouTube employ MySQL backends.</p><h4>Pros</h4><ul><li><p>It&#8217;s open source: Unlike other options, you don&#8217;t have to pay to use most features of MySQL</p></li><li><p>It&#8217;s cross-platform: Runs on Linus, Solaris, and Windows and supports platforms with programming languages such as C, C++, Java, Python, etc.</p></li><li><p>Reliable data security: MySQL is known for being a secure database management system. This is why so many well-known companies use it in their applications.</p></li><li><p>It&#8217;s easy to use: Anyone can download, install and start to use MySQL in a few minutes.</p></li></ul><h4>Cons</h4><ul><li><p>It&#8217;s not for large-sized data</p></li><li><p>It doesn&#8217;t support SQL check constraints</p></li><li><p>It doesn&#8217;t have a good debugging tool compared to paid databases</p></li><li><p>It doesn&#8217;t handle transactions very efficiently</p></li></ul><h4>Popularity</h4><p>Google Trends shows that the interest in MySQL has slightly decreased over the past 5 years, but has suddenly risen compared to other databases like SQL Server.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nvJ3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nvJ3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 424w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 848w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 1272w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nvJ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png" width="800" height="377" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:377,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nvJ3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 424w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 848w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 1272w, https://substackcdn.com/image/fetch/$s_!nvJ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F719e505b-4ca2-4d04-b1ff-9c418ceb03c0_800x377.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Google&nbsp;Trends</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>3. SQL&nbsp;Server</h3><p>SQL Server was developed by Microsoft and it&#8217;s considered a great RDBMS for both on-premise and cloud environments. It has a Database Engine component that allows storing, processing, and securing data. The database engine is divided into two segments&#8202;&#8212;&#8202;the relational and storage engine. The first is used to process commands and queries, while the second is used to manage features such as tables, pages, files, indexes, and transactions.</p><p>Besides SQL language, SQL Server also includes Transact-SQL (T-SQL), which is Microsoft&#8217;s extension to the SQL used to interact with relational databases. SQL Server is a good option for businesses that want to scale the performance, availability, and security seamlessly based on their requirements.</p><h4>Pros</h4><ul><li><p>It has various supported editions (enterprise, standard, express, and developer). The express SQL server edition is free of cost.</p></li><li><p>It has an online documentation</p></li><li><p>On-premise and cloud database support</p></li><li><p>It offers different tools and apps</p></li></ul><h4>Cons</h4><ul><li><p>Expensive enterprise edition</p></li><li><p>It&#8217;s available for Windows, Linux, and macOS, but the steps to install it on a Mac aren&#8217;t as straightforward as on a Windows machine.</p></li></ul><h4>Popularity</h4><p>Google Trends shows more interest over time in SQL Server than in PostgreSQL. In fact, the interest in PostgreSQL hasn&#8217;t changed that much over the past 5 years.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oGd5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oGd5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 424w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 848w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 1272w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oGd5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png" width="800" height="385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:385,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oGd5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 424w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 848w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 1272w, https://substackcdn.com/image/fetch/$s_!oGd5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ade5-7036-4e3a-a330-5710173769ff_800x385.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Google&nbsp;Trends</figcaption></figure></div><h3>4. PostgreSQL</h3><p>PostgreSQL is known as the world&#8217;s most advanced open source object-relational database management system (ORDBMS). Part of this reputation is due to its architecture, reliability, robustness, and extensibility.</p><p>PostgreSQL comes with many features that help build apps, protect data integrity and help manage data no matter how big or small the data is. It&#8217;s also highly extensible in many areas. To name a few:</p><ul><li><p>Stored functions and procedures</p></li><li><p>PL/PGSQL, Perl, Python</p></li><li><p>SQL/JSON path expressions</p></li><li><p>Additional functionality such as PostGIS (spatial database extender for PostgreSQL)</p></li></ul><p>These extensions help us process data right from PostgreSQL, so we don&#8217;t need to find workarounds to implement them.</p><h4>Pros</h4><ul><li><p>It&#8217;s extremely programmable: You can extend PostgreSQL thanks to its directory-based operation and dynamic loading</p></li><li><p>It&#8217;s highly extensible</p></li><li><p>It has a very rich set of indexing options</p></li></ul><h4>Cons</h4><ul><li><p>Performance: PostgreSQL is sometimes less efficient than other RDBMS such as MySQL (at least for simple intensive reading operations)</p></li><li><p>It might be difficult to troubleshoot PostgreSQL</p></li></ul><h4>Popularity</h4><p>Google Trends shows similar interest over time in PostgreSQL and MongoDB. That said, we should consider that PostgreSQL was initially released in 1996, while MongoDB was released in 2009.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1gwr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1gwr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 424w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 848w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 1272w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1gwr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png" width="800" height="397" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:397,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1gwr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 424w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 848w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 1272w, https://substackcdn.com/image/fetch/$s_!1gwr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F399b45d8-09e4-4caf-860e-e084c9784f54_800x397.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Google&nbsp;Trends</figcaption></figure></div><h3>5. MongoDB</h3><p>MongoDB is an open-source document database that uses a flexible schema for storing data. Unlike SQL databases that store data in tables of rows and columns, NoSQL database programs like MongoDB use JSON-like documents with optional schemas.</p><p>MongoDB is great for those who build internet and business applications and need to evolve and scale quickly. Some of the advantages of MongoDB for developers are the power of document-oriented databases (documents can be retrieved directly in JSON format, which developers find easy to work with), user experience, scalability and transactionality, and its thriving community.</p><p>Overall, MongoDB is good if you&#8217;re looking for a database that:</p><ul><li><p>Supports rapid iterative development</p></li><li><p>Enables the scale to high levels of read and write traffic</p></li><li><p>Stores, manages, and searches data when creating apps</p></li></ul><h4>Pros</h4><ul><li><p>It offers a flexible schema that it&#8217;s not possible to get in a RDBMS</p></li><li><p>Scalability: MongoDB uses <em>sharding</em>, which allows the database to use horizontal scalability.</p></li><li><p>It&#8217;s free and supports Windows, macOS, and Linux</p></li></ul><h4>Cons</h4><ul><li><p>High memory usage: The data size in MongoDB is higher than in other databases</p></li><li><p>Less flexibility with querying: It fails to support joins as a relational database</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Behind AI #1: Machine Learning Algorithms Any AI Enthusiast Should Know]]></title><description><![CDATA[Machine learning algorithms explained in plain English]]></description><link>https://artificialcorner.com/p/algorithms-1</link><guid isPermaLink="false">https://artificialcorner.com/p/algorithms-1</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Mon, 19 Aug 2024 18:05:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dRrC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dRrC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dRrC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dRrC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg" width="800" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dRrC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dRrC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97c49a06-1910-47c2-b54f-3467f9365d8c_800x566.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Via Shutterstock</figcaption></figure></div><blockquote><p><em>Hi!</em></p><p><em>I created a new series called &#8220;AI &amp; Python&#8221; which will be focused on learning Python, coding concepts, automation, and creating AI apps. From now on, &#8220;Behind AI&#8220; will be focused on what's behind the AI products you love. No programming knowledge will be required. Tech concepts (if any) will be explained in plain English.</em></p><p><em>Examples of a Behind AI piece are <a href="https://artificialcorner.com/p/data-an-important-resource-in-the">this article</a> and the one you&#8217;re reading right now. </em></p><p><em>P.S. In case you&#8217;re not interested in the Python articles, go to <a href="https://artificialcorner.substack.com/account">settings</a> and turn off notifications for &#8220;AI &amp; Python&#8221; (leave the rest the same to keep receiving my other emails)</em></p></blockquote><p>Machine learning (ML) is the field behind all the magic in AI products. If you&#8217;re new to ML, you probably must&#8217;ve heard of the words &#8220;algorithm&#8221; or &#8220;model&#8221; without knowing how they&#8217;re related to machine learning. </p><p>Here&#8217;s a brief explanation in plain English.</p><p>Machine learning algorithms are categorized as supervised or unsupervised. Supervised learning algorithms model the relationship between labeled input and output data (aka target). This model is then used to predict the label of new observations using new labeled input data. If the target variable is discrete, we&#8217;re dealing with a classification problem, while if the target variable is continuous we&#8217;re dealing with a regression problem. In contrast, unsupervised learning doesn&#8217;t rely on labeled input/output data but processes unlabeled data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n3AW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n3AW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!n3AW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!n3AW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!n3AW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f3b0e2-d7b1-4b92-adc2-0f4d184883fe_800x450.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image made by author on&nbsp;Canva</figcaption></figure></div><p>Here are 6 supervised learning algorithms that you should know.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>1. Linear Regression</h3><p>Linear regression is the simplest algorithm used in machine learning. This algorithm is used for modeling the relationship between two or more variables. There are two types of linear regression&#8202;&#8212;&#8202;simple and multiple linear regression.</p><p>In simple linear regression, there&#8217;s one independent variable and one dependent variable, while in multiple linear regression there are multiple independent variables and one dependent variable.</p><p>Here&#8217;s the multiple linear regression equation:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wsRT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wsRT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 424w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 848w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 1272w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wsRT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png" width="627" height="66" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:66,&quot;width&quot;:627,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wsRT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 424w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 848w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 1272w, https://substackcdn.com/image/fetch/$s_!wsRT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d13d711-d072-48f4-b715-f7b4b16da82e_627x66.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>where <code>y</code> is the dependent variable (target value), <code>x1, x2,&nbsp;&#8230; xn</code> the independent variables (predictors), <code>b0</code> the intercept, <code>b1, b2,&nbsp;... bn</code> the coefficients and <code>n</code> the number of observations.</p><p>In the picture below, you&#8217;ll see a simplified version of the linear regression equation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vvix!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vvix!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!vvix!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!vvix!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!vvix!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vvix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vvix!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!vvix!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!vvix!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!vvix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8973917-9c31-478a-8068-ac02d99b3a9e_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>As you can see in the picture above, there&#8217;s a linear relationship, so if one variable increases or decreases, the other variable will also increase or decrease.</p><p>We can use linear regression to predict scores, salaries, house prices, etc. That said, the prediction accuracy isn&#8217;t as good as those you&#8217;d get with other algorithms.</p><h3>2. SVM</h3><p>A Support Vector Machine (SVM) is a supervised<strong> </strong>learning algorithm that is mostly used in classification problems. We usually feed the SVM model with labeled training data to categorize new text.</p><p>SVM is a good choice when we have a limited number of samples and speed is a priority. This is why it&#8217;s used when we work with a dataset that has a few thousand of tagged samples in text classification.</p><p>To understand much better how SVM works let&#8217;s see an example.</p><p>In the picture below, we have two tags (green and yellow) and two features (x and y). Say we want to build a classifier that finds whether our text data is either green or yellow. If that&#8217;s the case, we will plot each observation (aka data point) in an n-dimensional space, where &#8220;n&#8221; is the number of features used.</p><p>We only have two features, so the observations are plotted in 2-dimensional space as shown in the picture below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NjT9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NjT9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NjT9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NjT9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!NjT9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5003509-0bf6-4cb3-8b8a-6416e0b83964_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>SVM takes the data points and makes a hyperplane that best separates the classes. Since the observations are plotted in 2-dimensional space, the hyperplane is a line.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7tpJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7tpJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7tpJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7tpJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!7tpJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33683bc4-f2b4-4c3b-91a7-b39fd9aa57a6_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>This red line is also known as the decision boundary. The decision boundary determines whether a data point belongs to one class or to another. In our example, if the data point falls on the left side, it will be classified as green, while if it falls on the right side, it will be classified as yellow.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>3. Decision&nbsp;Tree</h3><p>If you know nothing about machine learning, you might still know about decision trees.</p><p>A decision tree is a model used in planning, statistics, and machine learning that uses a tree-like structure of decisions/consequences to evaluate the possible events involved in a particular problem.</p><p>Here&#8217;s a decision tree that evaluates scenarios where people want to play football.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3vUh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3vUh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 424w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 848w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 1272w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3vUh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png" width="573" height="404" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af87377f-54db-4e56-a679-106fb0570251_573x404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:404,&quot;width&quot;:573,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3vUh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 424w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 848w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 1272w, https://substackcdn.com/image/fetch/$s_!3vUh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf87377f-54db-4e56-a679-106fb0570251_573x404.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://commons.wikimedia.org/wiki/File:Decision_tree_model.png">Wikimedia Commons</a></figcaption></figure></div><p>Each square is called a node. The last nodes of the decision tree are called the leaves of the tree. To make predictions we start from the root of the tree (first node). Each node in the decision tree will be evaluated. Then we follow the branch that agrees with the evaluation and jump to the next node.</p><p>The decision tree algorithm can be used for solving both regression and classification problems. We use a decision tree to build a model that can predict the class or value of the target variable by learning decision tree rules inferred from the training data.</p><h3>4. Random&nbsp;Forest</h3><p>Random forest is an ensemble of many decision trees. It combines the simplicity of a decision tree with flexibility resulting in an improvement in accuracy.</p><p>To make a random forest, first, we need to create a &#8220;bootstrapped&#8221; dataset. Bootstrapping is randomly selecting samples from original data (we can even choose the same sample more than once). Then, we use the bootstrapped dataset to create a decision tree.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Iri!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Iri!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 424w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 848w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 1272w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Iri!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png" width="512" height="289" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:289,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Iri!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 424w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 848w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 1272w, https://substackcdn.com/image/fetch/$s_!-Iri!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cf3712-ba52-44eb-9d81-cceff65d5531_512x289.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://commons.wikimedia.org/wiki/File:Ensemble_Bagging.svg">Wikimedia Commons</a></figcaption></figure></div><p>This method is known as &#8220;bagging.&#8221; If we repeat the previous steps multiple times, we get a good number of trees. This variety of trees is what makes random forests more effective than a single decision tree.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3TNo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3TNo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3TNo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3TNo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!3TNo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a0d7443-4b49-4767-9d21-76344a2cdafd_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://commons.wikimedia.org/wiki/File:Random_forest_explain.png">Wikimedia Commons</a></figcaption></figure></div><p>If the random forest is used for a classification task, the model selects the mode of the predictions of each decision tree. For a regression task, the model selects the mean value of the results from the decision trees.</p><h3>5. Naive&nbsp;Bayes</h3><p>Naive Bayes is a supervised<strong> </strong>learning algorithm that uses conditional probability to predict a class.</p><p>The Naive Bayes algorithm is based on the Bayes theorem:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VyM9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VyM9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 424w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 848w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 1272w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VyM9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png" width="640" height="206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VyM9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 424w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 848w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 1272w, https://substackcdn.com/image/fetch/$s_!VyM9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc3bb44-1bd2-4fe6-800b-7b8a545710ba_640x206.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><pre><code>p(A|B): Probability of event A given event B has already occurred
p(B|A): Probability of event B given event A has already occurred
p(A): Probability of event A
p(B): Probability of event B</code></pre><p>Naive Bayes assumes that every feature is independent of each other, which isn&#8217;t always the case, so we should examine our data before choosing this algorithm.</p><p>The assumption that features are independent of each other makes Naive Bayes fast<strong> </strong>compared to more complex algorithms; however, it also makes this algorithm less accurate.</p><p>We can use Naive Bayes to predict weather forecasting, fraud detection, and more.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>6. Logistic Regression</h3><p>Logistic regression is a supervised<strong> </strong>learning algorithm that is commonly used for binary classification<strong> </strong>problems. This means we can use logistic regression to predict whether a customer will churn or not, and to find whether a mail is spam or not.</p><p>The logistic regression is based on the logistic function (aka the sigmoid function), which takes in a value and assigns a probability between 0 and 1.</p><p>Here&#8217;s the graph of the logistic regression:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MY_6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MY_6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MY_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MY_6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!MY_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe85e4f3a-3c6a-441f-917d-724aa8468aba_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>To understand much better how Logistic Regression works, consider a scenario where we need to classify whether an email is spam or not.</p><p>In the graph, if Z goes to infinity, Y (our target value) will become 1, which means the email is spam. However, if Z goes to negative infinity, Y will become 0, which means the email is not spam.</p><p>The output value is a probability, so if we obtain a value of 0.64, this means that there&#8217;s a 64% chance that an email will be spam.</p><div><hr></div><p>That&#8217;s it for now! Let me know in the comments if you want a 2nd part of this.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/algorithms-1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/algorithms-1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Data: An important resource in the AI revolution]]></title><description><![CDATA[Data might have become the new oil of the 21st century.]]></description><link>https://artificialcorner.com/p/data</link><guid isPermaLink="false">https://artificialcorner.com/p/data</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Tue, 06 Feb 2024 17:03:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xF-U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xF-U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xF-U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xF-U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg" width="800" height="1035" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1035,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xF-U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xF-U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83141fe2-318d-4881-b4ee-72db50c10e3f_800x1035.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image via Shutterstock</figcaption></figure></div><blockquote><p><em>Hi!</em></p><p><em>The other day I was thinking that many people still don&#8217;t know the value of data, which is surprising given that data is what makes AI possible. Companies like OpenAI have been collecting data for many years to train their models, creating the tools we all know today.</em></p><p><em>In the coming articles, I&#8217;ll show you the techniques these companies use to collect data and what you can do with this data but, first, let&#8217;s see why data is so important nowadays.</em></p></blockquote><p>The concept of data as a strategic asset has been gaining momentum in the past years, however, regular people aren&#8217;t able to see the real value in data.</p><p>We know big tech companies have been collecting data for a long time. We know that year after year new regulations about the use of data are created. That said, most of us still don&#8217;t understand the impact data has on our society.</p><p>A few years ago, The Economist published an article called &#8220;The world&#8217;s most valuable resource is no longer oil, but data.&#8221; However, for regular&#8230;</p>
      <p>
          <a href="https://artificialcorner.com/p/data">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>