Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

Machine Learning vs. AI, Important Differences Between Them
Artificial Intelligence   Machine Learning

Machine Learning (ML) vs. Artificial Intelligence (AI)—Crucial Differences

Last Updated on May 11, 2022 by Editorial Team

Image showing a human figure along with some computer code, and some gradient background | machine learnin vs AI
Machine Learning Open License — Image Credits: IoT World Today

Unfortunately, some tech organizations are deceiving customers by proclaiming to use machine learning (ML) and artificial intelligence (AI) on their technologies while not being clear about their products’ limits.

Recently, a report was released regarding the misuse of companies claiming to use artificial intelligence [29] [30] on their products and services. According to the Verge [29], 40% of European startups claiming to use AI don’t use the technology. Last year, TechTalks, also stumbled upon such misuse by companies claiming to use machine learning and advanced artificial intelligence to gather and examine thousands of users’ data to enhance user experience in their products and services [2] [33].

Unfortunately, there’s still much confusion among the public and the media regarding what genuinely is artificial intelligence [44] and what exactly is machine learning [18]. Often the terms are being used as synonyms. In other cases, these are being used as discrete, parallel advancements, while others are taking advantage of the trend to create hype and excitement to increase sales and revenue [2] [31] [32] [45].

📚 Check out our editorial recommendations on the best machine learning books. 📚

Below we go through some main differences between AI and machine learning.

What is machine learning?

What is Machine Learning | Tom M. Mitchell, Machine Learning, McGraw Hill, 1997 [18]

Quoting Interim Dean at the School of Computer Science at CMU, Professor and Former Chair of the Machine Learning Department at Carnegie Mellon University, Tom M. Mitchell:

A scientific field is best defined by the central question it studies. The field of Machine Learning seeks to answer the question:

“How can we build computer systems that automatically improve with experience, and what
are the fundamental laws that govern all learning processes? [1]”

Machine learning (ML) is a branch of artificial intelligence, and as defined by Computer Scientist and machine learning pioneer [19] Tom M. Mitchell: “Machine learning is the study of computer algorithms that allow computer programs to automatically improve through experience.” [18] — ML is one of the ways we expect to achieve AI. Machine learning relies on working with small to large datasets by examining and comparing the data to find common patterns and explore nuances.

For instance, if you provide a machine learning model with many songs that you enjoy, along with their corresponding audio statistics (dance-ability, instrumentality, tempo, or genre). Then, it oughts to be able to automate (depending on the supervised machine learning model used) and generate a recommender system [43] as to suggest you with music in the future that (with a high percentage of probability rate) you’ll enjoy, similarly as to what Netflix, Spotify, and other companies do [20] [21] [22].

In a simple example, if you load a machine learning program with a considerable large dataset of x-ray pictures along with their description (symptoms, items to consider, and others), it oughts to have the capacity to assist (or perhaps automatize) the data analysis of x-ray pictures later on. The machine learning model looks at each picture in the diverse dataset and finds common patterns found in pictures with labels with comparable indications. Furthermore, (assuming that we use an acceptable ML algorithm for images), when you load the model with new pictures, it compares its parameters with the examples it has gathered before to disclose how likely the pictures contain any of the indications it has analyzed previously.

Supervised Learning (Classification/Regression) | Unsupervised Learning (Clustering) | Credits: Western Digital [13]

The type of machine learning from our previous example, called “supervised learning,” where supervised learning algorithms try to model relationships and dependencies between the target prediction output and the input features, such that we can predict the output values for new data based on those relationships, which it has learned from previous datasets [15] fed.

Unsupervised learning, another type of machine learning, is the family of machine learning algorithms, which have main uses in pattern detection and descriptive modeling. These algorithms do not have output categories or labels on the data (the model trains with unlabeled data).

Reinforcement Learning | Credits: Types of ML Algorithms you Should Know by David Fumo [3]

Reinforcement learning, the third popular type of machine learning, aims at using observations gathered from the interaction with its environment to take actions that would maximize the reward or minimize the risk. In this case, the reinforcement learning algorithm (called the agent) continuously learns from its environment using iteration. A great example of reinforcement learning is computers reaching a super-human state and beating humans on computer games [3].

Machine learning can be dazzling, particularly its advanced sub-branches, i.e., deep learning and the various types of neural networks. In any case, it is “magic” (Computational Learning Theory) [16], regardless of whether the public, at times, has issues observing its internal workings. While some tend to compare deep learning and neural networks to the way the human brain works, there are essential differences between the two [2] [4] [46].

What is Artificial Intelligence (AI)?

The AI Stack, Explained by Professor and Dean, School of Computer Science, Carnegie Mellon University, Andrew Moore | Youtube [14]

Artificial intelligence, on the other hand, is vast in scope. According to Andrew Moore [6] [36] [47], Former-Dean of the School of Computer Science at Carnegie Mellon University, “Artificial intelligence is the science and engineering of making computers behave in ways that, until recently, we thought required human intelligence.”

That is a great way to define AI in a single sentence; however, it still shows how broad and vague the field is. Fifty years ago, a chess-playing program was considered a form of AI [34] since game theory and game strategies were capabilities that only a human brain could perform. Nowadays, a chess game is dull and antiquated since it is part of almost every computer’s operating system (OS) [35]; therefore, “until recently” is something that progresses with time [36].

Assistant Professor and Researcher at CMU Zachary Lipton clarifies on Approximately Correct [7], the term AI “is aspirational, a moving target based on those capabilities that humans possess but which machines do not.” AI also includes a considerable measure of technology advances that we know. Machine learning is only one of them. Prior works of AI utilized different techniques. For instance, Deep Blue, the AI that defeated the world’s chess champion in 1997, used a method called tree search algorithms [8] to evaluate millions of moves at every turn [2] [37] [52] [53].

Example of solving the Eight Queens puzzle using Depth First Search | Introduction to Artificial Intelligence |. how2Examples

As we know it today, AI is symbolized with Human-AI interaction gadgets by Google Home, Siri, and Alexa, by the machine-learning-powered video prediction systems that power Netflix, Amazon, and YouTube. These technological advancements are progressively becoming essential in our daily lives. They are intelligent assistants who enhance our abilities as humans and professionals — making us more productive.

In contrast to machine learning, AI is a moving target [51], and its definition changes as its related technological advancements turn out to be further developed [7]. Possibly, within a few decades, today’s innovative AI advancements ought to be considered as dull as flip-phones are to us right now.

Why do tech companies tend to use AI and ML interchangeably?

“… what we want is a machine that can learn from experience.” ~ Alan Turing

The term “artificial intelligence” came to inception in 1956 by a group of researchers, including Allen Newell and Herbert A. Simon [9]. Since then, AI’s industry has gone through many fluctuations. In the early decades, there was much hype surrounding the industry, and many scientists concurred that human-level AI was just around the corner. However, undelivered assertions caused a general disenchantment with the industry along with the public and led to the AI winter, a period where funding and interest in the field subsided considerably [2] [38] [39] [48].

Afterward, organizations attempted to separate themselves from the term AI, which had become synonymous with unsubstantiated hype and used different names to refer to their work. For instance, IBM described Deep Blue as a supercomputer and explicitly stated that it did not use artificial intelligence [10], while it did [23].

During this period, various other terms, such as big data, predictive analytics, and machine learning, started gaining traction and popularity [40]. In 2012, machine learning, deep learning, and neural networks made great strides and found use in a growing number of fields. Organizations suddenly started to use the terms “machine learning” and “deep learning” for advertising their products [41].

Deep learning began to perform tasks that were impossible to do with classic rule-based programming. Fields such as speech and face recognition, image classification, and natural language processing, which were at early stages, suddenly took great leaps [2] [24] [49], and in March 2019–three of the most recognized deep learning pioneers won a Turing award thanks to their contributions and breakthroughs that have made deep neural networks a critical component to nowadays computing [42].

Hence, to the momentum, we see a gearshift back to AI. For those who are used to the limits of old-fashioned software, the effects of deep learning almost seemed like “magic” [16]. Especially since a fraction of the fields that neural networks and deep learning are entering were considered off-limits for computers, and nowadays, machine learning and deep learning engineers are earning high-level salaries, even when they are working at non-profit organizations, which speaks to how hot the field is [50] [11].

Source: Twitter | GPT-2 Better Language Models and Their Implications, Open AI

Sadly, this is something that media companies often report without profound examination and frequently go along with AI articles with pictures of crystal balls and other supernatural portrayals. Such deception helps those companies generate hype around their offerings [27]. Yet, down the road, as they fail to meet the expectations, these organizations are forced to hire humans to make up for their so-called AI [12]. In the end, they might end up causing mistrust in the field and trigger another AI winter for the sake of short-term gains [2] [28].

I am always open to feedback, please share in the comments if you see something that may need revisited. Thank you for reading!

Acknowledgments:

The author would like to extensively thank Ben Dickson, Software Engineer and Tech Blogger, for his kindness to allow me to rely on his expertise and storytelling, along with several members of the AI Community for the immense support and constructive criticism in preparation of this article.

DISCLAIMER: The views expressed in this article are those of the author(s) and do not represent the views of Carnegie Mellon University nor other companies (directly or indirectly) associated with the author(s). These writings do not intend to be final products but rather a reflection of current thinking and a catalyst for discussion and improvement.


You can find me on my website, Medium, Instagram, Twitter, Facebook, LinkedIn.


Resources

Introduction to Machine Learning | Matt Gormley | School of Computer Science, Carnegie Mellon University | http://www.cs.cmu.edu/~mgormley/courses/10601/

AI for Everyone | Andrew Ng | Coursera | https://www.coursera.org/learn/ai-for-everyone

Machine Learning Course | Google | https://developers.google.com/machine-learning/crash-course/

Intro to Machine Learning | Udacity | https://www.udacity.com/course/intro-to-machine-learning–ud120

Machine Learning Training | Amazon Web Services | https://aws.amazon.com/training/learning-paths/machine-learning/

Introduction to Machine Learning | Coursera | https://www.coursera.org/learn/machine-learning


References:

[1] The Discipline of Machine learning | Tom M. Mitchell | http://www.cs.cmu.edu/~tom/pubs/MachineLearning.pdf

[2] Why the difference between AI and machine learning matters | Ben Dickson | TechTalks | https://bdtechtalks.com/2018/10/08/artificial-intelligence-vs-machine-learning/

[3] Types of Machine Learning Algorithms You Should Know | David Fumo | Towards Data Science | https://towardsdatascience.com/types-of-machine-learning-algorithms-you-should-know-953a08248861

[4] Watch our AI system play against five of the world’s top Dota 2 Professionals | Open AI | https://openai.com/five/

[5] Differences between Neural Networks and Deep Learning | Quora | https://www.quora.com/What-is-the-difference-between-Neural-Networks-and-Deep-Learning

[6] What Machine Learning Can and Cannot Do | WSJ | https://blogs.wsj.com/cio/2018/07/27/what-machine-learning-can-and-cannot-do/

[7] Carnegie Mellon Dean of Computer Science on the Future of AI | Forbes | https://www.forbes.com/sites/peterhigh/2017/10/30/carnegie-mellon-dean-of-computer-science-on-the-future-of-ai

[8] From AI to Ml to AI: On Swirling Nomenclature & Slurried Thought | Zachary C. Lipton | Approximately Correct | http://approximatelycorrect.com/2018/06/05/ai-ml-ai-swirling-nomenclature-slurried-thought/

[9] Tree Search Algorithms | Introduction to AI | http://how2examples.com/artificial-intelligence/tree-search

[10] Reinventing Education Based on Data and What Works, Since 1955 | Carnegie Mellon University | https://www.cmu.edu/simon/what-is-simon/history.html

[11] Does Deep-Blue use AI? | Richard E. Korf | University of California | https://www.aaai.org/Papers/Workshops/1997/WS-97-04/WS97-04-001.pdf

[12] Artificial Intelligence: Salaries Heading Skyward | Stacy Stanford | Machine Learning Memoirs | https://medium.com/mlmemoirs/artificial-intelligence-salaries-heading-skyward-e41b2a7bba7d

[13] The rise of ‘pseudo-AI’: how tech firms quietly use humans to do bots’ work | The Guardian | https://www.theguardian.com/technology/2018/jul/06/artificial-intelligence-ai-humans-bots-tech-companies

[14] Simplify Machine Learning Pipeline Analysis with Object Storage | Western Digital | https://blog.westerndigital.com/machine-learning-pipeline-object-storage/

[15] Dr. Andrew Moore Opening Keynote | Artificial Intelligence and Global Security Initiative | https://youtu.be/r-zXI-DltT8

[16] The 50 Best Public Datasets for Machine Learning | Stacy Stanford | https://medium.com/datadriveninvestor/the-50-best-public-datasets-for-machine-learning-d80e9f030279

[17] Computational Learning Theory | ACL | http://www.learningtheory.org/

[18] Machine Learning Definition | Tom M. Mitchell| McGraw-Hill Science/Engineering/Math; (March 1, 1997), Page 1 | http://www.cs.cmu.edu/afs/cs.cmu.edu/user/mitchell/ftp/mlbook.html

[19] For pioneering contributions and leadership in the methods and applications of machine learning. | “Prof. Tom M. Mitchell.” National Academy of Engineering. Retrieved October 2, 2011.

[20] Recommender System | Wikipedia | https://en.wikipedia.org/wiki/Recommender_system

[21] Spotify’s “This Is” playlists: the ultimate song analysis for 50 mainstream artists | James Le | https://towardsdatascience.com/spotifys-this-is-playlists-the-ultimate-song-analysis-for-50-mainstream-artists-c569e41f8118

[22] How recommender systems make their suggestions | Bibblio | https://medium.com/the-graph/how-recommender-systems-make-their-suggestions-da6658029b76

[23] Deep Blue | Science Direct Assets | https://www.sciencedirect.com/science/article/pii/S0004370201001291

[24] 4 great leaps machine learning made in 2015 | Sergar Yegulalp | https://www.infoworld.com/article/3017250/4-great-leaps-machine-learning-made-in-2015.html

[25] Limitations of Deep Learning in AI Research | Roberto Iriondo | Towards Data Science | https://towardsdatascience.com/limitations-of-deep-learning-in-ai-research-5eed166a4205

[26] Forty percent of ‘AI startups’ in Europe don’t use AI, claims report | The Verge | https://www.theverge.com/2019/3/5/18251326/ai-startups-europe-fake-40-percent-mmc-report

[27] This smart toothbrush claims to have its very own ‘embedded AI’ | The Verge | https://www.theverge.com/circuitbreaker/2017/1/4/14164206/smart-toothbrush-ara-ai-kolibree

[28] The Coming AI Autumn | Jeffrey P. Bigham | http://jeffreybigham.com/blog/2019/the-coming-ai-autumnn.html

[29] Forty percent of ‘AI startups’ in Europe don’t use AI, claims report | The Verge | https://www.theverge.com/2019/3/5/18251326/ai-startups-europe-fake-40-percent-mmc-report

[30] The State of AI: Divergence | MMC Ventures | https://www.mmcventures.com/wp-content/uploads/2019/02/The-State-of-AI-2019-Divergence.pdf

[31] Top Sales & Marketing Priorities for 2019: AI and Big Data, Revealed by Survey of 600+ Sales Professionals | Business Wire | https://www.businesswire.com/news/home/20190129005560/en/Top-Sales-Marketing-Priorities-2019-AI-Big

[32] Artificial Intelligence Beats the Hype With Stunning Growth | Forbes | https://www.forbes.com/sites/jonmarkman/2019/02/26/artificial-intelligence-beats-the-hype-with-stunning-growth/#4e8507391f15

[33] Misuse of AI can destroy customer loyalty: here’s how to get it right | Compare the Cloud | https://www.comparethecloud.net/articles/misuse-of-ai-can-destroy-customer-loyalty-heres-how-to-get-it-right/

[34] Timeline of Artificial Intelligence | Wikipedia | https://en.wikipedia.org/wiki/Timeline_of_artificial_intelligence#1950s

[35] Computer Chess | Wikipedia | https://en.wikipedia.org/wiki/Computer_chess

[36] Artificial Intelligence at Carnegie Mellon University |Machine Learning Department at Carnegie Mellon University | https://www.youtube.com/watch?v=HH-FPH0vpVE

[37] Search Control Methods in Deep Blue | Semantic Scholar | https://pdfs.semanticscholar.org/211d/7268093b4dfce8201e8da321201c6cd349ef.pdf

[38] Is Winter Coming? | University of California, Berkeley | https://pha.berkeley.edu/2018/12/01/is-winter-coming-artificial-intelligence-in-healthcare/

[39] AI Winter | Wikipedia | https://en.wikipedia.org/wiki/AI_winter

[40] A Very Short History of Data Science | Forbes | https://www.forbes.com/sites/gilpress/2013/05/28/a-very-short-history-of-data-science/#3c828f2055cf

[41] Deep Learning Revolution | Wikipedia | https://en.wikipedia.org/wiki/Deep_learning#Deep_learning_revolution

[42] Turing Award Winners 2018 | ACM | https://amturing.acm.org/byyear.cfm

[43] Recommender System | Wikipedia | https://en.wikipedia.org/wiki/Recommender_system

[44] The discourse is unhinged: how the media gets AI alarmingly wrong | The Guardian | https://www.theguardian.com/technology/2018/jul/25/ai-artificial-intelligence-social-media-bots-wrong

[45] Retailers moved from AI hype to reality in 2018 | iXtenso | https://ixtenso.com/technology/retailers-moved-from-ai-hype-to-reality-in-2018.html

[46] Deep Learning & The Human Brain, Inspiration not Imitation | Imaginea | https://www.imaginea.com/sites/deep-learning-human-brain-inspiration-not-imitation/

[47] Carnegie Mellon Dean of Computer Science on the Future of AI | Forbes | https://www.forbes.com/sites/peterhigh/2017/10/30/carnegie-mellon-dean-of-computer-science-on-the-future-of-ai/#164487aa2197

[48] History of AI Winters | Actuaries Digital | https://www.actuaries.digital/2018/09/05/history-of-ai-winters/

[49] Recent Advances in Deep Learning: An Overview | Arxiv | https://arxiv.org/pdf/1807.08169.pdf

[50] Tech Giants Are Paying Huge Salaries for Scarce AI Talent | New York Times | https://www.nytimes.com/2017/10/22/technology/artificial-intelligence-experts-salaries.html

[51] Artificial Intelligence is a Moving Target | AnswerRocket | https://www.nytimes.com/2017/10/22/technology/artificial-intelligence-experts-salaries.html

[52] Search Control Methods in Deep Blue | Semantic Scholar | https://www.nytimes.com/2017/10/22/technology/artificial-intelligence-experts-salaries.html

[53] Search Tree Algorithms on Deep Blue | Stanford University | http://stanford.edu/~cpiech/cs221/apps/deepBlue.html DDI

Feedback ↓

Sign Up for the Course
`; } else { console.error('Element with id="subscribe" not found within the page with class "home".'); } } }); // Remove duplicate text from articles /* Backup: 09/11/24 function removeDuplicateText() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, strong'); // Select the desired elements const seenTexts = new Set(); // A set to keep track of seen texts const tagCounters = {}; // Object to track instances of each tag elements.forEach(el => { const tagName = el.tagName.toLowerCase(); // Get the tag name (e.g., 'h1', 'h2', etc.) // Initialize a counter for each tag if not already done if (!tagCounters[tagName]) { tagCounters[tagName] = 0; } // Only process the first 10 elements of each tag type if (tagCounters[tagName] >= 2) { return; // Skip if the number of elements exceeds 10 } const text = el.textContent.trim(); // Get the text content const words = text.split(/\s+/); // Split the text into words if (words.length >= 4) { // Ensure at least 4 words const significantPart = words.slice(0, 5).join(' '); // Get first 5 words for matching // Check if the text (not the tag) has been seen before if (seenTexts.has(significantPart)) { // console.log('Duplicate found, removing:', el); // Log duplicate el.remove(); // Remove duplicate element } else { seenTexts.add(significantPart); // Add the text to the set } } tagCounters[tagName]++; // Increment the counter for this tag }); } removeDuplicateText(); */ // Remove duplicate text from articles function removeDuplicateText() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, strong'); // Select the desired elements const seenTexts = new Set(); // A set to keep track of seen texts const tagCounters = {}; // Object to track instances of each tag // List of classes to be excluded const excludedClasses = ['medium-author', 'post-widget-title']; elements.forEach(el => { // Skip elements with any of the excluded classes if (excludedClasses.some(cls => el.classList.contains(cls))) { return; // Skip this element if it has any of the excluded classes } const tagName = el.tagName.toLowerCase(); // Get the tag name (e.g., 'h1', 'h2', etc.) // Initialize a counter for each tag if not already done if (!tagCounters[tagName]) { tagCounters[tagName] = 0; } // Only process the first 10 elements of each tag type if (tagCounters[tagName] >= 10) { return; // Skip if the number of elements exceeds 10 } const text = el.textContent.trim(); // Get the text content const words = text.split(/\s+/); // Split the text into words if (words.length >= 4) { // Ensure at least 4 words const significantPart = words.slice(0, 5).join(' '); // Get first 5 words for matching // Check if the text (not the tag) has been seen before if (seenTexts.has(significantPart)) { // console.log('Duplicate found, removing:', el); // Log duplicate el.remove(); // Remove duplicate element } else { seenTexts.add(significantPart); // Add the text to the set } } tagCounters[tagName]++; // Increment the counter for this tag }); } removeDuplicateText(); //Remove unnecessary text in blog excerpts document.querySelectorAll('.blog p').forEach(function(paragraph) { // Replace the unwanted text pattern for each paragraph paragraph.innerHTML = paragraph.innerHTML .replace(/Author\(s\): [\w\s]+ Originally published on Towards AI\.?/g, '') // Removes 'Author(s): XYZ Originally published on Towards AI' .replace(/This member-only story is on us\. Upgrade to access all of Medium\./g, ''); // Removes 'This member-only story...' }); //Load ionic icons and cache them if ('localStorage' in window && window['localStorage'] !== null) { const cssLink = 'https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css'; const storedCss = localStorage.getItem('ionicons'); if (storedCss) { loadCSS(storedCss); } else { fetch(cssLink).then(response => response.text()).then(css => { localStorage.setItem('ionicons', css); loadCSS(css); }); } } function loadCSS(css) { const style = document.createElement('style'); style.innerHTML = css; document.head.appendChild(style); } //Remove elements from imported content automatically function removeStrongFromHeadings() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, h6, span'); elements.forEach(el => { const strongTags = el.querySelectorAll('strong'); strongTags.forEach(strongTag => { while (strongTag.firstChild) { strongTag.parentNode.insertBefore(strongTag.firstChild, strongTag); } strongTag.remove(); }); }); } removeStrongFromHeadings(); "use strict"; window.onload = () => { /* //This is an object for each category of subjects and in that there are kewords and link to the keywods let keywordsAndLinks = { //you can add more categories and define their keywords and add a link ds: { keywords: [ //you can add more keywords here they are detected and replaced with achor tag automatically 'data science', 'Data science', 'Data Science', 'data Science', 'DATA SCIENCE', ], //we will replace the linktext with the keyword later on in the code //you can easily change links for each category here //(include class="ml-link" and linktext) link: 'linktext', }, ml: { keywords: [ //Add more keywords 'machine learning', 'Machine learning', 'Machine Learning', 'machine Learning', 'MACHINE LEARNING', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, ai: { keywords: [ 'artificial intelligence', 'Artificial intelligence', 'Artificial Intelligence', 'artificial Intelligence', 'ARTIFICIAL INTELLIGENCE', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, nl: { keywords: [ 'NLP', 'nlp', 'natural language processing', 'Natural Language Processing', 'NATURAL LANGUAGE PROCESSING', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, des: { keywords: [ 'data engineering services', 'Data Engineering Services', 'DATA ENGINEERING SERVICES', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, td: { keywords: [ 'training data', 'Training Data', 'training Data', 'TRAINING DATA', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, ias: { keywords: [ 'image annotation services', 'Image annotation services', 'image Annotation services', 'image annotation Services', 'Image Annotation Services', 'IMAGE ANNOTATION SERVICES', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, l: { keywords: [ 'labeling', 'labelling', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, pbp: { keywords: [ 'previous blog posts', 'previous blog post', 'latest', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, mlc: { keywords: [ 'machine learning course', 'machine learning class', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, }; //Articles to skip let articleIdsToSkip = ['post-2651', 'post-3414', 'post-3540']; //keyword with its related achortag is recieved here along with article id function searchAndReplace(keyword, anchorTag, articleId) { //selects the h3 h4 and p tags that are inside of the article let content = document.querySelector(`#${articleId} .entry-content`); //replaces the "linktext" in achor tag with the keyword that will be searched and replaced let newLink = anchorTag.replace('linktext', keyword); //regular expression to search keyword var re = new RegExp('(' + keyword + ')', 'g'); //this replaces the keywords in h3 h4 and p tags content with achor tag content.innerHTML = content.innerHTML.replace(re, newLink); } function articleFilter(keyword, anchorTag) { //gets all the articles var articles = document.querySelectorAll('article'); //if its zero or less then there are no articles if (articles.length > 0) { for (let x = 0; x < articles.length; x++) { //articles to skip is an array in which there are ids of articles which should not get effected //if the current article's id is also in that array then do not call search and replace with its data if (!articleIdsToSkip.includes(articles[x].id)) { //search and replace is called on articles which should get effected searchAndReplace(keyword, anchorTag, articles[x].id, key); } else { console.log( `Cannot replace the keywords in article with id ${articles[x].id}` ); } } } else { console.log('No articles found.'); } } let key; //not part of script, added for (key in keywordsAndLinks) { //key is the object in keywords and links object i.e ds, ml, ai for (let i = 0; i < keywordsAndLinks[key].keywords.length; i++) { //keywordsAndLinks[key].keywords is the array of keywords for key (ds, ml, ai) //keywordsAndLinks[key].keywords[i] is the keyword and keywordsAndLinks[key].link is the link //keyword and link is sent to searchreplace where it is then replaced using regular expression and replace function articleFilter( keywordsAndLinks[key].keywords[i], keywordsAndLinks[key].link ); } } function cleanLinks() { // (making smal functions is for DRY) this function gets the links and only keeps the first 2 and from the rest removes the anchor tag and replaces it with its text function removeLinks(links) { if (links.length > 1) { for (let i = 2; i < links.length; i++) { links[i].outerHTML = links[i].textContent; } } } //arrays which will contain all the achor tags found with the class (ds-link, ml-link, ailink) in each article inserted using search and replace let dslinks; let mllinks; let ailinks; let nllinks; let deslinks; let tdlinks; let iaslinks; let llinks; let pbplinks; let mlclinks; const content = document.querySelectorAll('article'); //all articles content.forEach((c) => { //to skip the articles with specific ids if (!articleIdsToSkip.includes(c.id)) { //getting all the anchor tags in each article one by one dslinks = document.querySelectorAll(`#${c.id} .entry-content a.ds-link`); mllinks = document.querySelectorAll(`#${c.id} .entry-content a.ml-link`); ailinks = document.querySelectorAll(`#${c.id} .entry-content a.ai-link`); nllinks = document.querySelectorAll(`#${c.id} .entry-content a.ntrl-link`); deslinks = document.querySelectorAll(`#${c.id} .entry-content a.des-link`); tdlinks = document.querySelectorAll(`#${c.id} .entry-content a.td-link`); iaslinks = document.querySelectorAll(`#${c.id} .entry-content a.ias-link`); mlclinks = document.querySelectorAll(`#${c.id} .entry-content a.mlc-link`); llinks = document.querySelectorAll(`#${c.id} .entry-content a.l-link`); pbplinks = document.querySelectorAll(`#${c.id} .entry-content a.pbp-link`); //sending the anchor tags list of each article one by one to remove extra anchor tags removeLinks(dslinks); removeLinks(mllinks); removeLinks(ailinks); removeLinks(nllinks); removeLinks(deslinks); removeLinks(tdlinks); removeLinks(iaslinks); removeLinks(mlclinks); removeLinks(llinks); removeLinks(pbplinks); } }); } //To remove extra achor tags of each category (ds, ml, ai) and only have 2 of each category per article cleanLinks(); */ //Recommended Articles var ctaLinks = [ /* ' ' + '

Subscribe to our AI newsletter!

' + */ '

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

'+ '

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!

' + '
' + '' + '' + '

Note: Content contains the views of the contributing authors and not Towards AI.
Disclosure: This website may contain sponsored content and affiliate links.

' + 'Discover Your Dream AI Career at Towards AI Jobs' + '

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 10,000 live jobs today with Towards AI Jobs!

' + '
' + '

🔥 Recommended Articles 🔥

' + 'Why Become an LLM Developer? Launching Towards AI’s New One-Stop Conversion Course'+ 'Testing Launchpad.sh: A Container-based GPU Cloud for Inference and Fine-tuning'+ 'The Top 13 AI-Powered CRM Platforms
' + 'Top 11 AI Call Center Software for 2024
' + 'Learn Prompting 101—Prompt Engineering Course
' + 'Explore Leading Cloud Providers for GPU-Powered LLM Training
' + 'Best AI Communities for Artificial Intelligence Enthusiasts
' + 'Best Workstations for Deep Learning
' + 'Best Laptops for Deep Learning
' + 'Best Machine Learning Books
' + 'Machine Learning Algorithms
' + 'Neural Networks Tutorial
' + 'Best Public Datasets for Machine Learning
' + 'Neural Network Types
' + 'NLP Tutorial
' + 'Best Data Science Books
' + 'Monte Carlo Simulation Tutorial
' + 'Recommender System Tutorial
' + 'Linear Algebra for Deep Learning Tutorial
' + 'Google Colab Introduction
' + 'Decision Trees in Machine Learning
' + 'Principal Component Analysis (PCA) Tutorial
' + 'Linear Regression from Zero to Hero
'+ '

', /* + '

Join thousands of data leaders on the AI newsletter. It’s free, we don’t spam, and we never share your email address. Keep up to date with the latest work in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

',*/ ]; var replaceText = { '': '', '': '', '
': '
' + ctaLinks + '
', }; Object.keys(replaceText).forEach((txtorig) => { //txtorig is the key in replacetext object const txtnew = replaceText[txtorig]; //txtnew is the value of the key in replacetext object let entryFooter = document.querySelector('article .entry-footer'); if (document.querySelectorAll('.single-post').length > 0) { //console.log('Article found.'); const text = entryFooter.innerHTML; entryFooter.innerHTML = text.replace(txtorig, txtnew); } else { // console.log('Article not found.'); //removing comment 09/04/24 } }); var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = '.post-tags { display:none !important } .article-cta a { font-size: 18px; }'; document.body.appendChild(css); //Extra //This function adds some accessibility needs to the site. function addAlly() { // In this function JQuery is replaced with vanilla javascript functions const imgCont = document.querySelector('.uw-imgcont'); imgCont.setAttribute('aria-label', 'AI news, latest developments'); imgCont.title = 'AI news, latest developments'; imgCont.rel = 'noopener'; document.querySelector('.page-mobile-menu-logo a').title = 'Towards AI Home'; document.querySelector('a.social-link').rel = 'noopener'; document.querySelector('a.uw-text').rel = 'noopener'; document.querySelector('a.uw-w-branding').rel = 'noopener'; document.querySelector('.blog h2.heading').innerHTML = 'Publication'; const popupSearch = document.querySelector$('a.btn-open-popup-search'); popupSearch.setAttribute('role', 'button'); popupSearch.title = 'Search'; const searchClose = document.querySelector('a.popup-search-close'); searchClose.setAttribute('role', 'button'); searchClose.title = 'Close search page'; // document // .querySelector('a.btn-open-popup-search') // .setAttribute( // 'href', // 'https://medium.com/towards-artificial-intelligence/search' // ); } // Add external attributes to 302 sticky and editorial links function extLink() { // Sticky 302 links, this fuction opens the link we send to Medium on a new tab and adds a "noopener" rel to them var stickyLinks = document.querySelectorAll('.grid-item.sticky a'); for (var i = 0; i < stickyLinks.length; i++) { /* stickyLinks[i].setAttribute('target', '_blank'); stickyLinks[i].setAttribute('rel', 'noopener'); */ } // Editorial 302 links, same here var editLinks = document.querySelectorAll( '.grid-item.category-editorial a' ); for (var i = 0; i < editLinks.length; i++) { editLinks[i].setAttribute('target', '_blank'); editLinks[i].setAttribute('rel', 'noopener'); } } // Add current year to copyright notices document.getElementById( 'js-current-year' ).textContent = new Date().getFullYear(); // Call functions after page load extLink(); //addAlly(); setTimeout(function() { //addAlly(); //ideally we should only need to run it once ↑ }, 5000); }; function closeCookieDialog (){ document.getElementById("cookie-consent").style.display = "none"; return false; } setTimeout ( function () { closeCookieDialog(); }, 15000); console.log(`%c 🚀🚀🚀 ███ █████ ███████ █████████ ███████████ █████████████ ███████████████ ███████ ███████ ███████ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ Towards AI is looking for contributors! │ │ Join us in creating awesome AI content. │ │ Let's build the future of AI together → │ │ https://towardsai.net/contribute │ │ │ └───────────────────────────────────────────────────────────────────┘ `, `background: ; color: #00adff; font-size: large`); //Remove latest category across site document.querySelectorAll('a[rel="category tag"]').forEach(function(el) { if (el.textContent.trim() === 'Latest') { // Remove the two consecutive spaces (  ) if (el.nextSibling && el.nextSibling.nodeValue.includes('\u00A0\u00A0')) { el.nextSibling.nodeValue = ''; // Remove the spaces } el.style.display = 'none'; // Hide the element } }); // Add cross-domain measurement, anonymize IPs 'use strict'; //var ga = gtag; ga('config', 'G-9D3HKKFV1Q', 'auto', { /*'allowLinker': true,*/ 'anonymize_ip': true/*, 'linker': { 'domains': [ 'medium.com/towards-artificial-intelligence', 'datasets.towardsai.net', 'rss.towardsai.net', 'feed.towardsai.net', 'contribute.towardsai.net', 'members.towardsai.net', 'pub.towardsai.net', 'news.towardsai.net' ] } */ }); ga('send', 'pageview'); -->