artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (2025)

UNICSUL

Eliel Sousa 07/10/2024

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (2)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (3)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (4)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (5)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (6)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (7)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (8)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (9)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (10)

artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (11)

Prévia do material em texto

<p>A Non-Technical Introduction</p><p>―</p><p>Tom Taulli</p><p>Artificial</p><p>Intelligence</p><p>Basics</p><p>ARTIFICIAL INTELLIGENCE</p><p>BASICS</p><p>A NON-TECHNICAL INTRODUCTION</p><p>TomTaulli</p><p>Artificial Intelligence Basics: A Non-Technical Introduction</p><p>ISBN-13 (pbk): 978-1-4842-5027-3 ISBN-13 (electronic): 978-1-4842-5028-0</p><p>https://doi.org/10.1007/978-1-4842-5028-0</p><p>Copyright © 2019 by Tom Taulli</p><p>This work is subject to copyright. All rights are reserved by the Publisher, whether the whole</p><p>or part of the material is concerned, specifically the rights of translation, reprinting, reuse of</p><p>illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical</p><p>way, and transmission or information storage and retrieval, electronic adaptation, computer</p><p>software, or by similar or dissimilar methodology now known or hereafter developed.</p><p>Trademarked names, logos, and images may appear in this book. Rather than use a</p><p>trademark symbol with every occurrence of a trademarked name, logo, or image we use</p><p>the names, logos, and images only in an editorial fashion and to the benefit of the trademark</p><p>owner, with no intention of infringement of the trademark.</p><p>The use in this publication of trade names, trademarks, service marks, and similar terms,</p><p>even if they are not identified as such, is not to be taken as an expression of opinion as to</p><p>whether or not they are subject to proprietary rights.</p><p>While the advice and information in this book are believed to be true and accurate at the</p><p>date of publication, neither the authors nor the editors nor the publisher can accept any</p><p>legal responsibility for any errors or omissions that may be made. The publisher makes no</p><p>warranty, express or implied, with respect to the material contained herein.</p><p>Managing Director, Apress Media LLC: Welmoed Spahr</p><p>Acquisitions Editor: Shiva Ramachandran</p><p>Development Editor: Rita Fernando</p><p>Coordinating Editor: Rita Fernando</p><p>Cover designed by eStudioCalamar</p><p>Distributed to the book trade worldwide by Springer Science+Business Media NewYork,</p><p>233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201)</p><p>348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress</p><p>Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business</p><p>Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.</p><p>For information on translations, please e-mail rights@apress.com, or visit http://www.</p><p>apress.com/rights-permissions.</p><p>Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook</p><p>versions and licenses are also available for most titles. For more information, reference our</p><p>Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.</p><p>Any source code or other supplementary material referenced by the author in this book is</p><p>available to readers on GitHub via the book's product page, located at www.apress.</p><p>com/978-1-4842-5027-3. For more detailed information, please visit http://www.apress.</p><p>com/source-code.</p><p>Printed on acid-free paper</p><p>TomTaulli</p><p>Monrovia, CA, USA</p><p>https://doi.org/10.1007/978-1-4842-5028-0</p><p>Chapter 1: AI Foundations � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 1</p><p>Chapter 2: Data � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �19</p><p>Chapter 3: Machine Learning � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �39</p><p>Chapter 4: Deep Learning � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �69</p><p>Chapter 5: Robotic Process Automation (RPA) � � � � � � � � � � � � � � � � � � � �91</p><p>Chapter 6: Natural Language Processing (NLP) � � � � � � � � � � � � � � � � � �103</p><p>Chapter 7: Physical Robots � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �125</p><p>Chapter 8: Implementation of AI � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �143</p><p>Chapter 9: The Future of AI � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �161</p><p>Appendix: AI Resources � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �177</p><p>Glossary � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �179</p><p>Index � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �185</p><p>Contents</p><p>About the Author � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � v</p><p>Foreword � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � vii</p><p>Introduction � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �ix</p><p>About the Author</p><p>TomTaulli has been developing software since</p><p>the 1980s. In college, he started his first com-</p><p>pany, which focused on the development of</p><p>e-learning systems. He created other companies</p><p>as well, including Hypermart.net that was sold to</p><p>InfoSpace in 1996. Along the way, Tom has writ-</p><p>ten columns for online publications such as busi-</p><p>nessweek.com, techweb.com, and Bloomberg.</p><p>com. He also writes posts on artificial intelli-</p><p>gence for Forbes.com and is the advisor to vari-</p><p>ous companies in the AI space. You can reach</p><p>Tom on Twitter (@ttaulli) or through his web</p><p>site (www.taulli.com).</p><p>http://www.taulli.com/</p><p>Foreword</p><p>As this book demonstrates, the adoption of artificial intelligence (AI) will be a</p><p>major inflection point in human history. Like other similarly groundbreaking</p><p>technologies, how it's administered and who has access to it will shape society</p><p>for generations to come. However, AI stands out from the other transforma-</p><p>tive technologies of the nineteenth and twentieth centuries—think the steam</p><p>engine, the electrical grid, genomics, computers, and the Internet—because it</p><p>doesn't depend exclusively on critically expensive physical infrastructure to</p><p>enable adoption; after all, many of its benefits can be delivered through existing</p><p>hardware we all carry around in our pockets. Instead, the fundamental limiting</p><p>factor when it comes to the mass adoption of AI technology is our shared intel-</p><p>lectual infrastructure: education, understanding, and vision.</p><p>This is a crucial difference because, if handled correctly, AI can act as a sweep-</p><p>ing democratizing force. It has and will eliminate from our lives the drudgery</p><p>of the past and free up a tremendous amount of human energy and capital.</p><p>But that "if" is far from certain. AI executed irresponsibly has the power to</p><p>destabilize large parts of the world economy by causing, as many people fear,</p><p>a shrinking workforce, reduced purchasing power for the middle class, and an</p><p>economy without a wide and stable base fueled by an endless debt spiral.</p><p>However, before we succumb to pessimism on AI, we should take a look back.</p><p>Historic though AI's transformative capacity may be—and it is historic—these</p><p>same issues are and have been at play in the economic landscape for decades,</p><p>even centuries. AI is, after all, an extension of a trend toward automation that</p><p>has been at play since Henry Ford. In fact, Zoho itself was born from the ten-</p><p>sion between automation and egalitarian economic principles. Back in the</p><p>early 2000s, we came to a realization that has shaped our approach to tech-</p><p>nology: regular people—small business owners, here and abroad—should</p><p>have access to the same advanced business automations that the Fortune 500</p><p>companies have; otherwise, a huge swath of the population will be locked out</p><p>of the economy.</p><p>At the time, powerful digital software was almost unanimously gated behind</p><p>rigid contracts, exorbitant fee structures, and complicated on-premise imple-</p><p>mentations. Big companies could shoulder the burden of such systems, while</p><p>smaller operators were locked out, putting them at a tremendous disadvan-</p><p>tage. We sought to disrupt that by opening up the promise of technology to</p><p>wider and wider audiences. Over the last two decades, we've endeavored to</p><p>viii</p><p>increase</p><p>efforts.</p><p>It was not until 1993 that IBM came out with its own relational database,</p><p>DB2. But it was too late. By this time, Oracle was the leader in the database</p><p>market.</p><p>Through the 1980s and 1990s, the relational database was the standard for</p><p>mainframe and client-server systems. But when Big Data became a factor, the</p><p>technology had serious flaws like the following:</p><p>• Data Sprawl: Over time, different databases would spread</p><p>across an organization. The result was that it got tougher</p><p>to centralize the data.</p><p>• New Environments: Relational database technology was</p><p>not built for cloud computing, high-velocity data, or</p><p>unstructured data.</p><p>• High Costs: Relational databases can be expensive. This</p><p>means that it can be prohibitive to use the technology for</p><p>AI projects.</p><p>• Development Challenges: Modern software development</p><p>relies heavily on iterating. But relational databases have</p><p>proven challenging for this process.</p><p>In the late 1990s, there were open source projects developed to help create next-</p><p>generation database systems. Perhaps the most critical one came from Doug</p><p>Cutting who developed Lucene, which was for text searching. The technology</p><p>was based on a sophisticated index system that allowed for low-latency</p><p>performance. Lucene was an instant hit, and it started to evolve, such as with</p><p>Apache Nutch that efficiently crawled the Web and stored the data in an index.</p><p>But there was a big problem: To crawl the Web, there needed to be an</p><p>infrastructure that could hyperscale. So in late 2003, Cutting began</p><p>development on a new kind of infrastructure platform that could solve the</p><p>problem. He got the idea from a paper published from Google, which</p><p>described its massive file system. A year later, Cutting had built his new</p><p>platform, which allowed for sophisticated storage without the complexity. At</p><p>the core of this was MapReduce that allowed processing across multiple</p><p>servers. The results would then be merged, allowing for meaningful reports.</p><p>Chapter 2 | Data</p><p>27</p><p>Eventually, Cutting’s system morphed into a platform called Hadoop—and it</p><p>would be essential for managing Big Data, such as making it possible to create</p><p>sophisticated data warehouses. Initially, Yahoo! used it, and then it quickly</p><p>spread, as companies like Facebook and Twitter adopted the technology.</p><p>These companies were now able to get a 360 view of their data, not just</p><p>subsets. This meant there could be more effective data experiments.</p><p>But as an open source project, Hadoop still lacked the sophisticated systems</p><p>for enterprise customers. To deal with this, a startup called Hortonworks</p><p>built new technologies like YARN on top of the Hadoop platform. It had</p><p>features like in-memory analytic processing, online data processing, and</p><p>interactive SQL processing. Such capabilities supported adoption of Hadoop</p><p>across many corporations.</p><p>But of course, there emerged other open source data warehouse projects.</p><p>The well-known ones, like Storm and Spark, focused on streaming data.</p><p>Hadoop, on the other hand, was optimized for batch processing.</p><p>Besides data warehouses, there was also innovation of the traditional database</p><p>business. Often these were known as NoSQL systems. Take MongoDB. It</p><p>started as an open source project and has turned into a highly successful</p><p>company, which went public in October 2017. The MongoDB database, which</p><p>has over 40 million downloads, is built to handle cloud, on-premise, and hybrid</p><p>environments.9 There is also much flexibility structuring the data, which is</p><p>based on a document model. MongoDB can even manage structured and</p><p>unstructured data at high petabyte scale.</p><p>Even though startups have been a source of innovation in database systems</p><p>and storage, it’s important to note that the mega tech operators have also</p><p>been critical. Then again, companies like Amazon.com and Google have had</p><p>to find ways to deal with the huge scale of data because of the need for</p><p>managing their massive platforms.</p><p>One of the innovations has been the data lake, which allows for seamless</p><p>storage of structured and unstructured data. Note that there is no need to</p><p>reformat the data. A data lake will handle this and allow you to quickly perform</p><p>AI functions. According to a study from Aberdeen, companies who use this</p><p>technology have an average of 9% organic growth compared to those who do</p><p>not.10</p><p>Now this does not mean you have to get rid of your data warehouses. Rather,</p><p>both serve particular functions and use cases. A data warehouse is generally</p><p>good for structured data, whereas a data lake is better for diverse environments.</p><p>What’s more, it’s likely that a large portion of the data will never be used.</p><p>9 www.mongodb.com/what-is-mongodb</p><p>10 https://aws.amazon.com/big-data/datalakes-and-analytics/</p><p>what-is-a-data-lake/</p><p>Artificial Intelligence Basics</p><p>http://www.mongodb.com/what-is-mongodb</p><p>https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/</p><p>https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/</p><p>28</p><p>For the most part, there are a myriad of tools. And expect more to be</p><p>developed as data environments get more complex.</p><p>But this does not mean you should chose the latest technology. Again, even</p><p>older relational databases can be quite effective with AI projects. The key is</p><p>understanding the pros/cons of each and then putting together a clear strategy.</p><p>Data Process</p><p>The amount of money shelled out on data is enormous. According to IDC,</p><p>the spending on Big Data and analytics solutions is forecasted to go from $166</p><p>billion in 2018 to $260 billion by 2022.11 This represents an 11.9% compound</p><p>annual growth rate. The biggest spenders include banks, discrete manufacturers,</p><p>process manufacturers, professional service firms, and the federal government.</p><p>They account for close to half the overall amount.</p><p>Here’s what IDC’s Jessica Goepfert—the program vice president (VP) of</p><p>Customer Insights and Analysis—said:</p><p>At a high level, organizations are turning to Big Data and analytics</p><p>solutions to navigate the convergence of their physical and digital worlds.</p><p>This transformation takes a different shape depending on the industry.</p><p>For instance, within banking and retail—two of the fastest growth areas</p><p>for Big Data and analytics—investments are all about managing and</p><p>reinvigorating the customer experience. Whereas in manufacturing, firms</p><p>are reinventing themselves to essentially be high tech companies, using</p><p>their products as a platform to enable and deliver digital services.12</p><p>But a high level of spending does not necessarily translate into good results.</p><p>A Gartner study estimates that roughly 85% of Big Data projects are</p><p>abandoned before they get to the pilot stage.13 Some of the reasons include</p><p>the following:</p><p>• Lack of a clear focus</p><p>• Dirty data</p><p>• Investment in the wrong IT tools</p><p>• Problems with data collection</p><p>• Lack of buy-in from key stakeholders and champions in</p><p>the organization</p><p>11 www.idc.com/getdoc.jsp?containerId=prUS44215218</p><p>12 www.idc.com/getdoc.jsp?containerId=prUS44215218</p><p>13 www.techrepublic.com/article/85-of-big-data-projects-fail-</p><p>but-your-developers-can-help-yours-succeed/</p><p>Chapter 2 | Data</p><p>http://www.idc.com/getdoc.jsp?containerId=prUS44215218</p><p>http://www.idc.com/getdoc.jsp?containerId=prUS44215218</p><p>http://www.techrepublic.com/article/85-of-big-data-projects-fail-but-your-developers-can-help-yours-succeed/</p><p>http://www.techrepublic.com/article/85-of-big-data-projects-fail-but-your-developers-can-help-yours-succeed/</p><p>29</p><p>In light of this, it is critical to have a data process. Notwithstanding there are</p><p>many approaches—often extoled by software vendors—there is one that has</p><p>widespread acceptance. A group of experts, software developers, consultants,</p><p>and academics created the CRISP-DM Process in the late 1990s. Take a look</p><p>at Figure2-1 for a visual.</p><p>In this chapter, we’ll take a look at steps #1 through #3. Then in the rest of</p><p>the book, we’ll cover the remaining ones (that is, we will look at Modelling</p><p>and Evaluation in Chapter 3 and Deployment</p><p>in Chapter 8).</p><p>Note that steps #1–#3 can account for 80% of the time of the data</p><p>process, which is based on the experience of Atif Kureishy, who is the</p><p>global VP of Emerging Practices at Teradata.14 This is due to factors like:</p><p>14 This is from the author’s interview with Atif Kureishy in February 2019.</p><p>Figure 2-1. The CRISP-DM Process</p><p>Artificial Intelligence Basics</p><p>30</p><p>The data is not well organized and comes from different sources (whether</p><p>from different vendors or silos in the organization), there is not enough</p><p>focus on automation tools, and the initial planning was insufficient for the</p><p>scope of the project.</p><p>It’s also worth keeping in mind that the CRISP-DM Process is not a strict</p><p>linear process. When dealing with data, there can be much iteration. For</p><p>example, there may be multiple attempts at coming up with the right data and</p><p>testing it.</p><p>Step #1—Business Understanding</p><p>You should come up with a clear view of the business problem to be solved.</p><p>Some examples:</p><p>• How might a price adjustment impact your sales?</p><p>• Will a change in copy lead to improved conversion of</p><p>digital ads?</p><p>• Does a fall in engagement mean there will be an increase</p><p>in churn?</p><p>Then, you must establish how you will measure success. Might it be that sales</p><p>should increase by at least 1% or that conversions should rise by 5%?</p><p>Here’s a case from Prasad Vuyyuru, who is a partner at the Enterprise Insights</p><p>Practice of Infosys Consulting:</p><p>Identifying which business problem to solve using AI and assessing what</p><p>value will be created are critical for the success of all AI projects. Without</p><p>such diligent focus on business value, AI projects risk not getting adopted</p><p>in the organization. AB Inbev’s experience in using AI to identify packag-</p><p>ing line motors that are likely to fail is a great example of how AI is creat-</p><p>ing practical value. ABInbev installed 20 wireless sensors to measure</p><p>vibrations at packaging lines motors. They compared sounds with nor-</p><p>mally functioning motors to identify anomalies which predicted eventual</p><p>failure of the motors.15</p><p>Regardless of the goal, it’s essential that the process be free of any prejudgments</p><p>or bias. The focus is to find the best results. No doubt, in some cases, there</p><p>will not be a satisfactory result.</p><p>Or, in other situations, there may be big surprises. A famous example of this</p><p>comes from the book Moneyball by Michael Lewis, which was also made into</p><p>a movie in 2011 that starred Brad Pitt. It’s a true story of how the Oakland</p><p>A’s used data science techniques to recruit players. The tradition in baseball</p><p>15 This is from the author’s interview of Prasad Vuyyuru in February 2019.</p><p>Chapter 2 | Data</p><p>31</p><p>was to rely on metrics like batting averages. But when using sophisticated data</p><p>analytics techniques, there were some startling results. The Oakland A’s</p><p>realized that the focus should be on slugging and on-base percentages. With</p><p>this information, the team was able to recruit high-performing players at</p><p>lower compensation levels.</p><p>The upshot is that you need to be open minded and willing to experiment.</p><p>In step #1, you should also assemble the right team for the project. Now</p><p>unless you work at a company like Facebook or Google, you will not have the</p><p>luxury of selecting a group of PhDs in machine learning and data science. Such</p><p>talent is quite rare—and expensive.</p><p>But you also do not need an army of top-notch engineers for an AI project</p><p>either. It is actually getting easier to apply machine learning and deep learning</p><p>models, because of open source systems like TensorFlow and cloud-based</p><p>platforms from Google, Amazon.com, and Microsoft. In other words, you may</p><p>only need a couple people with a background in data science.</p><p>Next, you should find people—likely from your organization—who have the</p><p>right domain expertise for the AI project. They will need to think through the</p><p>workflows, models, and the training data—with a particular understanding of</p><p>the industry and customer requirements.</p><p>Finally, you will need to evaluate the technical needs. What infrastructure and</p><p>software tools will be used? Will there be a need to increase capacity or</p><p>purchase new solutions?</p><p>Step #2—Data Understanding</p><p>In this step, you will look at the data sources for the project. Consider that</p><p>there are three main ones, which include the following:</p><p>• In-House Data: This data may come from a web site,</p><p>beacons in a store location, IoT sensors, mobile apps, and</p><p>so on. A major advantage of this data is that it is free and</p><p>customized to your business. But then again, there are</p><p>some risks. There can be problems if there has not been</p><p>enough attention on the data formatting or what data</p><p>should be selected.</p><p>• Open Source Data: This is usually freely available, which is</p><p>certainly a nice benefit. Some examples of open source</p><p>data include government and scientific information. The</p><p>data is often accessed through an API, which makes the</p><p>process fairly straightforward. Open source data is also</p><p>usually well formatted. However, some of the variables</p><p>may not be clear, and there could be bias, such as being</p><p>skewed to a certain demographic.</p><p>Artificial Intelligence Basics</p><p>32</p><p>• Third-Party Data: This is data from a commercial vendor.</p><p>But the fees can be high. In fact, the data quality, in some</p><p>cases, may be lacking.</p><p>According to Teradata—based on the firm’s own AI engagements—about</p><p>70% of data sources are in-house, 20% from open source, and the rest from</p><p>commercial vendors.16 But despite the source, all data must be trusted. If not,</p><p>there will likely be the problem of “garbage in, garbage out.”</p><p>To evaluate the data, you need to answer questions like the following:</p><p>• Is the data complete? What might be missing?</p><p>• Where did the data come from?</p><p>• What were the collection points?</p><p>• Who touched the data and processed it?</p><p>• What have been the changes in the data?</p><p>• What are the quality issues?</p><p>If you are working with structured data, then this stage should be easier.</p><p>However, when it comes to unstructured and semi-structured data, you will</p><p>need to label the data—which can be a protracted process. But there are</p><p>some tools emerging in the market that can help automate this process.</p><p>Step #3—Data Preparation</p><p>The first step in the data preparation process is to decide what datasets</p><p>to use.</p><p>Let’s take a look at a scenario: Suppose you work for a publishing company</p><p>and want to put together a strategy to improve customer retention. Some</p><p>of the data that should help would include demographic information on</p><p>the customer base like age, sex, income, and education. To provide more</p><p>color, you can also look at browser information. What type of content</p><p>interests customers? What’s the frequency and duration? Any other</p><p>interesting patterns—say accessing information during weekends? By</p><p>combining the sources of information, you can put together a powerful</p><p>model. For example, if there is a drop-off in activity in certain areas, it</p><p>could pose a risk of cancellation. This would alert sales people to reach</p><p>out to the customers.</p><p>16 This is from the author’s interview with Atif Kureishy in February 2019.</p><p>Chapter 2 | Data</p><p>33</p><p>While this is a smart process, there are still landmines. Including or excluding</p><p>even one variable can have a significant negative impact on an AI model. To</p><p>see why, look back at the financial crisis. The models for underwriting</p><p>mortgages were sophisticated and based on huge amounts of data. During</p><p>normal economic times, they worked quite well as major financial institutions</p><p>like Goldman Sachs, JP Morgan, and AIG relied on them heavily.</p><p>But there was a problem: The models did not account for falling housing</p><p>prices! The main reason was that—for decades—there had never been a</p><p>national drop. The assumption was that housing was mostly a local</p><p>phenomenon.</p><p>Of course, housing prices more than just fell—they plunged. The models then</p><p>proved to be far off the mark, and billions of dollars in losses nearly took</p><p>down the US financial system. The federal</p><p>government had little choice but to</p><p>lend $700 billion for a bailout of Wall Street.</p><p>Granted, this is an extreme case. But it does highlight the importance of data</p><p>selection. This is where having a solid team of domain experts and data</p><p>scientists can be essential.</p><p>Next, when in the data preparation stage, there will need to be data cleansing.</p><p>The fact is that all data has issues. Even companies like Facebook have gaps,</p><p>ambiguities, and outliers in their datasets. It’s inevitable.</p><p>So here are some actions you can take to cleanse the data:</p><p>• De-duplication: Set tests to identify any duplications and</p><p>delete the extraneous data.</p><p>• Outliers: This is data that is well beyond the range of most</p><p>of the rest of the data. This may indicate that the</p><p>information is not helpful. But of course, there are</p><p>situations where the reverse is true. This would be for</p><p>fraud deduction.</p><p>• Consistency: Make sure you have clear definitions for the</p><p>variables. Even terms like “revenue” or “customer” can</p><p>have multiple meanings.</p><p>• Validation Rules: As you look at the data, try to find the</p><p>inherent limitations. For example, you can have a flag for</p><p>the age column. If it is over 120in many cases, then the</p><p>data has some serious issues.</p><p>• Binning: Certain data may not need to be specific. Does it</p><p>really matter if someone is 35 or 37? Probably not. But</p><p>comparing those from 30–40 to 41–50 probably would.</p><p>Artificial Intelligence Basics</p><p>34</p><p>• Staleness: Is the data timely and relevant?</p><p>• Merging: In some cases, the columns of data may have</p><p>very similar information. Perhaps one has height in inches</p><p>and another in feet. If your model does not require a</p><p>more detailed number, you can just use the one for feet.</p><p>• One-Hot Encoding: This is a way to replace categorical</p><p>data as numbers. Example: Let’s say we have a database</p><p>with a column that has three possible values: Apple,</p><p>Pineapple, and Orange. You could represent Apple as 1,</p><p>Pineapple as 2, and Orange as 3. Sounds reasonable,</p><p>right? Perhaps not. The problem is that an AI algorithm</p><p>may think that Orange is greater than Apple. But with</p><p>one-hot encoding, you can avoid this problem. You will</p><p>create three new columns: is_Apple, is_Pineapple, and</p><p>is_Orange. For each row in the data, you’ll put 1 for</p><p>where the fruit exists and 0 for the rest.</p><p>• Conversion Tables: You can use this when translating data</p><p>from one standard to another. This would be the case if</p><p>you have data in the decimal system and want to move</p><p>over to the metric system.</p><p>These steps will go a long way in improving the quality of the data. There are</p><p>also automation tools that can help out, such as from companies like SAS,</p><p>Oracle, IBM, Lavastorm Analytics, and Talend. Then there are open source</p><p>projects, such as OpenRefine, plyr, and reshape2.</p><p>Regardless, the data will not be perfect. No data source is. There will likely</p><p>still be gaps and inaccuracies.</p><p>This is why you need to be creative. Look at what Eyal Lifshitz did, who is the</p><p>CEO of BlueVine. His company leverages AI to provide financing to small</p><p>businesses. “One of our data sources is credit information of our customers,”</p><p>he said. “But we’ve found that small business owners incorrectly identify their</p><p>type of business. This could mean bad results for our underwriting. To deal</p><p>with this, we scrape data from the customer website with AI algorithms,</p><p>which helps identify the industry.”17</p><p>Data cleansing approaches will also depend on the use cases for the AI project.</p><p>For example, if you are building a system for predictive maintenance in</p><p>manufacturing, the challenge will be to handle the wide variations from</p><p>different sensors. The result is that a large amount of the data may have little</p><p>value and be mostly noise.</p><p>17 This is from the author’s interview with Eyal Lifshitz in February 2019.</p><p>Chapter 2 | Data</p><p>35</p><p>Ethics andGovernance</p><p>You need to be mindful of any restrictions on the data. Might the vendor</p><p>prohibit you from using the information for certain purposes? Perhaps your</p><p>company will be on the hook if something goes wrong? To deal with these</p><p>issues, it is advisable to have the legal department brought in.</p><p>For the most part,data must be treated with care. After all, there are many</p><p>high-profile cases where companies have violated privacy. A prominent</p><p>example of this is Facebook. One of the company’s partners, Cambridge</p><p>Analytica, accessed millions of data points from profiles without the permission</p><p>of users. When a whistleblower uncovered this, Facebook stock plunged—</p><p>losing more than $100 billion in value. The company also came under pressure</p><p>from the US and European governments.18</p><p>Something else to be wary of is scraping data from public sources. True, this</p><p>is often an efficient way to create large datasets. There are also many tools</p><p>that can automate the process. But scraping could expose your company to</p><p>legal liability as the data may be subject to copyrights or privacy laws.</p><p>There are also some precautions that may ironically have inherent flaws. For</p><p>example, a recent study from MIT shows that anonymized data may not be</p><p>very anonymized. The researchers found that it was actually quite easy to</p><p>reconstruct this type of data and identify the individuals—such as by merging</p><p>two datasets. This was done by using data in Singapore from a mobile network</p><p>(GPS tracking) and a local transportation system. After about 11 weeks of</p><p>analysis, the researchers were able to identify 95% of the individuals.19</p><p>Finally, make sure you take steps to secure the data. The instances of</p><p>cyberattacks and threats continue to increase at an alarming rate. In 2018,</p><p>there were 53,000+ incidents and about 2,200 breaches, according to</p><p>Verizon.20 The report also noted the following:</p><p>• 76% of the breaches were financially motivated.</p><p>• 73% were from those outside the company.</p><p>• About half came from organized criminal groups and 12%</p><p>from nation-state or state-affiliated actors.</p><p>The increasing use of cloud and on-premise data can subject a company to</p><p>gaps in security as well. Then there is the mobile workforce, which can mean</p><p>access to data that could expose it to breaches.</p><p>18 h t t p s : / / v e n t u r e b e a t . c o m / 2 0 1 8 / 0 7 / 0 2 / u - s - a g e n c i e s - w i d e n -</p><p>investigation-into-what-facebook-knew-about-cambridge-analytica/</p><p>19 http://news.mit.edu/2018/privacy-risks-mobility-data-1207</p><p>20 https://enterprise.verizon.com/resources/reports/dbir/</p><p>Artificial Intelligence Basics</p><p>https://venturebeat.com/2018/07/02/u-s-agencies-widen-investigation-into-what-facebook-knew-about-cambridge-analytica/</p><p>https://venturebeat.com/2018/07/02/u-s-agencies-widen-investigation-into-what-facebook-knew-about-cambridge-analytica/</p><p>http://news.mit.edu/2018/privacy-risks-mobility-data-1207</p><p>https://enterprise.verizon.com/resources/reports/dbir/</p><p>36</p><p>The attacks are also getting much more damaging. The result is that a company</p><p>can easily suffer penalties, lawsuits, and reputational damage.</p><p>Basically, when putting together an AI project, make sure there is a security</p><p>plan and that it is followed.</p><p>How Much Data Do YouNeed forAI?</p><p>The more data, the better, right? This is usually the case. Look at something</p><p>called Hughes Phenomenon. This posits that as you add features to a model,</p><p>the performance generally increases.</p><p>But quantity is not the end-all, be-all. There may come a point where the data</p><p>starts to degrade. Keep in mind that you may run into something called the</p><p>curse of dimensionality. According to Charles Isbell, who is the professor and</p><p>senior associate dean of the School of Interactive Computing at Georgia Tech,</p><p>“As the number of features or dimensions grows, the amount of data we need</p><p>to generalize accurately grows exponentially.”21</p><p>What is the practical impact? It could make it impossible to have a good</p><p>model since there may not be enough data. This is why that when it comes to</p><p>applications like vision recognition, the curse of dimensionality can be quite</p><p>problematic. Even when analyzing</p><p>RGB images, the number of dimensions is</p><p>roughly 7,500. Just imagine how intensive the process would be using real-</p><p>time, high-definition video.</p><p>More Data Terms andConcepts</p><p>When engaging in data analysis, you should know the basic terms. Here are</p><p>some that you’ll often hear:</p><p>Categorical Data: This is data that does not have a numerical meaning. Rather,</p><p>it has a textual meaning like a description of a group (race and gender).</p><p>Although, you can assign numbers to each of the elements.</p><p>Data Type: This is the kind of information a variable represents, such as a</p><p>Boolean, integer, string, or floating point number.</p><p>Descriptive Analytics: This is analyzing data to get a better understanding of the</p><p>current status of a business. Some examples of this include measuring what</p><p>products are selling better or determining risks in customer support. There</p><p>are many traditional software tools for descriptive analytics, such as BI</p><p>applications.</p><p>21 www.kdnuggets.com/2017/04/must-know-curse-dimensionality.html</p><p>Chapter 2 | Data</p><p>http://www.kdnuggets.com/2017/04/must-know-curse-dimensionality.html</p><p>37</p><p>Diagnostic Analytics: This is querying data to see why something has happened.</p><p>This type of analytics uses techniques like data mining, decision trees, and</p><p>correlations.</p><p>ETL (Extraction, Transformation, and Load): This is a form of data integration</p><p>and is typically used in a data warehouse.</p><p>Feature: This is a column of data.</p><p>Instance: This is a row of data.</p><p>Metadata: This is data about data—that is, descriptions. For example, a music file</p><p>can have metadata like the size, length, date of upload, comments, genre, artist,</p><p>and so on. This type of data can wind up being quite useful for an AI project.</p><p>Numerical Data: This is any data that can be represented by a number. But</p><p>numerical data can have two forms. There is discrete data, which is an</p><p>integer—that is, a number without a decimal point. Then there is continuous</p><p>data that has a flow, say temperature or time.</p><p>OLAP (Online Analytical Processing): This is technology that allows you to analyze</p><p>information from various databases.</p><p>Ordinal Data: This is a mix of numerical and categorical data. A common</p><p>example of this is the five-star rating on Amazon.com. It has both a star and</p><p>a number associated with it.</p><p>Predictive Analytics: This involves using data to make forecasts. The models for</p><p>this are usually sophisticated and rely on AI approaches like machine learning.</p><p>To be effective, it is important to update the underlying model with new data.</p><p>Some of the tools for predictive analytics include machine learning approaches</p><p>like regressions.</p><p>Prescriptive Analytics: This is about leveraging Big Data to make better decisions.</p><p>This is not only focued on predicting outcomes—but understanding the</p><p>rationales. And this is where AI plays a big part.</p><p>Scalar Variables: These are variables that hold single values like name or credit</p><p>card number.</p><p>Transactional Data: This is data that is recorded on financial, business, and</p><p>logistical actions. Examples include payments, invoices, and insurance claims.</p><p>Conclusion</p><p>Being successful with AI means having a data-driven culture. This is what has</p><p>been critical for companies like Amazon.com, Google, and Facebook. When</p><p>making decisions, they look to the data first. There should also be wide</p><p>availability of data across the organization.</p><p>Artificial Intelligence Basics</p><p>38</p><p>Without this approach, success with AI will be fleeting, regardless of your</p><p>planning. Perhaps this helps explain that—according to a study from</p><p>NewVantage Partners—about 77% of respondents say that “business</p><p>adoption” of Big Data and AI remain challenges.22</p><p>Key Takeaways</p><p>• Structured data is labeled and formatted—and is often</p><p>stored in a relational database or spreadsheet.</p><p>• Unstructured data is information that has no predefined</p><p>formatting.</p><p>• Semi-structured data has some internal tags that help</p><p>with categorization.</p><p>• Big Data describes a way to handle huge amounts of</p><p>volumes of information.</p><p>• A relational database is based on relationships of data.</p><p>But this structure can prove difficult for modern-day</p><p>applications, such as AI.</p><p>• A NoSQL database is more free-form, being based on a</p><p>document model. This has made it better able to deal</p><p>with unstructured and semi-structured data.</p><p>• The CRISP-DM Process provides a way to manage data</p><p>for a project, with steps that include business</p><p>understanding, data understanding, data preparation,</p><p>modelling, evaluation, and deployment.</p><p>• Quantity of data is certainly important, but there also</p><p>needs to be much work on the quality. Even small errors</p><p>can have a huge impact on the results of an AI model.</p><p>22 http://newvantage.com/wp-content/uploads/2018/12/Big-Data-Executive-</p><p>Survey-2019-Findings-Updated-010219-1.pdf</p><p>Chapter 2 | Data</p><p>http://newvantage.com/wp-content/uploads/2018/12/Big-Data-Executive-Survey-2019-Findings-Updated-010219-1.pdf</p><p>http://newvantage.com/wp-content/uploads/2018/12/Big-Data-Executive-Survey-2019-Findings-Updated-010219-1.pdf</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_3</p><p>C H A P T E R</p><p>3</p><p>Machine</p><p>Learning</p><p>Mining Insights from Data</p><p>A breakthrough in machine learning would be worth ten Microsofts.</p><p>—Bill Gates1</p><p>While Katrina Lake liked to shop online, she knew the experience could be</p><p>much better. The main problem: It was tough to find fashions that were</p><p>personalized.</p><p>So began the inspiration for Stitch Fix, which Katrina launched in her</p><p>Cambridge apartment while attending Harvard Business School in 2011 (by</p><p>the way, the original name for the company was the less catchy “Rack Habit”).</p><p>The site had a Q&A for its users—asking about size and fashion styles, just to</p><p>name a few factors—and expert stylists would then put together curated</p><p>boxes of clothing and accessories that were sent out monthly.</p><p>The concept caught on quickly, and the growth was robust. But it was tough to</p><p>raise capital as many venture capitalists did not see the potential in the business.</p><p>Yet Katrina persisted and was able to create a profitable operation—fairly</p><p>quickly.</p><p>1 Steve Lohr, “Microsoft, Amid Dwindling Interest, Talks Up Computing as a Career:</p><p>Enrollment in Computing Is Dwindling,” New York Times, March 1, 2004, start page C1,</p><p>quote page C2, column 6.</p><p>40</p><p>Along the way, Stitch Fix was collecting enormous amounts of valuable data,</p><p>such as on body sizes and style preferences. Katrina realized that this would</p><p>be ideal for machine learning. To leverage on this, she hired Eric Colson, who</p><p>was the vice president of Data Science and Engineering at Netflix, his new</p><p>title being chief algorithms officer.</p><p>This change in strategy was pivotal. The machine learning models got better</p><p>and better with their predictions, as Stitch Fix collected more data—not only</p><p>from the initial surveys but also from ongoing feedback. The data was also</p><p>encoded in the SKUs.</p><p>The result: Stitch Fix saw ongoing improvement in customer loyalty and</p><p>conversion rates. There were also improvements in inventory turnover, which</p><p>helped to reduce costs.</p><p>But the new strategy did not mean firing the stylists. Rather, the machine</p><p>learning greatly augmented their productivity and effectiveness.</p><p>The data also provided insights on what types of clothing to create. This led</p><p>to the launch of Hybrid Designs in 2017, which is Stitch Fix’s private-label</p><p>brand. This proved effective in dealing with the gaps in inventory.</p><p>By November 2017, Katrina took Stitch Fix public, raising $120 million. The</p><p>valuation of the company was a cool $1.63 billion—making her one of the</p><p>richest women in the United States.2 Oh, and at the time, she had a 14-month-</p><p>old son!</p><p>Fast forward to today, Stitch Fix has 2.7 million customers in the United</p><p>States and generates over $1.2 billion in revenues. There are also more than</p><p>100 data scientists on staff and a majority of them have PhDs in areas like</p><p>neuroscience, mathematics, statistics, and AI.3</p><p>According to</p><p>the company’s 10-K filing:</p><p>Our data science capabilities fuel our business. These capabilities consist</p><p>of our rich and growing set of detailed client and merchandise data and</p><p>our proprietary algorithms. We use data science throughout our</p><p>business, including to style our clients, predict purchase behavior,</p><p>forecast demand, optimize inventory and design new apparel.4</p><p>2 www.cnbc.com/2017/11/16/stitch-fix-ipo-sees-orders-coming-in-under-</p><p>range.html</p><p>3 https://investors.stitchfix.com/static-files/2b398694-f553-4586-</p><p>b763-e942617e4dbf</p><p>4 www.sec.gov/Archives/edgar/data/1576942/000157694218000003/</p><p>stitchfix201810k.htm</p><p>Chapter 3 | Machine Learning</p><p>http://www.cnbc.com/2017/11/16/stitch-fix-ipo-sees-orders-coming-in-under-range.html</p><p>http://www.cnbc.com/2017/11/16/stitch-fix-ipo-sees-orders-coming-in-under-range.html</p><p>https://investors.stitchfix.com/static-files/2b398694-f553-4586-b763-e942617e4dbf</p><p>https://investors.stitchfix.com/static-files/2b398694-f553-4586-b763-e942617e4dbf</p><p>http://www.sec.gov/Archives/edgar/data/1576942/000157694218000003/stitchfix201810k.htm</p><p>http://www.sec.gov/Archives/edgar/data/1576942/000157694218000003/stitchfix201810k.htm</p><p>41</p><p>No doubt, the story of Stitch Fix clearly shows the incredible power of</p><p>machine learning and how it can disrupt an industry. In an interview with</p><p>digiday.com, Lake noted:</p><p>Historically, there’s been a gap between what you give to companies and</p><p>how much the experience is improved. Big data is tracking you all over</p><p>the web, and the most benefit you get from that right now is: If you</p><p>clicked on a pair of shoes, you’ll see that pair of shoes again a week from</p><p>now. We’ll see that gap begin to close. Expectations are very different</p><p>around personalization, but importantly, an authentic version of it. Not,</p><p>‘You abandoned your cart and we’re recognizing that.’ It will be genuinely</p><p>recognizing who you are as a unique human. The only way to do this</p><p>scalably is through embracing data science and what you can do through</p><p>innovation.5</p><p>OK then, what is machine learning really about? Why can it be so impactful?</p><p>And what are some of the risks to consider?</p><p>In this chapter, we’ll answer these questions—and more.</p><p>What Is Machine Learning?</p><p>After stints at MIT and Bell Telephone Laboratories, Arthur L.Samuel joined</p><p>IBM in 1949 at the Poughkeepsie Laboratory. His efforts helped boost the</p><p>computing power of the company’s machines, such as with the development</p><p>of the 701 (this was IBM’s first commercialized computer system).</p><p>But he also programmed applications. And there was one that would make</p><p>history—that is, his computer checkers game. It was the first example of a</p><p>machine learning system (Samuel published an influential paper on this in</p><p>19596). IBM CEO Thomas J.Watson, Sr., said that the innovation would add</p><p>15 points to the stock price!7</p><p>Then why was Samuel’s paper so consequential? By looking at checkers, he</p><p>showed how machine learning works—in other words, a computer could</p><p>learn and improve by processing data without having to be explicitly</p><p>programmed. This was possible by leveraging advanced concepts of statistics,</p><p>especially with probability analysis. Thus, a computer could be trained to</p><p>make accurate predictions.</p><p>5 https://digiday.com/marketing/stitch-fix-ceo-katrina-lake-</p><p>predicts-ais-impact-fashion/</p><p>6 Arthur L.Samuel, “Some Studies in Machine Learning Using the Game of Checkers,” in</p><p>Edward A. Feigenbaum and Julian Feldman, eds., Computers and Thought (New York:</p><p>McGraw-Hill, 1983), pp.71–105.</p><p>7 https://history.computer.org/pioneers/samuel.html</p><p>Artificial Intelligence Basics</p><p>https://digiday.com/marketing/stitch-fix-ceo-katrina-lake-predicts-ais-impact-fashion/</p><p>https://digiday.com/marketing/stitch-fix-ceo-katrina-lake-predicts-ais-impact-fashion/</p><p>https://history.computer.org/pioneers/samuel.html</p><p>42</p><p>This was revolutionary as software development, at this time, was mostly</p><p>about a list of commands that followed a workflow of logic.</p><p>To get a sense of how machine learning works, let’s use an example from the</p><p>HBO TV comedy show Silicon Valley. Engineer Jian-Yang was supposed to</p><p>create a Shazam for food. To train the app, he had to provide a massive dataset</p><p>of food pictures. Unfortunately, because of time constraints, the app only</p><p>learned how to identify…hot dogs. In other words, if you used the app, it</p><p>would only respondwith “hot dog” and “not hot dog.”</p><p>While humorous, the episode did a pretty good job of demonstrating machine</p><p>learning. In essence, it is a process of taking in labeled data and finding</p><p>relationships. If you train the system with hot dogs—such as thousands of</p><p>images—it will get better and better at recognizing them.</p><p>Yes, even TV shows can teach valuable lessons about AI!</p><p>But of course, you still need much more. In the next section of the chapter,</p><p>we’ll take a deeper look at the core statistics you need to know about machine</p><p>learning. This includes the standard deviation, the normal distribution, Bayes’</p><p>theorem, correlation, and feature extraction.</p><p>Then we’ll cover topics like the use cases for machine learning, the general</p><p>process, and the common algorithms.</p><p>Standard Deviation</p><p>The standard deviation measures the average distance from the mean. In fact,</p><p>there is no need to learn how to calculate this (the process involves multiple</p><p>steps) since Excel or other software can do this for you easily.</p><p>To understand the standard deviation, let’s take an example of the home</p><p>values in your neighborhood. Suppose that the average is $145,000 and the</p><p>standard deviation is $24,000. This means that one standard deviation below</p><p>the average would be $133,000 ($145,000 – $12,000) and one standard</p><p>deviation above the mean would come to $157,000 ($145,000 + $12,000).</p><p>This gives us a way to quantify the variation in the data. That is, there is a</p><p>spread of $24,000 from the average.</p><p>Next, let’s take a look at the data if, well, Mark Zuckerberg moves into your</p><p>neighborhood and, as a result, the average jumps to $850,000 and the standard</p><p>deviation is $175,000. But do these statistical metrics reflect the valuations?</p><p>Not really. Zuckerberg’s purchase is an outlier. In this situation, the best</p><p>approach may be instead to exclude his home.</p><p>Chapter 3 | Machine Learning</p><p>43</p><p>The Normal Distribution</p><p>When plotted on a graph, the normal distribution looks like a bell (this is why</p><p>another name for it is the “bell curve”). It represents the sum of probabilities</p><p>for a variable. Interestingly enough, the normal curve is common in the natural</p><p>world, as it reflects distributions of such things like height and weight.</p><p>A general approach when interpreting a normal distribution is to use the</p><p>68-95-99.7 rule. This estimates that 68% of the data items will fall within one</p><p>standard deviation, 95% within two standard deviations, and 99.7% within</p><p>three standard deviations.</p><p>A way to understand this is to use IQ scores. Suppose the mean score is 100</p><p>and the standard deviation is 15. We’d have this for the three standard</p><p>deviations, as shown in Figure3-1.</p><p>Note that the peak in this graph is the average. So, if a person has an IQ of</p><p>145, then only 0.15% will have a higher score.</p><p>Now the curve may have different shapes, depending on the variation in the</p><p>data. For example, if our IQ data has a large number of geniuses, then the</p><p>distribution will skew to the right.</p><p>Bayes’ Theorem</p><p>As the name implies, descriptive statistics provides information about your</p><p>data. We’ve already seen this with such things as averages and standard</p><p>deviations.</p><p>But of course, you can go well beyond this—basically, by using the Bayes’</p><p>theorem. This approach is common in analyzing medical diseases, in which</p><p>cause and effect are key—say for FDA (Federal Drug Administration) trials.</p><p>Figure 3-1. Normal distribution of IQ scores</p><p>Artificial Intelligence Basics</p><p>44</p><p>To understand how Bayes’ theorem works, let’s take an example. A researcher</p><p>comes up with a test for a certain type of cancer, and it has proven to be</p><p>accurate 80% of the</p><p>time. This is known as a true positive.</p><p>But 9.6% of the time, the test will identify the person as having the cancer</p><p>even though he or she does not have it, which is known as a false positive.</p><p>Keep in mind that—in some drug tests—this percentage may be higher than</p><p>the accuracy rate!</p><p>And finally, 1% of the population has the cancer.</p><p>In light of all this, if a doctor uses the test on you and it shows that you have</p><p>the cancer, what is the probability that you really have the cancer? Well, Bayes’</p><p>theorem will show the way. This calculation uses factors like accuracy rates,</p><p>false positives, and the population rate to come up with a probability:</p><p>• Step #1: 80% accuracy rate × the chance of having the</p><p>cancer (1%) = 0.008.</p><p>• Step #2: The chance of not having the cancer (99%) × the</p><p>9.6% false positive = 0.09504.</p><p>• Step #3: Then plug the above numbers into the following</p><p>equation: 0.008 / (0.008 + 0.09504) = 7.8%.</p><p>Sounds kind of out of whack, right? Definitely. After all, how is it that a test,</p><p>which is 90% accurate, has only a 7.8% probability of being right? But remember</p><p>the accuracy rate is based on the measure of those who have the flu. And this</p><p>is a small number since only 1% of the population has the flu. What’s more,</p><p>the test is still giving off false positives. So Bayes’ theorem is a way to provide</p><p>a better understanding of results—which is critical for systems like AI.</p><p>Correlation</p><p>A machine learning algorithm often involves some type of correlation among</p><p>the data. A quantitative way to describe this is to use the Pearson correlation,</p><p>which shows the strength of the relationship between two variables that</p><p>range from 1 to –1 (this is the coefficient).</p><p>Here’s how it works:</p><p>• Greater than 0: This is where an increase in one variable</p><p>leads to the increase in another. For example: Suppose</p><p>that there is a 0.9 correlation between income and</p><p>spending. If income increases by $1,000, then spending</p><p>will be up by $900 ($1,000 X 0.9).</p><p>• 0: There is no correlation between the two variables.</p><p>Chapter 3 | Machine Learning</p><p>45</p><p>• Less than 0: Any increase in the variable means a decrease</p><p>in another and vice versa. This describes an inverse</p><p>relationship.</p><p>Then what is a strong correlation? As a general rule of thumb, it’s if the</p><p>coefficient is +0.7 or so. And if it is under 0.3, then the correlation is tenuous.</p><p>All this harkens the old saying of “Correlation is not necessarily causation.”</p><p>Yet when it comes to machine learning, this concept can easily be ignored and</p><p>lead to misleading results.</p><p>For example, there are many correlations that are just random. In fact, some</p><p>can be downright comical. Check out the following from Tylervigen.com:8</p><p>• The divorce rate in Maine has a 99.26% correlation with</p><p>per capita consumption of margarine.</p><p>• The age of Miss America has an 87.01% correlation with</p><p>the murders by steam, hot vapors, and hot tropics.</p><p>• The US crude oil imports from Norway have a 95.4%</p><p>correlation with drivers killed in collision with a railway</p><p>train.</p><p>There is a name for this: patternicity. This is the tendency to find patterns in</p><p>meaningless noise.</p><p>Feature Extraction</p><p>In Chapter 2, we looked at selecting the variables for a model. The process is</p><p>often called feature extraction or feature engineering.</p><p>An example of this would be a computer model that identifies a male or</p><p>female from a photo. For humans, this is fairly easy and quick. It’s something</p><p>that is intuitive. But if someone asked you to describe the differences, would</p><p>you be able to? For most people, it would be a difficult task. However, if we</p><p>want to build an effective machine learning model, we need to get feature</p><p>extraction right—and this can be subjective.</p><p>8 www.tylervigen.com/spurious-correlations</p><p>Artificial Intelligence Basics</p><p>http://www.tylervigen.com/spurious-correlations</p><p>46</p><p>Table 3-1 shows some ideas about how a man’s face may differ from a woman’s.</p><p>This just scratches the surface as I’m sure you have your own ideas or</p><p>approaches. And this is normal. But this is also why such things as facial</p><p>recognition are highly complex and subject to error.</p><p>Feature extraction also has some nuanced issues. One is the potential for</p><p>bias. For example, do you have preconceptions of what a man or woman</p><p>looks like? If so, this can result in models that give wrong results.</p><p>Because of all this, it’s a good idea to have a group of experts who can</p><p>determine the right features. And if the feature engineering proves too</p><p>complex, then machine learning is probably not a good option.</p><p>But there is another approach to consider: deep learning. This involves</p><p>sophisticated models that find features in a data. Actually, this is one of the</p><p>reasons that deep learning has been a major breakthrough in AI.We’ll learn</p><p>more about this in the next chapter.</p><p>What Can YouDo withMachine Learning?</p><p>As machine learning has been around for decades, there have been many uses</p><p>for this powerful technology. It also helps that there are clear benefits, in</p><p>terms of cost savings, revenue opportunities, and risk monitoring.</p><p>To give a sense of the myriad applications, here’s a look at some examples:</p><p>• Predictive Maintenance: This monitors sensors to forecast</p><p>when equipment may fail. This not only helps to reduce</p><p>costs but also lessens downtime and boosts safety. In</p><p>fact, companies like PrecisionHawk are actually using</p><p>drones to collect data, which is much more efficient. The</p><p>technology has proven quite effective for industries like</p><p>energy, agriculture, and construction. Here’s what</p><p>PrecisionHawk notes about its own drone-based</p><p>predictive maintenance system: “One client tested the</p><p>use of visual line of sight (VLOS) drones to inspect a</p><p>Table 3-1. Facial features</p><p>Features Male</p><p>Eyebrows Thicker and straighter</p><p>Face shape Longer and larger, with more of a square shape</p><p>Jawbone Square, wider, and sharper</p><p>Neck Adam’s apple</p><p>Chapter 3 | Machine Learning</p><p>47</p><p>cluster of 10 well pads in a three-mile radius. Our client</p><p>determined that the use of drones reduced inspection</p><p>costs by approximately 66%, from $80–$90 per well pad</p><p>from traditional inspection methodology to $45–$60 per</p><p>well pad using VLOS drone missions.”9</p><p>• Recruiting Employees: This can be a tedious process since</p><p>many resumes are often varied. This means it is easy to</p><p>pass over great candidates. But machine learning can help</p><p>in a big way. Take a look at CareerBuilder, which has</p><p>collected and analyzed more than 2.3 million jobs, 680</p><p>million unique profiles, 310 million unique resumes, 10</p><p>million job titles, 1.3 billion skills, and 2.5 million</p><p>background checks to build Hello to Hire. It’s a platform</p><p>that has leveraged machine learning to reduce the number</p><p>of job applications—for a successful hire—to an average</p><p>of 75. The industry average, on the other hand, is about</p><p>150.10 The system also automates the creation of job</p><p>descriptions, which even takes into account nuances</p><p>based on the industry and location!</p><p>• Customer Experience: Nowadays, customers want a</p><p>personalized experience. They have become accustomed</p><p>to this by using services like Amazon.com and Uber. With</p><p>machine learning, a company can leverage its data to gain</p><p>insight—learning about what really works. This is so</p><p>important that it led Kroger to buy a company in the</p><p>space, called 84.51°. It is definitely key that it has data on</p><p>more than 60 million US households. Here’s a quick case</p><p>study: For most of its stores, Kroger had bulk avocados,</p><p>and only a few carried 4-packs. The conventional wisdom</p><p>was that 4-packs had to be discounted because of the size</p><p>disparity with the bulk items. But when applying machine</p><p>learning analysis, this proved to be incorrect, as the 4-packs</p><p>attracted new and different households like Millennials</p><p>and ClickList shoppers. By expanding 4-packs across the</p><p>chain, there was an overall increase in avocado sales.11</p><p>• Finance: Machine learning can detect discrepancies, say</p><p>with billing. But there is a new category of technology,</p><p>called RPA (Robotic</p><p>Process Automation), that can help</p><p>9 www.precisionhawk.com/blog/in-oil-gas-the-economics-of-bvlos-drone-</p><p>operations</p><p>10 This information is from the author’s interview in February 2019 with Humair Ghauri,</p><p>who is the chief product officer at CareerBuilder.</p><p>11 www.8451.com/case-study/avocado</p><p>Artificial Intelligence Basics</p><p>http://www.precisionhawk.com/blog/in-oil-gas-the-economics-of-bvlos-drone-operations</p><p>http://www.precisionhawk.com/blog/in-oil-gas-the-economics-of-bvlos-drone-operations</p><p>http://www.8451.com/case-study/avocado</p><p>48</p><p>with this (we’ll cover this topic in Chapter5). It automates</p><p>routine processes in order to help reduce errors. RPA</p><p>also may use machine learning to detect abnormal or</p><p>suspicious transactions.</p><p>• Customer Service: The past few years has seen the growth</p><p>in chatbots, which use machine learning to automate</p><p>interactions with customers. We’ll cover this in</p><p>Chapter6.</p><p>• Dating: Machine learning could help find your soul mate!</p><p>Tinder, one of the largest dating apps, is using the</p><p>technology to help improve the matches. For instance,</p><p>it has a system that automatically labels more than 10</p><p>billion photos that are uploaded on a daily basis.</p><p>Figure 3-2 shows some of the applications for machine learning.</p><p>The Machine Learning Process</p><p>To be successful with applying machine learning to a problem, it’s important</p><p>to take a systematic approach. If not, the results could be way off base.</p><p>First of all, you need to go through a data process, which we covered in the</p><p>prior chapter. When this is finished, it’s a good idea to do a visualization of the</p><p>data. Is it mostly scattered? Or are there some patterns? If the answer is yes,</p><p>then the data could be a good candidate for machine learning.</p><p>Figure 3-2. Applications for machine learning</p><p>Chapter 3 | Machine Learning</p><p>49</p><p>The goal of the machine learning process is to create a model, which is based</p><p>on one or more algorithms. We develop this by training it. The goal is that the</p><p>model should provide a high-degree of predictability.</p><p>Now let’s take a closer look at this (by the way, this will also be applicable for</p><p>deep learning, which we’ll cover in the next chapter):</p><p>Step #1—Data Order</p><p>If your data is sorted, then this could skew the results. That is, the machine</p><p>learning algorithm may detect this as a pattern! This is why it’s a good idea to</p><p>randomize the order of the data.</p><p>Step #2—Choose aModel</p><p>You will need to select an algorithm. This will be an educated guess, which will</p><p>involve a process of trial and error. In this chapter, we’ll look at the various</p><p>algorithms available.</p><p>Step #3—Train theModel</p><p>The training data, which will be about 70% of the complete dataset, will be</p><p>used to create the relationships in the algorithm. For example, suppose you</p><p>are building a machine learning system to find the value of a used car. Some of</p><p>the features will include the year manufactured, make, model, mileage, and</p><p>condition. By processing this training data, the algorithm will calculate the</p><p>weights for each of these factors.</p><p>Example: Suppose we are using a linear regression algorithm, which has the</p><p>following format:</p><p>y = m * x + b</p><p>In the training phase, the system will come up with the values for m (which is</p><p>the slope on a graph) and b (which is the y-intercept).</p><p>Step #4—Evaluate theModel</p><p>You will put together test data, which is the remaining 30% of the dataset. It</p><p>should be representative of the ranges and type of information in the training</p><p>data.</p><p>With the test data, you can see if the algorithm is accurate. In our used car</p><p>example, are the market values consistent with what’s happening in the real</p><p>world?</p><p>Artificial Intelligence Basics</p><p>50</p><p>■ Note With the training and test data, there must not be any intermingling. This can easily lead</p><p>to distorted results. Interestingly enough, this is a common mistake.</p><p>Now accuracy is one measure of the success of the algorithm. But this can, in</p><p>some cases, be misleading. Consider the situation with fraud deduction. There</p><p>are usually a small number of features when compared to a dataset. But missing</p><p>one could be devastating, costing a company millions of dollars in losses.</p><p>This is why you might want to use other approaches like Bayes’ theorem.</p><p>Step #5—Fine-Tune theModel</p><p>In this step, we can adjust the values of the parameters in the algorithm. This</p><p>is to see if we can get better results.</p><p>When fine-tuning the model, there may also be hyperparameters. These are</p><p>parameters that cannot be learned directly from the training process.</p><p>Applying Algorithms</p><p>Some algorithms are quite easy to calculate, while others require complex</p><p>steps and mathematics. The good news is that you usually do not have to</p><p>compute an algorithm because there are a variety of languages like Python and</p><p>R that make the process straightforward.</p><p>As for machine learning, an algorithm is typically different from a traditional</p><p>one. The reason is that the first step is to process data—and then, the</p><p>computer will start to learn.</p><p>Even though there are hundreds of machine learning algorithms available, they</p><p>can actually be divided into four major categories: supervised learning,</p><p>unsupervised learning, reinforcement learning, and semi-supervised learning.</p><p>We’ll take a look at each.</p><p>Supervised Learning</p><p>Supervised learning uses labeled data. For example, suppose we have a set of</p><p>photos of thousands of dogs. The data is considered to be labeled if each</p><p>photo identifies each for the breed. For the most part, this makes it easier to</p><p>analyze since we can compare our results with the correct answer.</p><p>One of the keys with supervised learning is that there should be large amounts</p><p>of data. This helps to refine the model and produce more accurate results.</p><p>Chapter 3 | Machine Learning</p><p>51</p><p>But there is a big issue: The reality is that much of the data available is not</p><p>labeled. In addition, it could be time consuming to provide labels if there is a</p><p>massive dataset.</p><p>Yet there are creative ways to deal with this, such as with crowdfunding. This</p><p>is how the ImageNet system was built, which was a breakthrough in AI</p><p>innovation. But it still took several years to create it.</p><p>Or, in some cases, there can be automated approaches to label data. Take the</p><p>example of Facebook. In 2018, the company announced—at its F8 developers</p><p>conference—it leveraged its enormous database of photos from Instagram,</p><p>which were labeled with hashtags.12</p><p>Granted, this approach had its flaws. A hashtag may give a nonvisual description</p><p>of the photo—say #tbt (which is “throwback Thursday)—or could be too vague,</p><p>like #party. This is why Facebook called its approach “weakly supervised data.”</p><p>But the talented engineers at the company found some ways to improve the</p><p>quality, such as by building a sophisticated hashtag prediction model.</p><p>All in all, things worked out quite well. Facebook’s machine learning model,</p><p>which included 3.5 billion photos, had an accuracy rate of 85.4%, which was</p><p>based on the ImageNet recognition benchmark. It was actually the highest</p><p>recorded in history, by 2%.</p><p>This AI project also required innovative approaches for building the</p><p>infrastructure. According to the Facebook blog post:</p><p>Since a single machine would have taken more than a year to complete</p><p>the model training, we created a way to distribute the task across up to</p><p>336 GPUs, shortening the total training time to just a few weeks. With</p><p>ever-larger model sizes—the biggest in this research is a ResNeXt 101-</p><p>32x48d with over 861 million parameters—such distributed training is</p><p>increasingly essential. In addition, we designed a method for removing</p><p>duplicates to ensure we don’t accidentally train our models on images</p><p>that we want to evaluate them on, a problem that plagues similar</p><p>research in this area.13</p><p>Going forward, Facebook sees potential in using its approach to various areas,</p><p>including the following:</p><p>• Improved ranking in the newsfeed</p><p>• Better detection of objectionable content</p><p>• Auto generation of captions for the visually</p><p>impaired</p><p>12 www.engadget.com/2018/05/02/facebook-trained-image-recognition-ai-</p><p>instagram-pics/</p><p>13 https://code.fb.com/ml-applications/advancing-state-of-the-art-image-</p><p>recognition-with-deep-learning-on-hashtags/</p><p>Artificial Intelligence Basics</p><p>http://www.engadget.com/2018/05/02/facebook-trained-image-recognition-ai-instagram-pics/</p><p>http://www.engadget.com/2018/05/02/facebook-trained-image-recognition-ai-instagram-pics/</p><p>https://code.fb.com/ml-applications/advancing-state-of-the-art-image-recognition-with-deep-learning-on-hashtags/</p><p>https://code.fb.com/ml-applications/advancing-state-of-the-art-image-recognition-with-deep-learning-on-hashtags/</p><p>52</p><p>Unsupervised Learning</p><p>Unsupervised learning is when you are working with unlabeled data. This</p><p>means that you will use deep learning algorithms to detect patterns.</p><p>By far, the most common approach for unsupervised learning is clustering,</p><p>which takes unlabeled data and uses algorithms to put similar items into</p><p>groups. The process usually starts with guesses, and then there are iterations</p><p>of the calculations to get better results. At the heart of this is finding data</p><p>items that are close together, which can be accomplished with a variety of</p><p>quantitative methods:</p><p>• Euclidean Metric: This is a straight line between two data</p><p>points. The Euclidean metric is quite common with</p><p>machine learning.</p><p>• Cosine Similarity Metric: As the name implies, you will use</p><p>a cosine to measure the angle. The idea is to find</p><p>similarities between two data points in terms of the</p><p>orientation.</p><p>• Manhattan Metric: This involves taking the sum of the</p><p>absolute distances of two points on the coordinates of</p><p>a graph. It’s called the “Manhattan” because it references</p><p>the city’s street layout, which allows for shorter distances</p><p>for travel.</p><p>In terms of use cases for clustering, one of the most common is customer</p><p>segmentation, which is to help better target marketing messages. For the</p><p>most part, a group that has similar characteristics is likely to share interests</p><p>and preferences.</p><p>Another application is sentiment analysis, which is where you mine social</p><p>media data and find the trends. For a fashion company, this can be crucial in</p><p>understanding how to adapt the styles of the upcoming line of clothes.</p><p>Now there are other approaches than just clustering. Here’s a look at three</p><p>more:</p><p>• Association: The basic concept is that if X happens, then Y</p><p>is likely to happen. Thus, if you buy my book on AI, you</p><p>will probably want to buy other titles in the genre. With</p><p>association, a deep learning algorithm can decipher these</p><p>kinds of relationships. This can result in powerful</p><p>recommendation engines.</p><p>Chapter 3 | Machine Learning</p><p>53</p><p>• Anomaly Detection: This identifies outliers or anomalous</p><p>patterns in the dataset, which can be helpful with</p><p>cybersecurity applications. According to Asaf Cidon, who</p><p>is the VP of Email Security at Barracuda Networks:</p><p>“We’ve found that by combining many different signals—</p><p>such as the email body, header, the social graph of</p><p>communications, IP logins, inbox forwarding rules, etc.—</p><p>we’re able to achieve an extremely high precision in</p><p>detecting social engineering attacks, even though the</p><p>attacks are highly personalized and crafted to target a</p><p>particular person within a particular organization. Machine</p><p>learning enables us to detect attacks that originate from</p><p>within the organization, whose source is a legitimate</p><p>mailbox of an employee, which would be impossible to do</p><p>with a static one-size-fits-all rule engine.”14</p><p>• Autoencoders: With this, the data will be put into a</p><p>compressed form, and then it will be reconstructed.</p><p>From this, new patterns may emerge. However, the use of</p><p>autoencoders is rare. But it could be shown to be useful</p><p>in helping with applications like reducing noise in data.</p><p>Consider that many AI researchers believe that unsupervised learning will</p><p>likely be critical for the next level of achievements. According to a paper in</p><p>Nature by Yann LeCun, Geoffrey Hinton, and Yoshua Bengio, “We expect</p><p>unsupervised learning to become far more important in the longer term.</p><p>Human and animal learning is largely unsupervised: we discover the structure</p><p>of the world by observing it, not by being told the name of every object.”15</p><p>Reinforcement Learning</p><p>When you were a kid and wanted to play a new sport, chances were you did</p><p>not read a manual. Instead, you observed what other people were doing and</p><p>tried to figure things out. In some situations, you made mistakes and lost the</p><p>ball as your teammates would show their displeasure. But in other cases, you</p><p>made the right moves and scored. Through this trial-and-error process, your</p><p>learning was improved based on positive and negative reinforcement.</p><p>14 This is from the author’s interview in February 2019 with Asaf Cidon, who is the VP of</p><p>Email Security at Barracuda Networks.</p><p>15 https://towardsdatascience.com/simple-explanation-of-semi-supervised-</p><p>learning-and-pseudo-labeling-c2218e8c769b</p><p>Artificial Intelligence Basics</p><p>https://towardsdatascience.com/simple-explanation-of-semi-supervised-learning-and-pseudo-labeling-c2218e8c769b</p><p>https://towardsdatascience.com/simple-explanation-of-semi-supervised-learning-and-pseudo-labeling-c2218e8c769b</p><p>54</p><p>At a high level, this is analogous to reinforcement learning. It has been key for</p><p>some of the most notable achievements in AI, such as the following:</p><p>• Games: They are ideal for reinforcement learning since</p><p>there are clear-cut rules, scores, and various constraints</p><p>(like a game board). When building a model, you can test</p><p>it with millions of simulations, which means that the</p><p>system will quickly get smarter and smarter. This is how</p><p>a program can learn to beat the world champion of Go</p><p>or chess.</p><p>• Robotics: A key is being able to navigate within a space—</p><p>and this requires evaluating the environment at many</p><p>different points. If the robot wants to move to, say, the</p><p>kitchen, it will need to navigate around furniture and</p><p>other obstacles. If it runs into things, there will be a</p><p>negative reinforcement action.</p><p>Semi-supervised Learning</p><p>This is a mix of supervised and unsupervised learning. This arises when you</p><p>have a small amount of unlabeled data. But you can use deep learning systems</p><p>to translate the unsupervised data to supervised data—a process that is called</p><p>pseudo-labeling. After this, you can then apply the algorithms.</p><p>An interesting use case of semi-supervised learning is the interpretation of</p><p>MRIs. A radiologist can first label the scans, and after this, a deep learning</p><p>system can find the rest of the patterns.</p><p>Common Types ofMachine Learning</p><p>Algorithms</p><p>There is simply not enough room in this book to cover all the machine learning</p><p>algorithms! Instead, it’s better to focus on the most common ones.</p><p>In the remaining part of this chapter, we’ll take a look at those for the following:</p><p>• Supervised Learning: You can boil down the algorithms to</p><p>two variations. One is classification, which divides the</p><p>dataset into common labels. Examples of the algorithms</p><p>include Naive Bayes Classifier and k-Nearest Neighbor</p><p>(neural networks will be covered in Chapter 4). Next,</p><p>there is regression, which finds continuous patterns in</p><p>the data. For this, we’ll take a look at linear regression,</p><p>ensemble modelling, and decision trees.</p><p>Chapter 3 | Machine Learning</p><p>55</p><p>• Unsupervised Learning: In this category, we’ll look at</p><p>clustering. For this, we’ll cover k-Means clustering.</p><p>Figure 3-3 shows a general framework for machine learning algorithms.</p><p>Naïve Bayes Classifier (Supervised</p><p>Learning/Classification)</p><p>Earlier in this chapter, we looked at Bayes’ theorem. As for machine learning,</p><p>this has been modified into something called the Naïve Bayes Classifier. It is</p><p>“naïve” because the assumption is that the variables are independent from</p><p>each other—that is, the occurrence of one variable has nothing to do with</p><p>the others. True, this may seem like a drawback. But the fact is that the Naïve</p><p>Bayes Classifier has proven to be quite</p><p>effective and fast to develop.</p><p>There is another assumption to note as well: the a priori assumption. This</p><p>says that the predictions will be wrong if the data has changed.</p><p>There are three variations on the Naïve Bayes Classifier:</p><p>• Bernoulli: This is if you have binary data (true/false, yes/no).</p><p>• Multinomial: This is if the data is discrete, such as the</p><p>number of pages of a book.</p><p>• Gaussian: This is if you are working with data that</p><p>conforms to a normal distribution.</p><p>Figure 3-3. General framework for machine learning algorithms</p><p>Artificial Intelligence Basics</p><p>56</p><p>A common use case for Naïve Bayes Classifiers is text analysis. Examples</p><p>include email spam detection, customer segmentation, sentiment analysis,</p><p>medical diagnosis, and weather predictions. The reason is that this approach</p><p>is useful in classifying data based on key features and patterns.</p><p>To see how this is done, let’s take an example: Suppose you run an e-commerce</p><p>site and have a large database of customer transactions. You want to see how</p><p>variables like product review ratings, discounts, and time of year impact sales.</p><p>Table 3-2 shows a look at the dataset.</p><p>You will then organize this data into frequency tables, as shown in Tables 3-3</p><p>and 3-4.</p><p>Table 3-2. Customer transactions dataset</p><p>Discount Product Review Purchase</p><p>Yes High Yes</p><p>Yes Low Yes</p><p>No Low No</p><p>No Low No</p><p>No Low No</p><p>No High Yes</p><p>Yes High No</p><p>Yes Low Yes</p><p>No High Yes</p><p>Yes High Yes</p><p>No High No</p><p>No Low Yes</p><p>Yes High Yes</p><p>Yes Low No</p><p>Table 3-3. Discount frequency table</p><p>Purchase</p><p>Yes No</p><p>Discount Yes 19 1</p><p>Yes 5 5</p><p>Chapter 3 | Machine Learning</p><p>57</p><p>When looking at this, we call the purchase an event and the discount and</p><p>product reviews as independent variables. Then we can make a probability</p><p>table for one of the independent variables, say the product reviews. See</p><p>Table3-5.</p><p>Using this chart, we can see that the probability of a purchase when there is</p><p>a low product review is 7/24 or 29%. In other words, the Naïve Bayes Classifier</p><p>allows more granular predictions within a dataset. It is also relatively easy to</p><p>train and can work well with small datasets.</p><p>K-Nearest Neighbor (Supervised</p><p>Learning/Classification)</p><p>The k-Nearest Neighbor (k-NN) is a method for classifying a dataset (k</p><p>represents the number of neighbors). The theory is that those values that are</p><p>close together are likely to be good predictors for a model. Think of it as</p><p>“Birds of a feather flock together.”</p><p>A use case for k-NN is the credit score, which is based on a variety of factors</p><p>like income, payment histories, location, home ownership, and so on. The</p><p>algorithm will divide the dataset into different segments of customers. Then,</p><p>when there is a new customer added to the base, you will see what cluster he</p><p>or she falls into—and this will be the credit score.</p><p>K-NN is actually simple to calculate. In fact, it is called lazy learning because</p><p>there is no training process with the data.</p><p>Table 3-4. Product review frequency table</p><p>Purchase</p><p>Yes No Total</p><p>Product Review High 21 2 11</p><p>Low 3 4 8</p><p>Total 24 6 19</p><p>Table 3-5. Product review probability table</p><p>Purchase</p><p>Yes No</p><p>Product Reviews High 9/24 2/6 11/30</p><p>Low 7/24 1/6 8/30</p><p>24/30 6/30</p><p>Artificial Intelligence Basics</p><p>58</p><p>To use k-NN, you need to come up with the distance between the nearest</p><p>values. If the values are numerical, it could be based on a Euclidian distance,</p><p>which involves complicated math. Or, if there is categorical data, then you can</p><p>use an overlap metric (this is where the data is the same or very similar).</p><p>Next, you’ll need to identify the number of neighbors. While having more will</p><p>smooth the model, it can also mean a need for huge amount of computational</p><p>resources. To manage this, you can assign higher weights to data that are</p><p>closer to their neighbors.</p><p>Linear Regression (Supervised</p><p>Learning/Regression)</p><p>Linear regression shows the relationship between certain variables. The</p><p>equation—assuming there is enough quality data—can help predict outcomes</p><p>based on inputs.</p><p>Example: Suppose we have data on the number of hours spent studying for an</p><p>exam and the grade. See Table3-6.</p><p>As you can see, the general relationship is positive (this describes the tendency</p><p>where a higher grade is correlated with more hours of study). With the</p><p>regression algorithm, we can plot a line that has the best fit (this is done by</p><p>using a calculation called “least squares,” which minimizes the errors). See</p><p>Figure3-4.</p><p>Table 3-6. Chart for hours of study and grades</p><p>Hours of Study Grade Percentage</p><p>1 0.75</p><p>1 0.69</p><p>1 0.71</p><p>3 0.82</p><p>3 0.83</p><p>4 0.86</p><p>5 0.85</p><p>5 0.89</p><p>5 0.84</p><p>6 0.91</p><p>6 0.92</p><p>7 0.95</p><p>Chapter 3 | Machine Learning</p><p>59</p><p>From this, we get the following equation:</p><p>Grade = Number of hours of study × 0.03731 + 0.6889</p><p>Then, let’s suppose you study 4 hours for the exam. What will be your</p><p>estimated grade? The equation tells us how:</p><p>0.838 = 4 × 0.03731 + 0.6889</p><p>How accurate is this? To help answer this question, we can use a calculation</p><p>called R-squared. In our case, it is 0.9180 (this ranges from 0 to 1). The closer</p><p>the value is to 1, the better the fit. So 0.9180 is quite high. It means that the</p><p>hours of study explains 91.8% of the grade on the exam.</p><p>Now it’s true that this model is simplistic. To better reflect reality, you can</p><p>add more variables to explain the grade on the exam—say the student’s</p><p>attendance. When doing this, you will use something called multivariate</p><p>regression.</p><p>■ Note If the coefficient for a variable is quite small, then it might be a good idea to not include</p><p>it in the model.</p><p>Sometimes data may not be in a straight line either, in which case the regression</p><p>algorithm will not work. But you can use a more complex version, called</p><p>polynomial regression.</p><p>Figure 3-4. This is a plot of a linear regression model that is based on hours of study</p><p>Artificial Intelligence Basics</p><p>60</p><p>Decision Tree (Supervised</p><p>Learning/Regression)</p><p>No doubt, clustering may not work on some datasets. But the good news is</p><p>that there are alternatives, such as a decision tree. This approach generally</p><p>works better with nonnumerical data.</p><p>The start of a decision tree is the root node, which is at the top of the flow</p><p>chart. From this point, there will be a tree of decision paths, which are</p><p>called splits. At these points, you will use an algorithm to make a decision,</p><p>and there will be a probability computed. At the end of the tree will be the</p><p>leaf (or the outcome).</p><p>A famous example—in machine learning circles—is to use a decision tree for</p><p>the tragic sinking of the Titanic. The model predicts the survival of a passenger</p><p>based on three features: sex, age, and the number of spouses or children</p><p>along (sibsp). Here’s how it looks, in Figure3-5.</p><p>There are clear advantages for decision trees. They are easy to understand,</p><p>work well with large datasets, and provide transparency with the model.</p><p>However, decision trees also have drawbacks. One is error propagation. If one</p><p>of the splits turns out to be wrong, then this error can cascade throughout</p><p>the rest of the model!</p><p>Figure 3-5. This is a basic decision tree algorithm for predicting the survival of the Titanic</p><p>Chapter 3 | Machine Learning</p><p>61</p><p>Next, as the decision trees grow, there will be more complexity as there will</p><p>be a large number of algorithms. This could ultimately result in lower</p><p>performance for the model.</p><p>Ensemble Modelling (Supervised</p><p>Learning/Regression)</p><p>Ensemble modelling means using more than one model for your predictions.</p><p>Even though this increases the complexity, this approach has been shown to</p><p>generate strong results.</p><p>To see this in action, take a look at the “Netflix Prize,” which began in 2006.</p><p>The company announced it would pay $1 million to anyone or any team that</p><p>could improve the accuracy of its movie recommendation system by 10% or</p><p>more. Netflix also provided a dataset of over 100 million ratings of 17,770</p><p>movies from 480,189 users.16 There would ultimately be more than 30,000</p><p>downloads.</p><p>Why did Netflix do all this? A big</p><p>reason is that the company’s own engineers</p><p>were having trouble making progress. Then why not give it to the crowd to</p><p>figure out? It turned out to be quite ingenious—and the $1 million payout was</p><p>really modest compared to the potential benefits.</p><p>The contest certainly stirred up a lot of activity from coders and data</p><p>scientists, ranging from students to employees at companies like AT&T.</p><p>Netflix also made the contest simple. The main requirement was that the</p><p>teams had to disclose their methods, which helped boost the results (there</p><p>was even a dashboard with rankings of the teams).</p><p>But it was not until 2009 that a team—BellKor’s Pragmatic Chaos—won the</p><p>prize. Then again, there were considerable challenges.</p><p>So how did the winning team pull it off? The first step was to create a baseline</p><p>model that smoothed out the tricky issues with the data. For example, some</p><p>movies only had a handful of ratings, whereas others had thousands. Then</p><p>there was the thorny problem where there were users who would always rate</p><p>a movie with one star. To deal with these matters, BellKor used machine</p><p>learning to predict ratings in order to fill the gaps.</p><p>16 www.thrillist.com/entertainment/nation/the-netflix-prize</p><p>Artificial Intelligence Basics</p><p>http://www.thrillist.com/entertainment/nation/the-netflix-prize</p><p>62</p><p>Once the baseline was finished, there were more tough challenges to tackle</p><p>like the following:</p><p>• A system may wind up recommending the same films to</p><p>many users.</p><p>• Some movies may not fit well within genres. For example,</p><p>Alien is really a cross of science fiction and horror.</p><p>• There were movies, like Napoleon Dynamite, that proved</p><p>extremely difficult for algorithms to understand.</p><p>• Ratings of a movie would often change over time.</p><p>The winning team used ensemble modelling, which involved hundreds of</p><p>algorithms. They also used something called boosting, which is where you</p><p>build consecutive models. With this, the weights in the algorithms are adjusted</p><p>based on the results of the previous model, which help the predictions get</p><p>better over time (another approach, called bagging, is when you build different</p><p>models in parallel and then select the best one).</p><p>But in the end, BellKor found the solutions. However, despite this, Netflix did</p><p>not use the model! Now it’s not clear why this was the case. Perhaps it was</p><p>that Netflix was moving away from five-star ratings anyway and was more</p><p>focused on streaming. The contest also had blowback from people who</p><p>thought there may have been privacy violations.</p><p>Regardless, the contest did highlight the power of machine learning—and the</p><p>importance of collaboration.</p><p>K-Means Clustering (Unsupervised/Clustering)</p><p>The k-Means clustering algorithm, which is effective for large datasets, puts</p><p>similar, unlabeled data into different groups. The first step is to select k, which</p><p>is the number of clusters. To help with this, you can perform visualizations of</p><p>that data to see if there are noticeable grouping areas.</p><p>Here’s a look at sample data, in Figure3-6:</p><p>Figure 3-6. The initial plot for a dataset</p><p>Chapter 3 | Machine Learning</p><p>63</p><p>For this example, we assume there will be two clusters, and this means there</p><p>will also be two centroids. A centroid is the midpoint of a cluster. We will</p><p>assign each randomly, which you can see in Figure3-7.</p><p>As you can see, the centroid at the top left looks way off, but the one on the</p><p>right side is better. The k-Means algorithm will then calculate the average</p><p>distances of the centroids and then change their locations. This will be iterated</p><p>until the errors are fairly minimal—a point that is called convergence, which</p><p>you can see with Figure3-8.</p><p>Granted, this is a simple illustration. But of course, with a complex dataset, it</p><p>will be difficult to come up with the number of initial clusters. In this situation,</p><p>you can experiment with different k values and then measure the average</p><p>distances. By doing this multiple times, there should be more accuracy.</p><p>Then why not just have a high number for k? You can certainly do this. But</p><p>when you compute the average, you’ll notice that there will be only incremental</p><p>improvements. So one method is to stop at the point where this starts to</p><p>occur. This is seen in Figure3-9.</p><p>Figure 3-7. This chart shows two centroids—represented by circles—that are randomly placed</p><p>Figure 3-8. Through iterations, the k-Means algorithm gets better at grouping the data</p><p>Artificial Intelligence Basics</p><p>64</p><p>However, k-Means has its drawbacks. For instance, it does not work well with</p><p>nonspherical data, which is the case with Figure3-10.</p><p>Figure 3-9. This shows the optimal point of the k value in the k-Means algorithm</p><p>Figure 3-10. Here’s a demonstration where k-Means does not work with nonspherical data</p><p>With this, the k-Means algorithm would likely not pick up on the surrounding</p><p>data, even though it has a pattern. But there are some algorithms that can</p><p>help, such as DBScan (density-based spatial clustering of applications with</p><p>Chapter 3 | Machine Learning</p><p>65</p><p>noise), which is meant to handle a mix of widely varying sizes of datasets.</p><p>Although, DBScan can require lots of computational power.</p><p>Next, there is the situation where there are some clusters with lots of data</p><p>and others with little. What might happen? There is a chance that the k-Means</p><p>algorithm will not pick up on the light one. This is the case with Figure3-11.</p><p>Conclusion</p><p>These algorithms can get complicated and do require strong technical skills.</p><p>But it is important to not get too bogged down in the technology. After all,</p><p>the focus is to find ways to use machine learning to accomplish clear objectives.</p><p>Again, Stich Fix is a good place to get guidance on this. In the November issue</p><p>of the Harvard Business Review, the company’s chief algorithms officer, Eric</p><p>Colson, published an article, “Curiosity-Driven Data Science.”17 In it, he</p><p>provided his experiences in creating a data-driven organization.</p><p>At the heart of this is allowing data scientists to explore new ideas, concepts,</p><p>and approaches. This has resulted in AI being implemented across core</p><p>functions of the business like inventory management, relationship management,</p><p>logistics, and merchandise buying. It has been transformative, making the</p><p>17 https://hbr.org/2018/11/curiosity-driven-data-science</p><p>Figure 3-11. If there are areas of thin data, the k-Means algorithm may not pick them up</p><p>Artificial Intelligence Basics</p><p>https://hbr.org/2018/11/curiosity-driven-data-science</p><p>66</p><p>organization more agile and streamlined. Colson also believes it has provided</p><p>“a protective barrier against competition.”</p><p>His article also provides other helpful advice for data analysis:</p><p>• Data Scientists: They should not be part of another</p><p>department. Rather, they should have their own, which</p><p>reports directly to the CEO.This helps with focusing on</p><p>key priorities as well as having a holistic view of the needs</p><p>of the organization.</p><p>• Experiments: When a data scientist has a new idea, it</p><p>should be tested on a small sample of customers. If</p><p>there is traction, then it can be rolled out to the rest of</p><p>the base.</p><p>• Resources: Data scientists need full access to data and</p><p>tools. There should also be ongoing training.</p><p>• Generalists: Hire data scientists who span different</p><p>domains like modelling, machine learning, and analytics</p><p>(Colson refers to these people as “full-stack data</p><p>scientists”). This leads to small teams—which are often</p><p>more efficient and productive.</p><p>• Culture: Colson looks for values like “learning by doing,</p><p>being comfortable with ambiguity, balancing long-and</p><p>short-term returns.”</p><p>Key Takeaways</p><p>• Machine learning, whose roots go back to the 1950s, is</p><p>where a computer can learn without being explicitly</p><p>programmed. Rather, it will ingest and process data by</p><p>using sophisticated statistical techniques.</p><p>• An outlier is data that is far outside the rest of the</p><p>numbers in the dataset.</p><p>• The standard deviation measures the average distance</p><p>from the mean.</p><p>• The</p><p>the value of our products without increasing the price by tapping</p><p>into the scalability of cloud technology. Our goal is to empower people at all</p><p>levels of society by pushing down the price of business software while expand-</p><p>ing the power of the tools. Access to capital shouldn't limit success; busi-</p><p>nesses should rise or fall based on the strength of their vision for the future.</p><p>Viewed this way, AI is the fulfillment of the promise of technology. It frees</p><p>people from the constraints of time by enabling them to offload tedious or</p><p>unpleasant rote labor. It helps them identify patterns at microscopic and mac-</p><p>roscopic scales, which humans are not naturally well suited to perceive. It can</p><p>forecast problems, and it can correct errors. It can save money, time, and even</p><p>lives.</p><p>Seeking to democratize these benefits just as we did for general business</p><p>software, Zoho has threaded AI throughout our suite of apps. We spent the</p><p>last six years quietly developing our own internal AI technology, built on the</p><p>bedrock of our own principles. The result is Zia, an AI assistant who is smart,</p><p>but not clever. This is a crucial distinction. A smart system has the informa-</p><p>tion and functionality to empower the unique vision and intuition of an active</p><p>operator. A clever system obfuscates the internal workings of the process,</p><p>reducing the human to a passive user who simply consumes the insights pro-</p><p>vided by the machine. AI should be a tool to be wielded, not a lens through</p><p>which we view the world. To steer such a powerful tool, we must be equipped</p><p>with the knowledge to understand and operate it without eroding the human</p><p>quality of our human systems.</p><p>The need to stay current on this technology is exactly why a book like Artif icial</p><p>Intelligence Basics is so important in today's world. It is the intellectual infra-</p><p>structure that will enable people—regular people—to tap into the power of</p><p>AI.Without these kinds of initiatives, AI will tip the balance of power in favor</p><p>of big companies with big budgets. It's crucial that the general population</p><p>equip themselves with the skills to understand AI systems, because these</p><p>systems will increasingly define how we interact with and navigate through the</p><p>world. Soon, the information contained in this book won't be merely a topic</p><p>of interest; it will be a prerequisite for participation in the modern economy.</p><p>This is how the average person can enjoy the fruits of the AI revolution. In the</p><p>years to come, how we define work and which activities carry economic value</p><p>will change. We have to embrace the fact that the future of work may be as</p><p>foreign to us as a desk job would be to our distant ancestors. But we have</p><p>to—and should—have faith in the human capacity to innovate new forms of</p><p>work, even if that work doesn't look like the work we're familiar with. But the</p><p>first step, before everything else, is to learn more about this new, exciting, and</p><p>fundamentally democratizing technology.</p><p>—Sridhar Vembu, co-founder and CEO of Zoho</p><p>Foreword</p><p>Introduction</p><p>On the face of it, the Uber app is simple. With just a couple clicks, you can</p><p>hail a driver within a few minutes.</p><p>But behind the scenes, there is an advanced technology platform, which relies</p><p>heavily on artificial intelligence (AI). Here are just some of the capabilities:</p><p>• A Natural Language Processing (NLP) system that can</p><p>understand conversations, allowing for a streamlined</p><p>experience</p><p>• Computer vision software that verifies millions of images</p><p>and documents like drivers’ licenses and restaurant</p><p>menus</p><p>• Sensor processing algorithms that help improve the accu-</p><p>racy in dense urban areas, including automatic crash</p><p>detection by sensing unexpected movement from the</p><p>phone of a driver or passenger</p><p>• Sophisticated machine learning algorithms that predict</p><p>driver supply, rider demand, and ETAs</p><p>Such technologies are definitely amazing, but they are also required. There is</p><p>no way that Uber could have scaled its growth—which has involved handling</p><p>over 10 billion trips—without AI.In light of this, it should be no surprise that</p><p>the company spends hundreds of millions on the technology and has a large</p><p>group of AI experts on staff.1</p><p>But AI is not just for fast-charging startups. The technology is also proving a</p><p>critical priority for traditional companies. Just look at McDonald’s. In 2019,</p><p>the company shelled out $300 million to acquire a tech startup, Dynamic</p><p>Yield. It was the company’s largest deal since it purchased Boston Market in</p><p>1999.2</p><p>1www.sec.gov/Archives/edgar/data/1543151/000119312519120759/d647752ds1a.</p><p>htm#toc647752_11</p><p>2https://news.mcdonalds.com/news-releases/news-release-details/dynamic-yield-</p><p>acquisition-release</p><p>http://www.sec.gov/Archives/edgar/data/1543151/000119312519120759/d647752ds1a.htm#toc647752_11</p><p>http://www.sec.gov/Archives/edgar/data/1543151/000119312519120759/d647752ds1a.htm#toc647752_11</p><p>https://news.mcdonalds.com/news-releases/news-release-details/dynamic-yield-acquisition-release</p><p>https://news.mcdonalds.com/news-releases/news-release-details/dynamic-yield-acquisition-release</p><p>x</p><p>Dynamic Yield, which was founded in 2011, is a pioneer in leveraging AI for</p><p>creating personalized customer interactions across the Web, apps, and email.</p><p>Some of its customers include the Hallmark Channel, IKEA, and Sephora.</p><p>As for McDonald’s, it has been undergoing a digital transformation—and AI is</p><p>a key part of the strategy. With Dynamic Yield, the company plans to use the</p><p>technology to reimagine its Drive Thru, which accounts for a majority of its</p><p>revenues. By analyzing data, such as the weather, traffic, and time of day, the</p><p>digital menus will be dynamically changed to enhance the revenue opportuni-</p><p>ties. It also looks like McDonald’s will use geofencing and even image recogni-</p><p>tion of license plates to enhance the targeting.</p><p>But this will just be the start. McDonald’s expects to use AI for in-store</p><p>kiosks and signage as well as the supply chain.</p><p>The company realizes that the future is both promising and dangerous. If com-</p><p>panies are not proactive with new technologies, they may ultimately fail. Just</p><p>look at how Kodak was slow to adapt to digital cameras. Or consider how the</p><p>taxi industry did not change when faced with the onslaught of Uber and Lyft.</p><p>On the other hand, new technologies can be almost an elixir for a company.</p><p>But there needs to be a solid strategy, a good understanding of what’s possi-</p><p>ble, and a willingness to take risks. So in this book, I’ll provide tools to help</p><p>with all this.</p><p>OK then, how big will AI get? According to a study from PWC, it will add a</p><p>staggering $15.7 trillion to the global GDP by 2030, which is more than the</p><p>combined output of China and India. The authors of the report note: “AI</p><p>touches almost every aspect of our lives. And it’s only just getting started.”3</p><p>True, when it comes to predicting trends, there can be a good deal of hype.</p><p>However, AI may be different because it has the potential for turning into</p><p>a general-purpose technology. A parallel to this is what happened in the</p><p>nineteenth century with the emergence of electricity, which had a transfor-</p><p>mative impact across the world.</p><p>As a sign of the strategic importance of AI, tech companies like Google,</p><p>Microsoft, Amazon.com, Apple, and Facebook have made substantial invest-</p><p>ments in this industry. For example, Google calls itself an “AI-first” company</p><p>and has spent billions buying companies in the space as well as hiring thou-</p><p>sands of data scientists.</p><p>In other words, more and more jobs will require knowledge of AI.Granted,</p><p>this does not mean you’ll need to learn programming languages or understand</p><p>advanced statistics. But it will be critical to have a solid foundation of the</p><p>fundamentals.</p><p>3www.pwc.com/gx/en/issues/data-and-analytics/publications/artificial-</p><p>intelligence-study.html</p><p>Introduction</p><p>http://www.pwc.com/gx/en/issues/data-and-analytics/publications/artificial-intelligence-study.html</p><p>http://www.pwc.com/gx/en/issues/data-and-analytics/publications/artificial-intelligence-study.html</p><p>normal distribution—which has a shape like a bell—</p><p>represents the sum of probabilities for a variable.</p><p>• The Bayes’ theorem is a sophisticated statistical technique</p><p>that provides a deeper look at probabilities.</p><p>Chapter 3 | Machine Learning</p><p>67</p><p>• A true positive is when a model makes a correct</p><p>prediction. A false positive, on the other hand, is when a</p><p>model prediction shows that the result is true even</p><p>though it is not.</p><p>• The Pearson correlation shows the strength of the</p><p>relationship between two variables that range from</p><p>1 to -1.</p><p>• Feature extraction or feature engineering describes the</p><p>process of selecting variables for a model. This is critical</p><p>since even one wrong variable can have amajor impact</p><p>on the results.</p><p>• Training data is what is used to create the relationships in</p><p>an algorithm. The test data, on the other hand, is used to</p><p>evaluate the model.</p><p>• Supervised learning uses labeled data to create a model,</p><p>whereas unsupervised learning does not. There is also</p><p>semi-supervised learning, which uses a mix of both</p><p>approaches.</p><p>• Reinforcement learning is a way to train a model by</p><p>rewarding accurate predictions and punishing those that</p><p>are not.</p><p>• The k-Nearest Neighbor (k-NN) is an algorithm based</p><p>on the notion that values that are close together are</p><p>good predictors for a model.</p><p>• Linear regression estimates the relationship between</p><p>certain variables. The R-squared will indicate the strength</p><p>of the relationship.</p><p>• A decision tree is a model that is based on a workflow of</p><p>yes/no decisions.</p><p>• An ensemble model uses more than one model for the</p><p>predictions.</p><p>• The k-Means clustering algorithm puts similar unlabeled</p><p>data into different groups.</p><p>Artificial Intelligence Basics</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_4</p><p>C H A P T E R</p><p>4</p><p>Deep Learning</p><p>The Revolution in AI</p><p>Take any old classif ication problem where you have a lot of data, and it’s</p><p>going to be solved by deep learning. There’s going to be thousands of</p><p>applications of deep learning.</p><p>—Geoffrey Hinton,</p><p>English Canadian cognitive psychologist and computer scientist1</p><p>Fei-Fei Li, who got a BA degree in physics from Princeton in 1999 with high</p><p>honors and a PhD in electrical engineering from Caltech in 2005, focused her</p><p>brilliance on developing AI models. But she had a major challenge: finding</p><p>quality datasets. At first, she looked at creating them by hand, such as with</p><p>graduate students who downloaded images from the Internet. But the process</p><p>was too slow and tedious.</p><p>One day a student mentioned to Li that Amazon.com’s Mechanical Turk, an</p><p>online service that uses crowdsourcing to solve problems, could be a good</p><p>way to scale the process. It would allow for fast and accurate labeling of the</p><p>data.</p><p>Li gave it a try, and it worked out quite well. By 2010, she had created</p><p>ImageNet, which had 3.2 million images across over 5,200 categories.</p><p>1 Siddhartha Mukherjee, “The Algorithm Will See You Now,” The NewYorker, April 3, 2017,</p><p>https://www.newyorker.com/magazine/2017/04/03/ai-versus-md.</p><p>https://www.newyorker.com/magazine/2017/04/03/ai-versus-md</p><p>70</p><p>Yet it got a tepid response from the academic community. But this did not</p><p>deter Li. She continued to work tirelessly to evangelize the dataset. In 2012,</p><p>she put together a contest as a way to encourage researchers to create more</p><p>effective models and push the boundaries of innovation. It would turn out to</p><p>be a game changer, and the contest would become an annual event.</p><p>In the first contest, professors from the University of Toronto—Geoffrey</p><p>Hinton, Ilya Sutskever, and Alex Krizhevsky—used sophisticated deep learning</p><p>algorithms. And the results were standout. The system they built, which was</p><p>called AlexNet, beat all the other contestants by a margin of 10.8%.2</p><p>This was no fluke. In the years after this, deep learning continued to show</p><p>accelerated progress with ImageNet. As of now, the error rate for deep</p><p>learning is a mere 2% or so—which is better than humans.</p><p>By the way, Li has since gone on to become a professor at Stanford and</p><p>co-director of the school’s AI lab. She is also Google’s chief scientist of AI and</p><p>Machine Learning. Needless to say, whenever she has new ideas now, people listen!</p><p>In this chapter, we’ll take a look at deep learning, which is clearly the hottest</p><p>area of AI.It has led to major advances in areas like self-driving cars and virtual</p><p>assistants like Siri.</p><p>Yes, deep learning can be a complicated subject, and the field is constantly</p><p>changing. But we’ll take a look at the main concepts and trends—without</p><p>getting into the technical details.</p><p>Difference Between Deep Learning</p><p>andMachine Learning</p><p>There is often confusion between deep learning and machine learning. And</p><p>this is reasonable. Both topics are quite complex, and they do share many</p><p>similarities.</p><p>So to understand the differences, let’s first take a look at two high-level</p><p>aspects of machine learning and how they relate to deep learning. First of all,</p><p>while both usually require large amounts of data, the types are generally</p><p>different.</p><p>Take the following example: Suppose we have photos of thousands of animals</p><p>and want to create an algorithm to find the horses. Well, machine learning</p><p>cannot analyze the photos themselves; instead, the data must be labeled. The</p><p>machine learning algorithm will then be trained to recognize horses, through</p><p>a process known as supervised learning (covered in Chapter 3).</p><p>2 https://qz.com/1034972/the-data-that-changed-the-direction-of-ai-research-and-</p><p>possibly-the-world/</p><p>Chapter 4 | Deep Learning</p><p>https://qz.com/1034972/the-data-that-changed-the-direction-of-ai-research-and-possibly-the-world/</p><p>https://qz.com/1034972/the-data-that-changed-the-direction-of-ai-research-and-possibly-the-world/</p><p>71</p><p>Even though machine learning will likely come up with good results, they will</p><p>still have limitations. Wouldn’t it be better to look at the pixels of the images</p><p>themselves—and find the patterns? Definitely.</p><p>But to do this with machine learning, you need to use a process called feature</p><p>extraction. This means you must come up with the kinds of characteristics of</p><p>a horse—such as the shape, the hooves, color, and height—which the algorithms</p><p>will then try to identify.</p><p>Again, this is a good approach—but it is far from perfect. What if your</p><p>features are off the mark or do not account for outliers or exceptions? In</p><p>such cases, the accuracy of the model will likely suffer. After all, there are</p><p>many variations to a horse. Feature extraction also has the drawback of</p><p>ignoring a large amount of the data. This can be exceedingly complicated—if</p><p>not impossible—for certain use cases. Look at computer viruses. Their</p><p>structures and patterns, which are known as signatures, are constantly</p><p>changing so as to infiltrate systems. But with feature extraction, a person</p><p>would somehow have to anticipate this, which is not practical. This is why</p><p>cybersecurity software is often about collecting signatures after a virus has</p><p>exacted damage.</p><p>But with deep learning, we can solve these problems. This approach analyzes</p><p>all the data—pixel by pixel—and then finds the relationships by using a neural</p><p>network, which mimics the human brain.</p><p>Let’s take a look.</p><p>So What Is Deep Learning Then?</p><p>Deep learning is a subfield of machine learning. This type of system allows for</p><p>processing huge amounts of data to find relationships and patterns that</p><p>humans are often unable to detect. The word “deep” refers to the number of</p><p>hidden layers in the neural network, which provide much of the power to</p><p>learn.</p><p>When it comes to the topic of AI, deep learning is at the cutting-edge and</p><p>often generates most of the buzz in mainstream media. “[Deep learning] AI is</p><p>the new electricity,” extolled Andrew Yan-Tak Ng, who is the former chief</p><p>scientist at Baidu and co-founder of Google Brain.3</p><p>But it is also important to remember that deep learning is still in the early</p><p>stages of development and commercialization.</p><p>For example, it was not until</p><p>about 2015 that Google started using this technology for its search engine.</p><p>3 https://medium.com/@GabriellaLeone/the-best-explanation-machine-learning-vs-</p><p>deep-learning-d5c123405b11</p><p>Artificial Intelligence Basics</p><p>https://medium.com/@GabriellaLeone/the-best-explanation-machine-learning-vs-deep-learning-d5c123405b11</p><p>https://medium.com/@GabriellaLeone/the-best-explanation-machine-learning-vs-deep-learning-d5c123405b11</p><p>72</p><p>As we saw in Chapter 1, the history of neural networks was full of ebbs and</p><p>flows. It was Frank Rosenblatt who created the perceptron, which was a fairly</p><p>basic system. But real academic progress with neural networks did not occur</p><p>until the 1980s, such as with the breakthroughs with backpropagation,</p><p>convolutional neural networks, and recurrent neural networks. But for deep</p><p>learning to have an impact on the real world, it would take the staggering</p><p>growth in data, such as from the Internet, and the surge in computing power.</p><p>The Brain andDeep Learning</p><p>Weighing only about 3.3 pounds, the human brain is an amazing feat of</p><p>evolution. There are about 86 billion neurons—often called gray matter—</p><p>that are connected with trillions of synapses. Think of neurons as CPUs</p><p>(Central Processing Units) that take in data. The learning occurs with the</p><p>strengthening or weakening of the synapses.</p><p>The brain is made up of three regions: the forebrain, the midbrain, and the</p><p>hindbrain. Among these, there are a variety of areas that perform different</p><p>functions. Some of the main ones include the following:</p><p>• Hippocampus: This is where your brain stores memories.</p><p>In fact, this is the part that fails when a person has</p><p>Alzheimer’s disease, in which a person loses the ability to</p><p>form short-term memories.</p><p>• Frontal Lobe: Here the brain focuses on emotions, speech,</p><p>creativity, judgment, planning, and reasoning.</p><p>• Cerebral Cortex: This is perhaps the most important when</p><p>it comes to AI.The cerebral cortex helps with thinking</p><p>and other cognitive activities. According to research</p><p>from Suzana Herculano-Houzel, the level of intelligence</p><p>is related to the number of neurons in this area of the</p><p>brain.</p><p>Then how does deep learning compare to the human brain? There are some</p><p>tenuous similarities. At least in areas like the retina, there is a process of</p><p>ingesting data and processing them through a complex network, which is</p><p>based on assigning weights. But of course, this is only a minute part of the</p><p>learning process. Besides, there are still many mysteries about the human</p><p>brain, and of course, it is not based on things like digital computing (instead,</p><p>it appears that it is more of an analogue system). However, as the research</p><p>continues to advance, the discoveries in neuroscience could help build new</p><p>models for AI.</p><p>Chapter 4 | Deep Learning</p><p>73</p><p>Artificial Neural Networks (ANNs)</p><p>At the most basic level, an artificial neural network (ANN) is a function that</p><p>includes units (which may also be called neurons, perceptrons, or nodes).</p><p>Each unit will have a value and a weight, which indicates the relative importance,</p><p>and will go into the hidden layer. The hidden layer uses a function, with the</p><p>result becoming the output. There is also another value, called bias, which is</p><p>a constant and is used in the calculation of the function.</p><p>This type of training of a model is called a feed-forward neural network. In</p><p>other words, it only goes from input to the hidden layer to the output. It does</p><p>not cycle back. But it could go to a new neural network, with the output</p><p>becoming the input.</p><p>Figure 4-1 shows a chart of a feed-forward neural network.</p><p>Let’s go deeper on this by taking an example. Suppose you are creating a</p><p>model to predict whether a company’s stock will increase. The following are</p><p>what the variables represent as well as the values and weights assigned:</p><p>• X1: Revenues are growing at a minimum of 20% a year.</p><p>The value is 2.</p><p>• X2: The profit margin is at least 20%. The value is 4.</p><p>• W1: 1.9.</p><p>• W2: 9.6.</p><p>• b: This is the bias (the value is 1), which helps smooth out</p><p>the calculations.</p><p>You’ll then sum the weights, and then the function will process the information.</p><p>This will often involve an activation function, which is non-linear. This is more</p><p>reflective of the real world since data is usually not in a straight line.</p><p>Figure 4-1. A basic feed-forward neural network</p><p>Artificial Intelligence Basics</p><p>74</p><p>Now there are a variety of activation functions to choose from. One of the</p><p>most common is the sigmoid. This compresses the input value into a range of</p><p>0–1. The closer it is to 1, the more accurate the model.</p><p>When you graph this function, it will look like an S shape. See Figure4-2.</p><p>As you can see, the system is relatively simplistic and will not be helpful in</p><p>high-end AI models. To add much more power, there usually needs to be</p><p>multiple hidden layers. This results in a multilayered perceptron (MLP). It also</p><p>helps to use something called backpropagation, which allows for the output</p><p>to be circled back into the neural network.</p><p>Backpropagation</p><p>One of the major drawbacks with artificial neural networks is the process of</p><p>making adjustments to the weights in the model. Traditional approaches, like</p><p>the use of the mutation algorithm, used random values that proved to be time</p><p>consuming.</p><p>Given this, researchers looked for alternatives, such as backpropagation. This</p><p>technique had been around since the 1970s but got little interest as the</p><p>performance was lacking. But David Rumelhart, Geoffrey Hinton, and Ronald</p><p>Williams realized that backpropagation still had potential, so long as it was</p><p>refined. In 1986, they wrote a paper entitled “Learning Representations by</p><p>Back-propagating Errors,” and it was a bombshell in the AI community.4 It</p><p>clearly showed that backpropagation could be much faster but also allow for</p><p>more powerful artificial neural networks.</p><p>As should be no surprise, there is a lot of math involved in backpropagation.</p><p>But when you boil things down, it’s about adjusting the neural network when</p><p>errors are found and then iterating the new values through the neural network</p><p>again. Essentially, the process involves slight changes that continue to optimize</p><p>the model.</p><p>4 David E.Rumelhart, Geoffrey E.Hinton, and Ronald J.Williams, “Learning Representations</p><p>by Back-propagating Errors,” Nature 323 (1986): 533–536.</p><p>Figure 4-2. A typical sigmoid activation function</p><p>Chapter 4 | Deep Learning</p><p>75</p><p>For example, let’s say one of the inputs has an output of 0.6. This means that</p><p>the error is 0.4 (1.0 minus 0.6), which is subpar. But we can then backpropogate</p><p>the output, and perhaps the new output may get to 0.65. This training will go</p><p>on until the value is much closer to 1.</p><p>Figure 4-3 illustrates this process. At first, there is a high level of errors</p><p>because the weights are too large. But by making iterations, the errors will</p><p>gradually fall. However, doing too much of this could mean an increase in</p><p>errors. In other words, the goal of backpropagation is to find the midpoint.</p><p>As a gauge of the success of backpropagation, there were a myriad of</p><p>commercial applications that sprung up. One was called NETtalk, which was</p><p>developed by Terrence Sejnowski and Charles Rosenberg in the mid-1980s.</p><p>The machine was able to learn how to pronounce English text. NETtalk was</p><p>so interesting that it was even demoed on the Today show.</p><p>There were also a variety of startups that were created that leveraged</p><p>backpropagation, such as HNC Software. It built models that detected credit</p><p>card fraud. Up until this point—when HNC was founded in the late 1980s—</p><p>the process was done mostly by hand, which led to costly errors and low</p><p>volumes of issuances. But by using deep learning approaches, credit card</p><p>companies were able to save billions of dollars.</p><p>In 2002, HNC was acquired by Fair, Isaac and valued at $810 million.5</p><p>5 www.insurancejournal.com/news/national/2002/05/01/16857.htm</p><p>Figure 4-3. The optimal value for a backpropagation function is at</p><p>the bottom of the graph</p><p>Artificial Intelligence Basics</p><p>http://www.insurancejournal.com/news/national/2002/05/01/16857.htm</p><p>76</p><p>The Various Neural Networks</p><p>The most basic type of a neural network is a fully connected neural network.</p><p>As the name implies, it is where all the neurons have connections from layer</p><p>to layer. This network is actually quite popular since it means having to use</p><p>little judgment when creating the model.</p><p>Then what are some of the other neural networks? The common ones include</p><p>the recurrent neural network (RNN), the convolutional neural network</p><p>(CNN), and the generative adversarial network (GAN), which we’ll cover</p><p>next.</p><p>Recurrent Neural Network</p><p>With a recurrent neural network (RNN), the function not only processes the</p><p>input but also prior inputs across time. An example of this is what happens</p><p>when you enter characters in a messaging app. As you begin to type, the</p><p>system will predict the words. So if you tap out “He,” the computer will</p><p>suggest “He,” “Hello,” and “Here’s.” The RNN is essentially a string of neural</p><p>networks that feed on each other based on complex algorithms.</p><p>There are variations on the model. One is called LSTM, which stands for long</p><p>short-term memory. This came about from a paper written by professors</p><p>Sepp Hochreiter and Jürgen Schmidhuber in 1997.6 In it, they set forth a way</p><p>to effectively use inputs that are separated from each other for long time</p><p>periods, allowing the use of more datasets.</p><p>Of course, RNNs do have drawbacks. There is the vanishing gradient problem,</p><p>which means that the accuracy decays as the models get larger. The models</p><p>can also take longer to train.</p><p>To deal with this, Google developed a new model called the Transformer,</p><p>which is much more efficient since it processes the inputs in parallel. It also</p><p>results in more accurate results.</p><p>Google has gained much insight about RNNs through its Translate app, which</p><p>handles over 100 languages and processes over 100 billion words a day.7</p><p>Launched in 2006, it initially used machine learning systems. But in 2016,</p><p>Google switched to deep learning by creating Google Neural Machine</p><p>Translation.8 All in all, it has resulted in much higher accuracy rates.9</p><p>6 Sepp Hochreiter and Jürgen Schmidhuber, “Long Short-Term Memory,” Neural Computation</p><p>9, no. 8 (1997): 1735-80.</p><p>7 www.argotrans.com/blog/accurate-google-translate-2018/</p><p>8 www.techspot.com/news/75637-google-translate-not-monetized-despite-</p><p>converting-over-100.html</p><p>9 www.argotrans.com/blog/accurate-google-translate-2018/</p><p>Chapter 4 | Deep Learning</p><p>http://www.argotrans.com/blog/accurate-google-translate-2018/</p><p>http://www.techspot.com/news/75637-google-translate-not-monetized-despite-converting-over-100.html</p><p>http://www.techspot.com/news/75637-google-translate-not-monetized-despite-converting-over-100.html</p><p>http://www.argotrans.com/blog/accurate-google-translate-2018/</p><p>77</p><p>Consider how Google Translate has helped out doctors who work with</p><p>patients who speak other languages. According to a study from the University</p><p>of California, San Francisco (UCSF), that was published in JAMA Internal</p><p>Medicine, the app had a 92% accuracy rate with English-to-Spanish</p><p>translations. This was up from 60% over the past couple years.10</p><p>Convolutional Neural Network (CNN)</p><p>Intuitively, it makes sense to have all the units in a neural network to be</p><p>connected. This works well with many applications.</p><p>But there are scenarios where it is far from optimal, such as with image</p><p>recognition. Just imagine how complex a model would be where every pixel</p><p>is a unit! It could quickly become unmanageable. There would also be other</p><p>complications like overfitting. This is where the data is not reflective of</p><p>what is being tested or there is a focus on the wrong features.</p><p>To deal with all this, you can use a convolutional neural network (CNN).</p><p>The origins of this go back to professor Yann LeCun in 1998, when he</p><p>published a paper called “Gradient-Based Learning Applied to Document</p><p>Recognition.”11 Despite its strong insights and breakthroughs, it got little</p><p>traction. But as deep learning started to show significant progress in 2012,</p><p>researchers revisited the model.</p><p>LeCun got his inspiration for the CNN from Nobel Prize winners David</p><p>Hubel and Torsten Wiesel who studied neurons of the visual cortex. This</p><p>system takes an image from the retina and processes it in different stages—</p><p>from easy to more complex. Each of the stages is called a convolution. For</p><p>example, the first level would be to identify lines and angles; next, the visual</p><p>cortex will find the shapes; and then it will detect the objects.</p><p>This is analogous to how a computer-based CNN works. Let’s take an</p><p>example: Suppose you want to build a model that can identify a letter. The</p><p>CNN will have input in the form of an image that has 3,072 pixels. Each of</p><p>the pixels will have a value that is from 0 to 255, which indicates the overall</p><p>intensity. By using a CNN, the computer will go through multiple variations</p><p>to identify the features.</p><p>The first is the convolutional layer, which is a filter that scans the image. In</p><p>our example, this could be 5 × 5 pixels. The process will create a feature map,</p><p>which is a long array of numbers. Next, the model will apply more filters to</p><p>the image. By doing this, the CNN will identify the lines, edges and shapes—all</p><p>10 https://gizmodo.com/google-translate-can-help-doctors-bridge-the-language-</p><p>g-1832881294</p><p>11 Yann LeCun et al., “Gradient-Based Learning Applied to Document Recognition,”</p><p>Proceedings of the IEEE 86 no. 11 (1998): 2278-2324.</p><p>Artificial Intelligence Basics</p><p>https://gizmodo.com/google-translate-can-help-doctors-bridge-the-language-g-1832881294</p><p>https://gizmodo.com/google-translate-can-help-doctors-bridge-the-language-g-1832881294</p><p>78</p><p>expressed in numbers. With the various output layers, the model will use</p><p>pooling, which combines them to generate a single output, and then create a</p><p>fully connected neural network.</p><p>A CNN can definitely get complex. But it should be able to accurately identify</p><p>the numbers that are input into the system.</p><p>Generative Adversarial Networks (GANs)</p><p>Ian Goodfellow, who got his masters in computer science at Stanford and</p><p>his PhD in machine learning at the Université de Montréal, would go on to</p><p>work at Google. In his 20s, he co-authored one of the top books in AI,</p><p>called Deep Learning,12 and also made innovations with Google Maps.</p><p>But it was in 2014 that he had his most impactful breakthrough. It actually</p><p>happened in a pub in Montreal when he talked with some of his friends about</p><p>how deep learning could create photos.13 At the time, the approach was to</p><p>use generative models, but they were often blurry and nonsensical.</p><p>Goodfellow realized that there had to be a better why. So why not use game</p><p>theory? That is, have two models compete against each other in a tight</p><p>feedback loop. This could also be done with unlabeled data.</p><p>Here’s a basic workflow:</p><p>• Generator: This neural network creates a myriad of new</p><p>creations, such as photos or sentences.</p><p>• Discriminator: This neural network looks at the creations</p><p>to see which ones are real.</p><p>• Adjustments: With the two results, a new model would</p><p>change the creations to make them as realistic as possible.</p><p>Through many iterations, the discriminator will no longer</p><p>need to be used.</p><p>He was so excited about the idea that after he left the pub he started to code</p><p>his ideas. The result was a new deep learning model: the generative adversarial</p><p>network or GAN.And the results were standout. He would soon become an</p><p>AI rock star.</p><p>12 Ian Goodfellow, Yoshua Bengio, and Aaron Courville, Deep Learning (Cambridge, MA:</p><p>The MIT Press, 2016).</p><p>13 www.technologyreview.com/s/610253/the-ganfather-the-man-whos-given-</p><p>machines-the-gift-of-imagination/</p><p>Chapter 4 | Deep Learning</p><p>http://www.technologyreview.com/s/610253/the-ganfather-the-man-whos-given-machines-the-gift-of-imagination/</p><p>http://www.technologyreview.com/s/610253/the-ganfather-the-man-whos-given-machines-the-gift-of-imagination/</p><p>79</p><p>GAN research has already spurred over 500 academic papers.14 Companies</p><p>like Facebook have also used this technology, such as for its photo analysis and</p><p>processing. The company’s chief AI scientist, Yann LeCun, noted that GANs</p><p>are the “the coolest idea in deep learning in the last 20 years.”15</p><p>GANs have also been shown to help with sophisticated scientific research.</p><p>For example, they have helped improve the accuracy of detecting behavior of</p><p>subatomic particles in the Large Hadron Collider at CERN in Switzerland.16</p><p>While still in the early innings, this technology could lead to such things as a</p><p>computer that can develop new types of fashion items or maybe a new-fangled</p><p>wearable. Perhaps a GAN could even come up with a hit rap song.</p><p>And it could be sooner than you think. As a teenager, Robbie Barrat taught</p><p>himself how to use deep learning systems and built a model to rap in the style</p><p>of Kanye West.</p><p>But this was just the beginning of his AI wizardry. As a researcher at Stanford,</p><p>he developed his own GAN platform, which processed roughly 10,000 nude</p><p>portraits. The system then would create truly mesmerizing new works of art</p><p>(you can find them at his Twitter account at @DrBeef_).</p><p>Oh, and he also made his system open source at his GitHub account. This</p><p>caught the attention of a collective of French artists, called Obvious, that used</p><p>the technology to create portraits of an eighteenth-century fictional family. It</p><p>was based on processing 15,000 portraits from the fourteenth to the twentieth</p><p>centuries.</p><p>In 2018, Obvious put its artwork at a Christie’s auction, fetching a cool</p><p>$432,000. 17</p><p>But unfortunately, when it comes to GANs, there have been uses that have</p><p>been less than admirable. One example is to use them for deepfakes, which</p><p>involve leveraging neural networks to create images or videos that are</p><p>misleading. Some of this is just kind of playful. For example, one GAN makes</p><p>it possible to have Barack Obama say anything you tell him!</p><p>Yet there are lots of risks. Researchers at New York University and the</p><p>Michigan State University wrote a paper that focused on “DeepMasterPrints.”18</p><p>14 https://github.com/hindupuravinash/the-gan-zoo</p><p>15 https://trendsandevents4developers.wordpress.com/2017/04/24/</p><p>the-coolest-idea-in-deep-learning-in-20-years-and-more/</p><p>16 www.hpcwire.com/2018/08/14/cern-incorporates-ai-into-physics-</p><p>based-simulations/</p><p>17 www.washingtonpost.com/nation/2018/10/26/year-old-developed-code-ai-</p><p>portrait-that-sold-christies/?utm_term=.b2f366a4460e</p><p>18 www.cnbc.com/2018/12/28/research-claims-fake-fingerprints-could-hack-</p><p>a-third-of-smartphones.html</p><p>Artificial Intelligence Basics</p><p>https://github.com/hindupuravinash/the-gan-zoo</p><p>https://trendsandevents4developers.wordpress.com/2017/04/24/the-coolest-idea-in-deep-learning-in-20-years-and-more/</p><p>https://trendsandevents4developers.wordpress.com/2017/04/24/the-coolest-idea-in-deep-learning-in-20-years-and-more/</p><p>http://www.hpcwire.com/2018/08/14/cern-incorporates-ai-into-physics-based-simulations/</p><p>http://www.hpcwire.com/2018/08/14/cern-incorporates-ai-into-physics-based-simulations/</p><p>http://www.washingtonpost.com/nation/2018/10/26/year-old-developed-code-ai-portrait-that-sold-christies/?utm_term=.b2f366a4460e</p><p>http://www.washingtonpost.com/nation/2018/10/26/year-old-developed-code-ai-portrait-that-sold-christies/?utm_term=.b2f366a4460e</p><p>http://www.cnbc.com/2018/12/28/research-claims-fake-fingerprints-could-hack-a-third-of-smartphones.html</p><p>http://www.cnbc.com/2018/12/28/research-claims-fake-fingerprints-could-hack-a-third-of-smartphones.html</p><p>80</p><p>It showed how a GAN can develop fake fingerprints to unlock three types of</p><p>smartphones!</p><p>Then there was the incident of a so-called deepfake video of actress Jennifer</p><p>Lawrence at a Golden Globes press conference. Her face was merged with</p><p>Steve Buscemi’s.19</p><p>Deep Learning Applications</p><p>With so much money and resources being devoted to deep learning, there</p><p>has been a surge in innovations. It seems that every day there is something</p><p>amazing that is being announced.</p><p>Then what are some of the applications? Where has deep learning proven to</p><p>be a game changer? Let’s take a look at some that cover areas like healthcare,</p><p>energy, and even earthquakes</p><p>Use Case: Detecting Alzheimer’s Disease</p><p>Despite decades of research, a cure for Alzheimer’s disease remains elusive.</p><p>Although, scientists have developed drugs that have slowed down the</p><p>progression of the disease.</p><p>In light of this, early diagnosis is critical—and deep learning can potentially be</p><p>a big help. Researchers at the UCSF Department of Radiology and Biomedical</p><p>Imaging have used this technology to analyze brain screens—from the</p><p>Alzheimer’s Disease Neuroimaging Initiative public dataset—and to detect</p><p>changes in the levels of glucose.</p><p>The result: The model can diagnose Alzheimer’s disease up to six years before</p><p>a clinical diagnosis. One of the tests showed a 92% accuracy rate, and another</p><p>was 98%.</p><p>Now this is still in the beginning phases—and there will need to be more</p><p>datasets analyzed. But so far, the results are very encouraging.</p><p>According to Dr. Jae Ho Sohn, who authored the study:</p><p>This is an ideal application of deep learning because it is particularly</p><p>strong at finding very subtle but diffuse processes. Human radiologists</p><p>are really strong at identifying tiny focal finding like a brain tumor, but we</p><p>struggle at detecting more slow, global changes. Given the strength of</p><p>deep learning in this type of application, especially compared to humans,</p><p>it seemed like a natural application.20</p><p>19 http://fortune.com/2019/01/31/what-is-deep-fake-video/</p><p>20 www.ucsf.edu/news/2018/12/412946/artificial-intelligence-can-detect-</p><p>alzheimers-disease-brain-scans-six-years</p><p>Chapter 4 | Deep Learning</p><p>http://fortune.com/2019/01/31/what-is-deep-fake-video/</p><p>http://www.ucsf.edu/news/2018/12/412946/artificial-intelligence-can-detect-alzheimers-disease-brain-scans-six-years</p><p>http://www.ucsf.edu/news/2018/12/412946/artificial-intelligence-can-detect-alzheimers-disease-brain-scans-six-years</p><p>81</p><p>Use Case: Energy</p><p>Because of its massive data center infrastructure, Google is one of the largest</p><p>consumers of energy. Even a small improvement in efficiency can lead to a</p><p>sizeable impact on the bottom line. But there could also be the benefits of</p><p>less carbon emissions.</p><p>To help with these goals, Google’s DeepMind unit has been applying deep</p><p>learning, which has involved better management of wind power. Even</p><p>though this is a clean source of energy, it can be tough to use because of</p><p>the changes in weather.</p><p>But DeepMind’s deep learning algorithms have been critical. Applied to 700</p><p>megawatts of wind power in the United States, they were able to make</p><p>accurate forecasts for output with a lead time of 36 hours.</p><p>According to DeepMind’s blog:</p><p>This is important, because energy sources that can be scheduled (i.e.</p><p>can deliver a set amount of electricity at a set time) are often more</p><p>valuable to the grid…To date, machine learning has boosted the value of</p><p>our wind energy by roughly 20 percent, compared to the baseline</p><p>scenario of no time-based commitments to the grid.21</p><p>But of course, this deep learning system could be more than just about</p><p>Google—it could have a wide-ranging impact on energy use across the</p><p>world.</p><p>Use Case: Earthquakes</p><p>Earthquakes are extremely complicated to understand. They are also</p><p>exceedingly difficult to predict. You need to evaluate faults, rock formations</p><p>and deformations, electromagnetic activity, and changes in the groundwater.</p><p>Hey, there is even evidence that animals have the ability to sense an earthquake!</p><p>But over the decades, scientists have collected huge amounts of data on this</p><p>topic. In other words, this could be an application for deep learning, right?</p><p>Absolutely.</p><p>Seismologists at Caltech, which include Yisong Yue, Egill Hauksson, Zachary</p><p>Ross, and Men-Andrin Meier, have been doing considerable research on this,</p><p>using convolutional neural networks and recurrent neural networks. They are</p><p>trying to build</p><p>an effective early-warning system.</p><p>21 https://deepmind.com/blog/machine-learning-can-boost-value-</p><p>wind-energy/</p><p>Artificial Intelligence Basics</p><p>https://deepmind.com/blog/machine-learning-can-boost-value-wind-energy/</p><p>https://deepmind.com/blog/machine-learning-can-boost-value-wind-energy/</p><p>82</p><p>Here’s what Yue had to say:</p><p>AI can [analyze earthquakes] faster and more accurately than humans</p><p>can, and even find patterns that would otherwise escape the human eye.</p><p>Furthermore, the patterns we hope to extract are hard for rule-based</p><p>systems to adequately capture, and so the advanced pattern-matching</p><p>abilities of modern deep learning can offer superior performance than</p><p>existing automated earthquake monitoring algorithms.22</p><p>But the key is improving data collection. This means more analysis of small</p><p>earthquakes (in California, there is an average of 50 each day). The goal is to</p><p>create an earthquake catalog that can lead to the creation of a virtual</p><p>seismologist, who can make evaluations of an earthquake faster than a human.</p><p>This could allow for faster lead times when an earthquake strikes, which may</p><p>help to save lives and property.</p><p>Use Case: Radiology</p><p>PET scans and MRIs are amazing technology. But there are definitely downsides.</p><p>A patient needs to stay within a confining tube for 30 minutes to an hour. This</p><p>is uncomfortable and means being exposed to gadolinium, which has been</p><p>shown to have harmful side effects.</p><p>Greg Zaharchuk and Enhao Gong, who met at Stanford, thought there could</p><p>be a better way. Zaharchuk was an MD and PhD, with a specialization in</p><p>radiology. He was also the doctoral advisor of Gong, who was an electrical</p><p>engineering PhD in deep learning and medical image reconstruction.</p><p>In 2017, they co-founded Subtle Medical and hired some of the brightest</p><p>imaging scientists, radiologists, and AI experts. Together, they set themselves</p><p>to the challenge of improving PET scans and MRIs. Subtle Medical created a</p><p>system that not only reduces the time for an MRI and PET scans by up to ten</p><p>times, but the accuracy has been much higher. This was powered by high-end</p><p>NVIDIA GPUs.</p><p>Then in December 2018, the system received FDA (Federal Drug</p><p>Administration) 510(k) clearance and a CE mark approval for the European</p><p>market.23 It was the first ever AI-based nuclear medical device to achieve both</p><p>of these designations.</p><p>22 www.caltech.edu/about/news/qa-creating-virtual-seismologist-84789</p><p>23 https://subtlemedical.com/subtle-medical-receives-fda-510k-</p><p>clearance-and-ce-mark-approval-for-subtlepet/</p><p>Chapter 4 | Deep Learning</p><p>http://www.caltech.edu/about/news/qa-creating-virtual-seismologist-84789</p><p>https://subtlemedical.com/subtle-medical-receives-fda-510k-clearance-and-ce-mark-approval-for-subtlepet/</p><p>https://subtlemedical.com/subtle-medical-receives-fda-510k-clearance-and-ce-mark-approval-for-subtlepet/</p><p>83</p><p>Subtle Medical has more plans to revolutionize the radiology business. As of</p><p>2019, it is developing SubtleMRTM, which will be even more powerful than</p><p>the company’s current solution, and SubtleGADTM, which will reduce</p><p>gadolinium dosages.24</p><p>Deep Learning Hardware</p><p>Regarding chip systems for deep learning, GPUs have been the primary choice.</p><p>But as AI gets more sophisticated—such as with GANs—and the datasets</p><p>much larger, there is certainly more room for new approaches. Companies</p><p>also have custom needs, such as in terms of functions and data. After all, an</p><p>app for a consumer is usually quite different than one that is focused on the</p><p>enterprise.</p><p>As a result, some of the mega tech companies have been developing their own</p><p>chipsets:</p><p>• Google: In the summer of 2018, the company announced</p><p>its third version of its Tensor Processing Unit (TPU; the</p><p>first chip was developed in 2016).25 The chips are so</p><p>powerful—handling over 100 petaflops for training of</p><p>models—there needs to be liquid cooling in the data</p><p>centers. Google has also announced a version of its TPU</p><p>for devices. Essentially, it means that processing will have</p><p>less latency because there will be no need to access the</p><p>cloud.</p><p>• Amazon: In 2018, the company announced AWS</p><p>Inferentia.26 The technology, which has come out of the</p><p>acquisition of Annapurna in 2015, is focused on handling</p><p>complex inference operations. In other words, this is</p><p>what happens after a model has been trained.</p><p>• Facebook and Intel: These companies have joined forces to</p><p>create an AI chip.27 But the initiative is still in the initial</p><p>phases. Intel also has been getting traction with an AI</p><p>chip called the Nervana Neural Network Processor</p><p>(NNP).</p><p>24 www.streetinsider.com/Press+Releases/Subtle+Medical+Receives+FDA+510%2</p><p>8k%29+Clearance+and+CE+Mark+Approval+for+SubtlePET™/14892974.html</p><p>25 www.theregister.co.uk/2018/05/09/google_tpu_3/</p><p>26 https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-</p><p>amazon-inferentia-machine-learning-inference-microchip/</p><p>27 www.analyticsindiamag.com/inference-chips-are-the-next-big-</p><p>battlefield-for-nvidia-and-intel/</p><p>Artificial Intelligence Basics</p><p>http://www.streetinsider.com/Press+Releases/Subtle+Medical+Receives+FDA+510%28k%29+Clearance+and+CE+Mark+Approval+for+SubtlePET%E2%84%A2/14892974.html</p><p>http://www.streetinsider.com/Press+Releases/Subtle+Medical+Receives+FDA+510%28k%29+Clearance+and+CE+Mark+Approval+for+SubtlePET%E2%84%A2/14892974.html</p><p>http://www.theregister.co.uk/2018/05/09/google_tpu_3/</p><p>https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-amazon-inferentia-machine-learning-inference-microchip/</p><p>https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-amazon-inferentia-machine-learning-inference-microchip/</p><p>http://www.analyticsindiamag.com/inference-chips-are-the-next-big-battlefield-for-nvidia-and-intel/</p><p>http://www.analyticsindiamag.com/inference-chips-are-the-next-big-battlefield-for-nvidia-and-intel/</p><p>84</p><p>• Alibaba: The company has created its own AI chip</p><p>company called Pingtouge.28 It also has plans to build a</p><p>quantum computer processor, which is based on qubits</p><p>(they represent subatomic particles like electrons and</p><p>photons).</p><p>• Tesla: Elon Musk has developed his own AI chip. It has 6</p><p>billion transistors and can process 36 trillion operations</p><p>per second.29</p><p>There are a variety of startups that are making a play for the AI chip market</p><p>as well. Among the leading companies is Untether AI, which is focused on</p><p>creating chips that boost the transfer speeds of data (this has been a particularly</p><p>difficult part of AI). In one of the company’s prototypes, this process was</p><p>more than 1,000 faster than a typical AI chip.30 Intel, along with other investors,</p><p>participated in a $13 million round of funding in 2019.</p><p>Now when it comes to AI chips, NVIDIA has the dominant market share. But</p><p>because of the importance of this technology, it seems inevitable that there</p><p>will be more and more offerings that will come to the market.</p><p>When toUse Deep Learning?</p><p>Because of the power of deep learning, there is the temptation to use this</p><p>technology first when creating an AI project. But this can be a big mistake.</p><p>Deep learning still has narrow use cases, such as for text, video, image, and</p><p>time-series datasets. There is also a need for large amounts of data and high-</p><p>powered computer systems.</p><p>Oh, and deep learning is better when outcomes can be quantified and verified.</p><p>To see why, let’s consider the following example. A team of researchers, led</p><p>by Thomas Hartung (a toxicologist at Johns Hopkins University), created a</p><p>dataset of about 10,000 chemicals that were based on 800,000 animal tests.</p><p>By using deep learning, the results showed that the model was more predictive</p><p>than many animal tests for toxicity.31 Remember that animal tests can not only</p><p>be costly and require safety measures but also have inconsistent results</p><p>because of repeated testing on the same chemical.</p><p>28 www.technologyreview.com/s/612190/why-alibaba-is-investing-in-ai-</p><p>chips-and-quantum-computing/</p><p>29 www.technologyreview.com/f/613403/tesla-says-its-new-self-driving-</p><p>chip-will-help-make-its-cars-autonomous/</p><p>30 www.technologyreview.com/f/613258/intel-buys-into-an-ai-chip-</p><p>that-can-transfer-data-1000-times-faster/</p><p>31 www.nature.com/articles/d41586-018-05664-2</p><p>Chapter 4 | Deep Learning</p><p>http://www.technologyreview.com/s/612190/why-alibaba-is-investing-in-ai-chips-and-quantum-computing/</p><p>http://www.technologyreview.com/s/612190/why-alibaba-is-investing-in-ai-chips-and-quantum-computing/</p><p>http://www.technologyreview.com/f/613403/tesla-says-its-new-self-driving-chip-will-help-make-its-cars-autonomous/</p><p>http://www.technologyreview.com/f/613403/tesla-says-its-new-self-driving-chip-will-help-make-its-cars-autonomous/</p><p>http://www.technologyreview.com/f/613258/intel-buys-into-an-ai-chip-that-can-transfer-data-1000-times-faster/</p><p>http://www.technologyreview.com/f/613258/intel-buys-into-an-ai-chip-that-can-transfer-data-1000-times-faster/</p><p>http://www.nature.com/articles/d41586-018-05664-2</p><p>85</p><p>“The first scenario illustrates the predictive power of deep learning, and its</p><p>ability to unearth correlations from large datasets that a human would never</p><p>find,” said Sheldon Fernandez, who is the CEO of DarwinAI.32</p><p>So where’s a scenario in which deep learning falls short? Actually, an illustration</p><p>of this is the 2018 FIFA World Cup in Russia, which France won. Many</p><p>researchers tried to predict the outcomes of all 64 matches, but the results</p><p>were far from accurate:33</p><p>• One group of researchers employed the bookmaker</p><p>consensus model that indicated that Brazil would win.</p><p>• Another group of researchers used algorithms such as</p><p>random forest and Poisson ranking to forecast that Spain</p><p>would prevail.</p><p>The problem here is that it is tough to find the right variables that have</p><p>predictive power. In fact, deep learning models are basically unable to handle</p><p>the complexity of features for certain events, especially those that have</p><p>elements of being chaotic.</p><p>However, even if you have the right amount of data and computing power, you still</p><p>need to hire people who have a background in deep learning, which is not easy.</p><p>Keep in mindthat it is a challenge to select the right model and fine-tune it.</p><p>How many hyperparameters should there be? What should be the number of</p><p>hidden layers? And how do you evaluate the model? All of these are highly</p><p>complex.</p><p>Even experts can get things wrong. Here’s the following from Sheldon:</p><p>One of our automotive clients encountered some bizarre behavior in</p><p>which a self-driving car would turn left with increasing regularity when</p><p>the sky was a certain shade of purple. After months of painful debugging,</p><p>they determined the training for certain turning scenarios had been</p><p>conducted in the Nevada desert when the sky was a particular hue.</p><p>Unbeknownst to its human designers, the neural network had established</p><p>a correlation between its turning behavior and the celestial tint.34</p><p>There are some tools that are helping with the deep learning process, such as</p><p>Amazon.com’s SageMaker, Google’s HyperTune, and SigOpt. But there is still</p><p>a long way to go.</p><p>If deep learning is not a fit, then you may want to consider machine learning,</p><p>which often requires relatively less data. Furthermore, the models tend to be</p><p>much simpler, but the results may still be more effective.</p><p>32 This is from the author’s interview with Sheldon Fernandez, the CEO of DarwinAI.</p><p>33 https://medium.com/futuristone/artificial-intelligence-failed-</p><p>in-world-cup-2018-6af10602206a</p><p>34 This is from the author’s interview with Sheldon Fernandez, the CEO of DarwinAI.</p><p>Artificial Intelligence Basics</p><p>https://medium.com/futuristone/artificial-intelligence-failed-in-world-cup-2018-6af10602206a</p><p>https://medium.com/futuristone/artificial-intelligence-failed-in-world-cup-2018-6af10602206a</p><p>86</p><p>Drawbacks withDeep Learning</p><p>Given all the innovations and breakthroughs, it’s reasonable that many people</p><p>consider deep learning to be a silver bullet. It will mean we no longer have to</p><p>drive a car. It may even mean that we’ll cure cancer.</p><p>How is it not possible to be excited and optimistic? This is natural and</p><p>reasonable. But it is important to note that deep learning is still in a nascent</p><p>stage and there are actually many nagging issues. It’s a good idea to temper</p><p>expectations.</p><p>In 2018, Gary Marcus wrote a paper entitled “Deep Learning: A Critical</p><p>Appraisal,” in which he clearly set forth the challenges.35 In his paper, he notes:</p><p>Against a background of considerable progress in areas such as speech</p><p>recognition, image recognition, and game playing, and considerable</p><p>enthusiasm in the popular press, I present ten concerns for deep learning,</p><p>and suggest that deep learning must be supplemented by other techniques</p><p>if we are to reach Artificial General Intelligence.36</p><p>Marcus definitely has the right pedigree to present his concerns, as he has</p><p>both an academic and business background in AI.Before becoming a professor</p><p>at the Department of Psychology at NewYork University, he sold his startup,</p><p>called Geometric Intelligence, to Uber. Marcus is also the author of several</p><p>bestselling books like The Haphazard Construction of the Human Mind.37</p><p>Here’s a look at some of his worries about deep learning:</p><p>• Black Box: A deep learning model could easily have</p><p>millions of parameters that involve many hidden layers.</p><p>Having a clear understanding of this is really beyond a</p><p>person’s capabilities. True, this may not necessarily be a</p><p>problem with recognizing cats in a dataset. But it could</p><p>definitely be an issue with models for medical diagnosis</p><p>or determining the safety of an oil rig. In these situations,</p><p>regulators will want to have a good understanding of the</p><p>transparency of the models. Because of this, researchers</p><p>are looking at creating systems to determine</p><p>“explainability,” which provides an understanding of deep</p><p>learning models.</p><p>35 Gary Marcus, “Deep Learning: A Critical Appraisal,” arXiv, 1801.00631v1 [cs.AI]:1–27,</p><p>2018.</p><p>36 https://arxiv.org/ftp/arxiv/papers/1801/1801.00631.pdf</p><p>37 Gary Marcus, Kluge: The Haphazard Construction of the Human Mind (Houghton Mifflin,</p><p>2008).</p><p>Chapter 4 | Deep Learning</p><p>https://arxiv.org/ftp/arxiv/papers/1801/1801.00631.pdf</p><p>87</p><p>• Data: The human brain has its flaws. But there are some</p><p>functions that it does extremely well like the ability to</p><p>learn by abstraction. For example, suppose Jan, who is</p><p>five years old, goes to a restaurant with her family. Her</p><p>mother points out an item on the plate and says it is a</p><p>“taco.” She does not have to explain it or provide any</p><p>information about it. Instead, Jan’s brain will instantly</p><p>process this information and understand the overall</p><p>pattern. In the future, when she sees another taco—even</p><p>if it has differences, such as with the dressing—she will</p><p>know what it is. For the most part, this is intuitive. But</p><p>unfortunately, when it comes to deep learning, there is</p><p>no taco learning by abstraction! The system has to</p><p>process enormous amounts of information to recognize</p><p>it. Of course, this is not a problem for companies like</p><p>Facebook, Google, or even Uber. But many companies</p><p>have much more limited datasets. The result is that deep</p><p>learning may not be a good option.</p><p>• Hierarchical Structure: This way of organizing does not</p><p>exist in deep learning. Because of this, language</p><p>understanding still has a long way to go (especially with</p><p>long discussions).</p><p>• Open-Ended Inference: Marcus notes that deep learning</p><p>cannot understand the nuances between “John promised</p><p>Mary to leave” and “John promised to leave Mary.” What’s</p><p>more, deep learning is far away from being able to, for</p><p>instance, read Jane Austen’s Pride and Prejudice and be</p><p>able to divine Elizabeth Bennet’s character motivations.</p><p>• Conceptual Thinking: Deep learning cannot have an</p><p>understanding of concepts like democracy, justice, or</p><p>happiness. It also does not have imagination, thinking of</p><p>new ideas or plans.</p><p>• Common Sense: This is something deep learning does not</p><p>do well. If anything, this means a model can be easily</p><p>confused. For example, let’s say you ask an AI system, “Is</p><p>it possible to make a computer with a sponge?” For the</p><p>most part, it will probably not</p><p>know that this is a</p><p>ridiculous question.</p><p>• Causation: Deep learning is unable to determine this. It’s</p><p>all about finding correlations.</p><p>Artificial Intelligence Basics</p><p>88</p><p>• Prior Knowledge: CNNs can help with some prior</p><p>information, but this is limited. Deep learning is still fairly</p><p>self-contained, as it only solves one problem at a time. It</p><p>cannot take in the data and create algorithms that span</p><p>various domains. In addition, a model does not adapt. If</p><p>there is change in the data, then a new model needs to</p><p>be trained and tested. And finally, deep learning does not</p><p>have prior understanding of what people know</p><p>instinctively—such as basic physics of the real world. This</p><p>is something that has to be explicitly programmed into an</p><p>AI system.</p><p>• Static: Deep learning works best in environments that</p><p>are fairly simple. This is why AI has been so effective</p><p>with board games, which have a clear set of rules and</p><p>boundaries. But the real world is chaotic and</p><p>unpredictable. This means that deep learning may fall</p><p>short with complex problems, even with self-driving</p><p>cars.</p><p>• Resources: A deep learning model often requires a</p><p>tremendous amount of CPU power, such as with GPUs.</p><p>This can get costly. Although, one option is to use a</p><p>third-party cloud service.</p><p>This is quite a lot? It’s true. But the paper still has left out some drawbacks.</p><p>Here are a couple other ones:</p><p>• Butterfly Effect: Because of the complexity of the data,</p><p>networks, and connections, a minute change can have a</p><p>major impact in the results of the deep learning model.</p><p>This could easily lead to conclusions that are wrong or</p><p>misleading.</p><p>• Overfitting: We explained this concept earlier in the</p><p>chapter.</p><p>As for Marcus, his biggest fear is that AI could “get trapped in a local minimum,</p><p>dwelling too heavily in the wrong part of intellectual space, focusing too much</p><p>on the detailed exploration of a particular class of accessible but limited</p><p>models that are geared around capturing low-hanging fruit—potentially</p><p>neglecting riskier excursions that might ultimately lead to a more robust</p><p>path.”</p><p>However, he is not a pessimist. He believes that researchers need to go</p><p>beyond deep learning and find new techniques that can solve tough problems.</p><p>Chapter 4 | Deep Learning</p><p>89</p><p>Conclusion</p><p>While Marcus has pointed out the flaws in deep learning, the fact is that this</p><p>AI approach is still extremely powerful. In less than a decade, it has</p><p>revolutionized the tech world—and is also significantly impacting areas like</p><p>finance, robotics, and healthcare.</p><p>With the surge in investments from large tech companies and VCs, there</p><p>will be further innovation with the models. This will also encourage</p><p>engineers to get postgraduate degrees, creating a virtuous cycle of</p><p>breakthroughs.</p><p>Key Takeaways</p><p>• Deep learning, which is a subfield of machine learning,</p><p>processes huge amounts of data to detect relationships</p><p>and patterns that humans are often unable to detect. The</p><p>word “deep” describes the number of hidden layers.</p><p>• An artificial neural network (ANN) is a function that</p><p>includes units that have weights and are used to predict</p><p>values in an AI model.</p><p>• A hidden layer is a part of a model that processes</p><p>incoming data.</p><p>• A feed-forward neural network has data that goes only</p><p>from input to the hidden layer to the output. The results</p><p>do not cycle back. Yet they can go into another neural</p><p>network.</p><p>• An activation function is non-linear. In other words, it</p><p>tends to do a better job of reflecting the real world.</p><p>• A sigmoid is an activation function that compresses the</p><p>input value into a range of 0–1, which makes it easier for</p><p>analysis.</p><p>• Backpropagation is a sophisticated technique to adjust</p><p>the weights in a neural network. This approach has been</p><p>critical for the growth in deep learning.</p><p>• A recurrent neural network (RNN) is a function that not</p><p>only processes the input but also prior inputs across</p><p>time.</p><p>Artificial Intelligence Basics</p><p>90</p><p>• A convolutional neural network (CNN) analyzes data</p><p>section by section (that is, by convolutions). This model</p><p>is geared for complex applications like image recognition.</p><p>• A generative adversarial network or GAN is where two</p><p>neural networks compete with each other in a tight</p><p>feedback loop. The result is often the creation of a new</p><p>object.</p><p>• Explainability describes techniques for transparency with</p><p>complex deep learning models.</p><p>Chapter 4 | Deep Learning</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_5</p><p>C H A P T E R</p><p>5</p><p>Robotic Process</p><p>Automation</p><p>(RPA)</p><p>An Easier Path to AI</p><p>By interacting with applications just as a human would, software robots</p><p>can open email attachments, complete e-forms, record and re-key data,</p><p>and perform other tasks that mimic human action.</p><p>—Kaushik Iyengar,</p><p>director of Digital Transformation and Optimization at AT&T1</p><p>Back in 2005, Daniel Dines and Marius Tirca founded UiPath, which was</p><p>located in Bucharest, Romania. The company focused mostly on providing</p><p>integration services for applications from Google, Microsoft, and IBM.But it</p><p>was a struggle as the company relied mostly on custom work for clients.</p><p>1 www2.deloitte.com/insights/us/en/focus/signals-for-strategists/cognitive-</p><p>enterprise-robotic-process-automation.html</p><p>http://www2.deloitte.com/insights/us/en/focus/signals-for-strategists/cognitive-enterprise-robotic-process-automation.html</p><p>http://www2.deloitte.com/insights/us/en/focus/signals-for-strategists/cognitive-enterprise-robotic-process-automation.html</p><p>92</p><p>By 2013, UiPath was close to being shut down. But the founders did not give</p><p>up as they saw this as an opportunity to rethink the business and find a new</p><p>opportunity.2 To this end, they started to build a platform for Robotic</p><p>Process Automation (RPA). The category, which had been around since</p><p>2000, was about automating routine and mundane tasks within a company.</p><p>Yet RPA was actually a backwater area in the tech world—as seen with the</p><p>slow growth rates. However, Dines and Tirca were convinced that they could</p><p>transform the industry. One of the key reasons: the rise of AI and the cloud.</p><p>The new strategy was spot-on, and growth took off. Dines and Tirca also</p><p>were aggressive with seeking funding, innovating its RPA platform, and</p><p>expanding into global markets.</p><p>By 2018, UiPath was considered the fastest-growing enterprise software</p><p>company—ever. The annual recurring revenue soared from $1 million to $100</p><p>million, with over 1,800 customers.3 The company had the most widely used</p><p>RPA system in the world.</p><p>UiPath attracted a total of $448 million in venture capital from marque firms</p><p>like CapitalG, Sequoia Capital, and Accel. The valuation was at $3 billion.</p><p>In light of all this, more RPA startups snagged significant funding as well.</p><p>Then again, the market is forecasted to see tremendous growth. Grand</p><p>View Research predicts that spending will hit $3.97 billion in the United</p><p>States by 2025.4</p><p>Interestingly enough, Forrester had this to say about the RPA trend:</p><p>Today’s most successful companies generally operate</p><p>with fewer employees than those of the past. Consider</p><p>that Kodak at its peak in 1973 employed 120,000, but</p><p>when Facebook bought Instagram in 2012, the photo-</p><p>sharing site employed only 13 workers. In 2019, we</p><p>predict that one in 10 startups—operating in a more</p><p>agile, lean, and scalable fashion— will look at the</p><p>world through the lens of tasks, not jobs, and will</p><p>build business models around automation-first</p><p>principles.5</p><p>2 http://business-review.eu/news/the-story-of-uipath-how-it-became-</p><p>romanias-first-unicorn-164248</p><p>3 www.uipath.com/newsroom/uipath-raises-225-million-series-c-led-by-</p><p>capitalg-and-sequoia</p><p>4 www.grandviewresearch.com/press-release/global-robotic-process-</p><p>automation-rpa-market</p><p>5 https://go.forrester.com/blogs/predictions-2019-automation-will-become-</p><p>central-to-business-strategy-and-operations/</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>http://business-review.eu/news/the-story-of-uipath-how-it-became-romanias-first-unicorn-164248</p><p>http://business-review.eu/news/the-story-of-uipath-how-it-became-romanias-first-unicorn-164248</p><p>http://www.uipath.com/newsroom/uipath-raises-225-million-series-c-led-by-capitalg-and-sequoia</p><p>http://www.uipath.com/newsroom/uipath-raises-225-million-series-c-led-by-capitalg-and-sequoia</p><p>http://www.grandviewresearch.com/press-release/global-robotic-process-automation-rpa-market</p><p>http://www.grandviewresearch.com/press-release/global-robotic-process-automation-rpa-market</p><p>https://go.forrester.com/blogs/predictions-2019-automation-will-become-central-to-business-strategy-and-operations/</p><p>https://go.forrester.com/blogs/predictions-2019-automation-will-become-central-to-business-strategy-and-operations/</p><p>93</p><p>RPA is yet another area that has been supercharged with AI. If anything, it</p><p>could be the gateway for many companies because the implementation usually</p><p>does not take long or require heavy costs.</p><p>In this chapter, we’ll take a look at RPA and see how it could be a critical</p><p>driver for many companies.</p><p>What Is RPA?</p><p>The term Robotic Process Automation can be a bit confusing. The word</p><p>“robotic” does not mean physical robots (we’ll cover these in Chapter 7);</p><p>rather, it is about software-based robots or bots.</p><p>RPA allows you to use low-code visual drag-and-drop systems to automate</p><p>the workflow of a process. Some examples include the following:</p><p>• Inputting, changing, and tracking Human Resources (HR)</p><p>documents, contracts, and employee information</p><p>• Detecting issues with customer service and taking actions</p><p>to resolve the problems</p><p>• Processing an insurance claim</p><p>• Sending invoices</p><p>• Issuing refunds to customers</p><p>• Reconciling financial records</p><p>• Transferring data from one system to another</p><p>• Providing standard replies to customers</p><p>This is all done by having a bot replicate the workflows for an application, say</p><p>for an ERP (Enterprise Resource Planning) or CRM (Customer Relationship</p><p>Management) system. This may even be done with the RPA program recording</p><p>the steps from employees or with the use of OCR (optical character</p><p>recognition) technology to translate handwritten notes. Think of RPA as a</p><p>digital employee.</p><p>There are two flavors of this type of technology:</p><p>• Unattended RPA: This is a process that is completely</p><p>autonomous as the bot will run in the background. Now</p><p>this does not mean there is no human intervention.</p><p>There will still be intervention for exception management.</p><p>This is when the bot encounters something it does not</p><p>understand.</p><p>Artificial Intelligence Basics</p><p>94</p><p>• RDA (Robotic Desktop Automation): This is where RPA</p><p>helps an employee with a job or task. A common use</p><p>case is with a contact center. That is, when a call comes</p><p>in, the rep can use RDA to help find answers, send</p><p>messages, pull customer profile information, and get</p><p>insight on what to do next. The technology helps improve</p><p>or augment the efficiency of the worker.</p><p>Pros andCons ofRPA</p><p>Of course, quite a bit of time for a typical employee—in the back office—is</p><p>spent on routine tasks. But with RPA, companies can often get a strong ROI</p><p>(Return on Investment)—so long as the implementation is done right.</p><p>Here are some other advantages:</p><p>• Customer Satisfaction: RPA means minimal errors as well</p><p>as high speed. A bot also works 24/7. This means that</p><p>customer satisfaction scores—like the NPS (Net</p><p>Promoter Score)—should improve. Note that increasingly</p><p>more customers, such as from the Millennial generation,</p><p>prefer to deal with apps/web sites, not people! RPA also</p><p>means that reps will have more time to spend on value-</p><p>added tasks, instead of dealing with the tedious matters</p><p>that waste time.</p><p>• Scalability: Once a bot is created, it can be quickly</p><p>expanded to meet spikes in activity. This can be critical</p><p>for seasonal businesses like retailers.</p><p>• Compliance: For people, it’s tough to keep track of rules,</p><p>regulations, and laws. Even worse, they often change. But</p><p>with RPA, compliance is built into the process—and is</p><p>always followed. This can be a major benefit in terms of</p><p>avoiding legal problems and fines.</p><p>• Insights and Analytics: Next-generation RPA platforms</p><p>come equipped with sophisticated dashboards, which</p><p>focus on KPIs for your business. You can also set up alerts</p><p>if there are any problems.</p><p>• Legacy Systems: Older companies are often bogged down</p><p>with old IT systems, which makes it extremely tough to</p><p>pull off a digital transformation. But RPA software is able</p><p>to work fairly well with legacy IT environments.</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>95</p><p>• Data: Because of the automation, the data is much</p><p>cleaner as there are minimal input errors. This means</p><p>that organizations will—over time—have more</p><p>accurate understandings of their businesses. The data</p><p>quality will also increase the likelihood of success of AI</p><p>implementations.</p><p>While all this is great, RPA still has its drawbacks. For example, if you have</p><p>current processes that are inefficient and you rush to implement the RPA</p><p>system, you will be essentially replicating a bad approach! This is why it is</p><p>critical to evaluate your workflows before implementing a system.</p><p>But there are certainly other potential landmines to note, such as the</p><p>following:</p><p>• Brittleness: RPA can easily break if there are changes in the</p><p>underlying applications. This could also be the case if there</p><p>are changes in procedures and regulations. It’s true that</p><p>newer systems are getting better at adapting and may also</p><p>leverage APIs. But RPA is not about hands-off activity.</p><p>• Virtualized Apps: This type of software, such as from</p><p>Citrix, can be difficult with RPA systems because they</p><p>cannot effectively capture the processes. The reason is</p><p>that the data is stored on an outside server and the</p><p>output is a snapshot on a monitor. But some companies</p><p>are using AI to solve the problem, such as UiPath. The</p><p>company has created a system, called “Pragmatic AI,”</p><p>which uses computer vision to interpret the screen</p><p>snapshots to record the processes.</p><p>• Specialization: Many RPA tools are for general-purpose</p><p>activities. But there may be areas that require</p><p>specialization, such as with finance. In this case, you may</p><p>look at a niche software app that can handle it.</p><p>• Testing: This is absolutely critical. You want to first sample</p><p>some transactions to make sure the system is working</p><p>correctly. After this, you can do a more extensive rollout</p><p>of the RPA system.</p><p>• Ownership: The temptation is to have IT own the RPA</p><p>implementation and management. But this is probably</p><p>not advisable. The reason? RPA systems are fairly low</p><p>tech. After all, they can be developed by nonprogrammers.</p><p>Because of this, the business managers are ideal for</p><p>owning the process since they can generally handle the</p><p>technical issues and also have a firmer grasp of the</p><p>employee workflows.</p><p>Artificial Intelligence Basics</p><p>96</p><p>• Resistance: Change is always difficult. With RPA, there</p><p>may be fears that the technology will displace jobs. This</p><p>means you need to have a clear set of messages, which</p><p>focus on the benefits of the technology. For example,</p><p>RPA will mean more time to focus on important matters,</p><p>which should make a person’s job more interesting and</p><p>meaningful.</p><p>What Can YouExpect fromRPA?</p><p>When it comes to RPA, the industry is still in the early phases. Yet there are</p><p>clear signs that the technology is making a big difference for many companies.</p><p>Take a look at the research report from Computer Economics Technology,</p><p>which included roughly 250 companies (they were across many industries and</p><p>had revenues that were from $20 million to over $1 billion). Of those that</p><p>implemented an RPA system, about half reported a positive return within 18</p><p>months of deployment. This is definitely standout for enterprise software,</p><p>which can be challenging in getting adoption.6</p><p>And to get a sense of the strategic importance of this technology, look to see</p><p>what the US Defense Department—which is engaged in over 500 AI</p><p>projects—is doing. Here’s what the agency’s Joint Artificial Intelligence Center</p><p>director, Air Force Lt. Gen. Jack Shanahan, had to say during a Congressional</p><p>hearing:</p><p>When you talk about smart automation, or in the</p><p>vernacular of the industry, Robotic Process Automation,</p><p>it’s not headline grabbing in terms of big AI projects,</p><p>but it may be where the most efficiencies can be found.</p><p>That’s the case if you read some of the dailies in</p><p>industry, whether it’s in medicine or finance, this is</p><p>where early gains are being realized in AI.Some of the</p><p>other projects we take on in the department are</p><p>probably years in the making in return on investment.7</p><p>Despite all this, there are still many failed RPA implementations as well. Ernst</p><p>& Young, for example, has received large amount of consulting business</p><p>because of this. Based on this experience, the failure rate for initial RPA</p><p>projects ranges from 30% to 50%.8</p><p>6 www.computereconomics.com/article.cfm?id=2633</p><p>7 https://federalnewsnetwork.com/artificial-intelligence/2019/03/</p><p>dod-laying-groundwork-for-multi-generational-effort-on-ai/</p><p>8 www.cmswire.com/information-management/why-rpa-implementation-</p><p>projects-fail/</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>http://www.computereconomics.com/article.cfm?id=2633</p><p>https://federalnewsnetwork.com/artificial-intelligence/2019/03/dod-laying-groundwork-for-multi-generational-effort-on-ai/</p><p>https://federalnewsnetwork.com/artificial-intelligence/2019/03/dod-laying-groundwork-for-multi-generational-effort-on-ai/</p><p>http://www.cmswire.com/information-management/why-rpa-implementation-projects-fail/</p><p>http://www.cmswire.com/information-management/why-rpa-implementation-projects-fail/</p><p>97</p><p>But this is inevitable with any type of enterprise software system. Yet so far,</p><p>the problems appear mostly to be about planning, strategy, and expectations—</p><p>not the technology.</p><p>Another problem is that the hype surrounding RPA may be raising expectations</p><p>to excessive levels. This means that disappointment will be fairly common,</p><p>even if implementations are successful!</p><p>Of course, technologies are not cure-alls. And they require much time, effort,</p><p>and diligence to work.</p><p>How toImplement RPA</p><p>Then what are some steps to take for a successful RPA implementation?</p><p>There is no standard answer, but there are certainly some best practices emerging:</p><p>• Determine the right functions to automate.</p><p>• Assess the processes.</p><p>• Select the RPA vendor and deploy the software.</p><p>• Set in place a team to manage the RPA platform.</p><p>Let’s take a closer look at each of these.</p><p>Determine theRight Functions toAutomate</p><p>Yes, excessive automation at Tesla was a mistake. To be precise, my</p><p>mistake. Humans are underrated.</p><p>—Elon Musk, CEO of Tesla9</p><p>Even though RPA is powerful and can move the needle in a big way for a</p><p>company, the capabilities are still fairly limited. The technology essentially</p><p>makes the most sense for automating repetitive, structured, and routine</p><p>processes. This involves things like scheduling, inputting/transferring data,</p><p>following rules/workflows, cut and paste, filling out forms, and search. This</p><p>means that RPA can actually have a role in just about every department in an</p><p>organization.</p><p>Then where does this technology generally fail to deliver? Well, if a process</p><p>requires independent judgment, then RPA probably does not make sense. The</p><p>same goes for when the processes are subject to frequent change. In this situation,</p><p>you can spend lots of time with ongoing adjustments to the configurations.</p><p>9 https://twitter.com/elonmusk/status/984882630947753984?lang=en</p><p>Artificial Intelligence Basics</p><p>https://twitter.com/elonmusk/status/984882630947753984?lang=en</p><p>98</p><p>Once you establish a part of the business where the technology looks like a</p><p>good fit, there are a myriad of other considerations. In other words, you’ll</p><p>likely have more success with a project if you focus on the following:</p><p>• The areas of the business that have serious levels of</p><p>underperformance</p><p>• The processes that take up a high percentage of employee</p><p>time and involve high error rates</p><p>• The tasks that need more hiring when there are higher</p><p>volumes</p><p>• The areas that you are thinking of outsourcing</p><p>• A process that has a large number of steps and in which</p><p>there are various applications involved</p><p>Assess theProcesses</p><p>It’s common for a company to have many unwritten processes. And this is</p><p>fine. This approach allows for adaptability, which is what people are good at.</p><p>However, this is far from the case with a bot. To have a successful</p><p>implementation, you need to have a deep assessment of the processes. This</p><p>can actually take a while, and it may make sense to get outside consultants to</p><p>help out. They have the advantage of being more neutral and better able to</p><p>identify the weaknesses.</p><p>Some of the RPA vendors do have their own tools to help with analyzing</p><p>processes—which you should definitely use. There are also third-party</p><p>software providers that have their own offerings. One is Celonis, which</p><p>integrates with RPA platforms such as UiPath, Automation Anywhere, Blue</p><p>Prism, and others. The software performs essentially a digital MRI that</p><p>analyzes data, providing insights on how your processes really work. It will</p><p>also identify weakness and opportunities, such as to increase revenues,</p><p>improve customer satisfaction, and free up resources.</p><p>Regardless of what approach you take, it is critical that you formulate a clear-</p><p>cut plan that has the input from IT, higher management, and the departments</p><p>impacted. Also make sure to get analytics people involved, as there could be</p><p>opportunities for leveraging the data.</p><p>Select theRPA Vendor andDeploy theSoftware</p><p>By going through the first two steps, you’ll be in a very good position to</p><p>evaluate the different RPA systems. For example, if your main goal is to cut</p><p>staff, then you would look for software that is focused on unattended bots.</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>99</p><p>Or, if you want to leverage data—such as for AI applications—then this will</p><p>lead to other types of RPA platforms.</p><p>Then, once you have selected one, you will begin the deployment. The good</p><p>news is that this can be relatively fast, say less than a month.</p><p>But as you go on to do further RPA projects, you may run into something</p><p>called automation fatigue. This is where the returns generally start to</p><p>deteriorate.</p><p>Think of it this way: When you start out, the focus will usually be on those</p><p>areas of the business that need automation the most, which means the ROI</p><p>will be significant. But over time, there will be a focus on tasks that are not as</p><p>amenable to automation, and it will likely take much more work to realize</p><p>even slight improvements.</p><p>Because of this, it is a good idea to temper expectations when engaging in a</p><p>widespread RPA transformation.</p><p>Set inPlace aTeam toManage theRPA Platform</p><p>Just because RPA provides a high degree of automation does not mean it</p><p>requires little management. Rather, the best approach is to put together a</p><p>team, which is often referred to as a center of excellence (CoE).</p><p>In order to make the best use of the CoE, you need to be clear on each</p><p>person’s responsibilities. For example, you should be able to answer the</p><p>following questions:</p><p>• What happens if there is a problem with a bot? At what</p><p>points should there be human intervention?</p><p>• Who is in charge of monitoring the RPA?</p><p>• Who is in charge of training?</p><p>• Who will have the role for the first line of support?</p><p>• Who is responsible for developing the bots?</p><p>For larger organizations, you might also want to expand the roles. You could</p><p>have an RPA champion, who would be the evangelist of the platform—for the</p><p>whole company. Or there could be an RPA change manager, who provides the</p><p>communication to help with adoption.</p><p>Finally, as the RPA implementation gets larger, a key goal should be to look at</p><p>how all the parts fit together. Like many other software systems, there is the</p><p>risk of sprawl across the organization—which can mean not getting higher</p><p>performance. This is where having a proactive CoE can make a</p><p>major positive</p><p>impact.</p><p>Artificial Intelligence Basics</p><p>100</p><p>RPA andAI</p><p>While still in the initial phases, AI is already making strides with RPA tools.</p><p>This is leading to the emergence of Cognitive Robotic Process Automation</p><p>(CRPA) software bots.</p><p>And this makes sense. After all, RPA is about optimizing processes and involves</p><p>large amounts of data. So vendors are starting to implement systems like</p><p>machine learning, deep learning, speech recognition, and Natural Language</p><p>Processing. Some of the leaders in the CRPA space include UiPath, Automation</p><p>Anywhere, Blue Prism, NICE Systems, and Kryon Systems.</p><p>For example, with Automation Anywhere, a bot can handle tasks such as</p><p>extracting invoices from emails, which involves sophisticated text processing.</p><p>The company also has prebuilt integrations with third-party AI services like</p><p>IBM Watson, AWS Machine Learning, and Google Cloud AI.10</p><p>“There has been a proliferation of AI-enabled services in recent years, but</p><p>businesses often struggle to operationalize them,” said Mukund Srigopal, who</p><p>is the director of Product Marketing at Automation Anywhere. “RPA is a</p><p>great way to infuse AI capabilities into business processes.”11</p><p>Here are some other ways CRPA can allow for AI functions:</p><p>• You can connect chatbots with your system, which will</p><p>allow for automated customer service (we’ll cover this</p><p>topic in Chapter 6).</p><p>• AI can find the right moment to send an email or alert.</p><p>• IVR (Interactive Voice Response) has gotten a bad</p><p>reputation over the years. Simply put, customers do not</p><p>like the hassle of going through multiple steps to solve a</p><p>problem. But with CRPA, you can use something called</p><p>Dynamic IVR. This personalizes the voice messages to</p><p>each customer, providing for a much better experience.</p><p>• NLP and text analysis can convert unstructured data into</p><p>structured data. This can make the CRPA more effective.</p><p>10 www.forbes.com/sites/tomtaulli/2019/02/02/what-you-need-to-know-</p><p>about-rpa-robotic-process-automation/</p><p>11 This is from the author’s interview with Mukund Srigopal, the director of Product</p><p>Marketing at Automation Anywhere.</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>http://www.forbes.com/sites/tomtaulli/2019/02/02/what-you-need-to-know-about-rpa-robotic-process-automation/</p><p>http://www.forbes.com/sites/tomtaulli/2019/02/02/what-you-need-to-know-about-rpa-robotic-process-automation/</p><p>101</p><p>RPA intheReal World</p><p>To get a better sense of how RPA works and to understand the benefits,</p><p>here’s a look at a case study of Microsoft.12 Every year, the company pays</p><p>billions of dollars in royalties to game developers, partners, and content</p><p>creators. Yet the process was mostly manual, involving the sending of</p><p>thousands of statements—and yes, this was a big time waster for the company.</p><p>So the company selected Kyron for an RPA implementation. By doing an initial</p><p>process review, Microsoft realized that anywhere from 70% to 80% of the</p><p>statements were straightforward and could be easily automated. The rest</p><p>included exceptions that required human intervention, such as approvals.</p><p>With the RPA system, a visual detection algorithm could divvy up the</p><p>statements and find the exceptions. The setup was also fairly quick, taking</p><p>about 6 weeks.</p><p>As should be no surprise, the results had a material impact on the process.</p><p>For instance, a bot was able to take only 2.5 hours to complete 150 royalty</p><p>statements. By comparison, it would take 50 hours for employees to do this.</p><p>The bottom line: Microsoft achieved a 2,000% savings. There was also an</p><p>elimination of any rework from human error (which before was about 5% in</p><p>a given month).</p><p>Conclusion</p><p>As seen with the Microsoft case study, RPA can lead to major savings. But</p><p>there still needs to be diligent planning, so as to understand your processes.</p><p>For the most part, the focus should be on tasks that are manual and</p><p>repetitive—not those that rely heavily on judgment. Next, it is important to</p><p>setup a CoE to oversee the ongoing management of the automation, which</p><p>will help with handling exceptions, collecting data, and tracking KPIs.</p><p>RPA is also a great way to implement basic AI within an organization. Actually,</p><p>because there could be significant ROI, this may spur even more investment</p><p>in pursuing this technology.</p><p>12 www.kryonsystems.com/microsoft-case-study/</p><p>Artificial Intelligence Basics</p><p>http://www.kryonsystems.com/microsoft-case-study/</p><p>102</p><p>Key Takeaways</p><p>• Robotic Process Automation (RPA) allows you to use</p><p>low-code visual drag-and-drop systems to automate the</p><p>workflow of a process.</p><p>• Unattended RPA is when a process is completely</p><p>automated.</p><p>• RDA (Robotic Desktop Automation) is where RPA helps</p><p>an employee with a job or task.</p><p>• Some of the benefits of RPA include higher customer</p><p>satisfaction, lower error rates, improved compliance, and</p><p>easier integration with legacy systems.</p><p>• Some of the drawbacks of RPA include the difficulty with</p><p>adapting to changes in the underlying applications, issues</p><p>with virtualized apps, and resistance from employees.</p><p>• RPA tends to work best where you can automate</p><p>repetitive, structured, and routine processes, such as</p><p>scheduling, inputting/transferring data, and following</p><p>rules/workflows.</p><p>• When implementing an RPA solution, some of the steps</p><p>to consider include determining the functions to</p><p>automate, assessing the processes, selecting the RPA</p><p>vendor and deploying the software, and setting in place a</p><p>team to manage the platform.</p><p>• A center of excellence (CoE) is a team that manages an</p><p>RPA implementation.</p><p>• Cognitive Robotic Process Automation (CRPA) is an</p><p>emerging category of RPA that focuses on AI technologies.</p><p>Chapter 5 | Robotic Process Automation (RPA)</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_6</p><p>C H A P T E R</p><p>6</p><p>Natural</p><p>Language</p><p>Processing (NLP)</p><p>How Computers Talk</p><p>In 2014, Microsoft launched a chatbot—an AI system that communicates with</p><p>people—called Xiaoice. It was integrated into Tencent’s WeChat, the largest</p><p>social messaging service in China. Xiaoice performed quite well, getting to</p><p>40 million users within a few years.</p><p>In light of the success, Microsoft wanted to see if it could do something</p><p>similar in the US market. The company’s Bing and the Technology and Research</p><p>Group leveraged AI technologies to build a new chatbot: Tay. The developers</p><p>even enlisted the help of improvisational comedians to make the conversion</p><p>engaging and fun.</p><p>104</p><p>On March 23, 2016, Microsoft launched Tay on Twitter—and it was an</p><p>unmitigated disaster. The chatbot quickly spewed racist and sexist messages!</p><p>Here’s just one of the thousands of examples:</p><p>@TheBigBrebowski ricky gervais learned totalitarianism from adolf hitler, the</p><p>inventor of atheism1</p><p>Tay was a vivid illustration of Godwin’s Law. It reads as follows:the more an</p><p>online discussion continues, the higher are the odds that someone will bring</p><p>up Adolf Hitler or the Nazis.</p><p>So yes, Microsoft took down Tay within 24 hours and blogged an apology. In</p><p>it, the corporate vice president of Microsoft Healthcare, Peter Lee, wrote:</p><p>Looking ahead, we face some difficult—and yet exciting—</p><p>research challenges in AI design. AI systems feed off of</p><p>both positive and negative interactions with people. In</p><p>that sense, the challenges are just as much social as they</p><p>are technical. We will do everything possible to limit</p><p>technical exploits but also know we cannot fully predict</p><p>all possible human interactive misuses without learning</p><p>from mistakes. To do AI right, one needs to iterate with</p><p>many people and often in public forums. We must enter</p><p>each one with great caution and ultimately learn and</p><p>improve, step by step, and to do this without offending</p><p>people in the process. We will remain steadfast in our</p><p>efforts to learn from this and other experiences as we</p><p>work toward contributing to an Internet that represents</p><p>the best, not the worst, of humanity.2</p><p>A key to Tay was to repeat some of the content of the people asking</p><p>xi</p><p>As for this book, the goal is to provide actionable advice that can make a big</p><p>difference in your organization and career. Now you will not find deeply tech-</p><p>nical explanations, code snippets, or equations. Instead, Artif icial Intelligence</p><p>Basics is about answering the top-of-mind questions that managers have:</p><p>Where does AI make sense? What are the gotchas? How do you evaluate the</p><p>technology? What about starting an AI pilot?</p><p>This book also takes a real-world view of the technology. A big advantage I</p><p>have as a writer for Forbes.com and an advisor in the tech world is that I get</p><p>to talk to many talented people in the AI field—and this helps me to identify</p><p>what is really important in the industry. I also get to learn about case studies</p><p>and examples of what works.</p><p>This book is organized in a way to cover the main topics in AI—and you do</p><p>not have to read each chapter in order. Artif icial Intelligence Basics is meant to</p><p>be a handbook.</p><p>Here are brief descriptions of the chapters:</p><p>• Chapter 1—AI Foundations: This is an overview of the rich</p><p>history of AI, which goes back to the 1950s. You will</p><p>learn about brilliant researchers and computer scientists</p><p>like Alan Turing, John McCarthy, Marvin Minsky, and</p><p>Geoffrey Hinton. There will also be coverage of key con-</p><p>cepts like the Turing Test, which gauges if a machine has</p><p>achieved true AI.</p><p>• Chapter 2—Data: Data is the lifeblood of AI. It’s how</p><p>algorithms can find patterns and correlations to provide</p><p>insights. But there are landmines with data, such as qual-</p><p>ity and bias. This chapter provides a framework to work</p><p>with data in an AI project.</p><p>• Chapter 3—Machine Learning: This is a subset of AI and</p><p>involves traditional statistical techniques like regressions.</p><p>But in this chapter, we’ll also cover the advanced algo-</p><p>rithms, such as k-Nearest Neighbor (k-NN) and the</p><p>Naive Bayes Classifier. Besides this, there will be a look at</p><p>how to put together a machine learning model.</p><p>• Chapter 4—Deep Learning: This is another subset of AI</p><p>and is clearly the one that has seen much of the innova-</p><p>tion during the past decade. Deep learning is about using</p><p>neural networks to find patterns that mimic the brain. In</p><p>the chapter, we’ll take a look at the main algorithms like</p><p>recurrent neural networks (RNNs), convolutional neural</p><p>networks (CNNs), and generative adversarial networks</p><p>(GANs). There will also be explanations of key concepts</p><p>like backpropagation.</p><p>Introduction</p><p>xii</p><p>• Chapter 5—Robotic Process Automation: This uses systems</p><p>to automate repetitive processes, such as inputting data</p><p>in a Customer Relationship Management (CRM) system.</p><p>Robotic Process Automation (RPA) has seen tremendous</p><p>growth during the past few years because of the high ROI</p><p>(Return on Investment). The technology has also been an</p><p>introductory way for companies to implement AI.</p><p>• Chapter 6—Natural Language Processing (NLP): This form</p><p>of AI, which involves understanding conversations, is the</p><p>most ubiquitous as seen with Siri, Cortana, and Alexa.</p><p>But NLP systems, such as chatbots, have also become</p><p>critical in the corporate world. This chapter will show</p><p>ways to use this technology effectively and how to avoid</p><p>the tricky issues.</p><p>• Chapter 7—Physical Robots: AI is starting to have a major</p><p>impact on this industry. With deep learning, it is getting</p><p>easier for robots to understand their environments. In</p><p>this chapter, we’ll take a look at both consumer and</p><p>industrial robots, such as with a myriad of use cases.</p><p>• Chapter 8—Implementation of AI: We’ll take a step-by-step</p><p>approach to putting together an AI project, from the ini-</p><p>tial concept to the deployment. This chapter will also</p><p>cover the various tools like Python, TensorFlow, and</p><p>PyTorch.</p><p>• Chapter 9—The Future of AI: This chapter will cover some</p><p>of the biggest trends in AI like autonomous driving,</p><p>weaponization of AI, technological unemployment, drug</p><p>discovery, and regulation.</p><p>At the back of the book, you’ll also find an appendix of resources for further</p><p>study and a glossary of common terms related to AI.</p><p>Accompanying Material</p><p>Any updates will be provided on my site at www.Taulli.com.</p><p>Introduction</p><p>http://www.taulli.com/</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_1</p><p>C H A P T E R</p><p>1</p><p>AI Foundations</p><p>History Lessons</p><p>Artif icial intelligence would be the ultimate version of Google. The ultimate</p><p>search engine that would understand everything on the web. It would</p><p>understand exactly what you wanted, and it would give you the right</p><p>thing. We’re nowhere near doing that now. However, we can get</p><p>incrementally closer to that, and that is basically what we work on.</p><p>—Larry Page, the co-founder of Google Inc. and</p><p>CEO of Alphabet1</p><p>In Fredric Brown’s 1954 short story, “Answer,” all of the computers across</p><p>the 96 billion planets in the universe were connected into one super</p><p>machine. It was then asked, “Is there a God?” to which it answered, “Yes,</p><p>now there is a God.”</p><p>No doubt, Brown’s story was certainly clever—as well as a bit comical and</p><p>chilling! Science fiction has been a way for us to understand the implications</p><p>of new technologies, and artificial intelligence (AI) has been a major theme.</p><p>Some of the most memorable characters in science fiction involve androids or</p><p>computers that become self-aware, such as in Terminator, Blade Runner, 2001:</p><p>A Space Odyssey, and even Frankenstein.</p><p>But with the relentless pace of new technologies and innovation nowadays,</p><p>science fiction is starting to become real. We can now talk to our smartphones</p><p>and get answers; our social media accounts provide us with the content we’re</p><p>1 Founding CEO of Google Inc. The Academy of Achievement interview,</p><p>www.achievement.org, October 28, 2000.</p><p>http://www.achievement.org</p><p>2</p><p>interested in; our banking apps provide us with reminders; and on and on.</p><p>This personalized content creation almost seems magical but is quickly</p><p>becoming normal in our everyday lives.</p><p>To understand AI, it’s important to have a grounding in its rich history. You’ll</p><p>see how the development of this industry has been full of breakthroughs and</p><p>setbacks. There is also a cast of brilliant researchers and academics, like Alan</p><p>Turing, John McCarthy, Marvin Minsky, and Geoffrey Hinton, who pushed the</p><p>boundaries of the technology. But through it all, there was constant progress.</p><p>Let’s get started.</p><p>Alan Turing andtheTuring Test</p><p>Alan Turing is a towering figure in computer science and AI.He is often called</p><p>the “father of AI.”</p><p>In 1936, he wrote a paper called “On Computable Numbers.” In it, he set</p><p>forth the core concepts of a computer, which became known as the Turing</p><p>machine. Keep in mind that real computers would not be developed until</p><p>more than a decade later.</p><p>Yet it was his paper, called “Computing Machinery and Intelligence,” that</p><p>would become historic for AI.He focused on the concept of a machine that</p><p>was intelligent. But in order to do this, there had to be a way to measure it.</p><p>What is intelligence—at least for a machine?</p><p>This is where he came up with the famous “Turing Test.” It is essentially a</p><p>game with three players: two that are human and one that is a computer. The</p><p>evaluator, a human, asks open-ended questions of the other two (one human,</p><p>one computer) with the goal of determining which one is the human. If the</p><p>evaluator cannot make a determination, then it is presumed that the computer</p><p>is intelligent. Figure1-1 shows the basic workflow of the Turing Test.</p><p>Figure 1-1. The basic workflow of the Turing Test</p><p>Chapter 1 | AI Foundations</p><p>3</p><p>The genius of this concept is that there is no need to see if the machine</p><p>actually knows something, is self-aware, or even if it is correct. Rather, the</p><p>Turing Test indicates that a machine can process large amounts of information,</p><p>interpret speech, and communicate with humans.</p><p>Turing believed that it would actually not be until about the turn of the century</p><p>that a machine would pass his test. Yes, this was one</p><p>questions.</p><p>For the most part, this is a valid approach. As we saw in Chapter 1, this was</p><p>at the heart of the first chatbot, ELIZA.</p><p>But there also must be effective filters in place. This is especially the case</p><p>when a chatbot is used in a free-form platform like Twitter (or, for that matter,</p><p>in any real-world scenario).</p><p>However, failures like Tay are important. They allow us to learn and to evolve</p><p>the technology.</p><p>In this chapter, we’ll take a look at chatbots as well as Natural Language</p><p>Processing (NLP), which is a key part of how computers understand and</p><p>manipulate language. This is a subset of AI.</p><p>Let’s get started.</p><p>1 www.theverge.com/2016/3/24/11297050/tay-microsoft-chatbot-racist</p><p>2 https://blogs.microsoft.com/blog/2016/03/25/learning-tays-introduction/</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>http://www.theverge.com/2016/3/24/11297050/tay-microsoft-chatbot-racist</p><p>https://blogs.microsoft.com/blog/2016/03/25/learning-tays-introduction/</p><p>105</p><p>The Challenges ofNLP</p><p>As we saw in Chapter 1, language is the key to the Turing Test, which is meant</p><p>to validate AI.Language is also something that sets us apart from animals.</p><p>But this area of study is exceedingly complex. Here are just some of the</p><p>challenges with NLP:</p><p>• Language can often be ambiguous. We learn to speak in a</p><p>quick fashion and accentuate our meaning with nonverbal</p><p>cues, our tone, or reactions to the environment. For</p><p>example, if a golf ball is heading toward someone, you’ll</p><p>yell “Fore!” But an NLP system would likely not</p><p>understand this because it cannot process the context of</p><p>the situation.</p><p>• Language changes frequently as the world changes.</p><p>According to the Oxford English Dictionary, there were</p><p>more than 1,100 words, senses, and subentries in 2018</p><p>(in all, there are over 829,000)3. Some of the new entries</p><p>included mansplain and hangry.</p><p>• When we talk, we make grammar mistakes. But this is</p><p>usually not a problem as people have a great ability for</p><p>inference. But this is a major challenge for NLP as words</p><p>and phrases may have multiple meanings (this is called</p><p>polysemy). For example, noted AI researcher Geoffrey</p><p>Hinton likes to compare “recognize speech” and “wreck</p><p>a nice beach.”4</p><p>• Language has accents and dialects.</p><p>• The meaning of words can change based on, say, the use</p><p>of sarcasm or other emotional responses.</p><p>• Words can be vague. After all, what does it really mean</p><p>to be “late”?</p><p>• Many words have essentially the same meaning but</p><p>involve degrees of nuances.</p><p>• Conversations can be non-linear and have interruptions.</p><p>Despite all this, there have been great strides with NLP, as seen with apps like</p><p>Siri, Alexa, and Cortana. Much of the progress has also happened within the</p><p>last decade, driven by the power of deep learning.</p><p>3 https://wordcounter.io/blog/newest-words-added-to-the-dictionary-</p><p>in-2018/</p><p>4 www.deepinstinct.com/2019/04/16/applications-of-deep-learning/</p><p>Artificial Intelligence Basics</p><p>https://wordcounter.io/blog/newest-words-added-to-the-dictionary-in-2018/</p><p>https://wordcounter.io/blog/newest-words-added-to-the-dictionary-in-2018/</p><p>http://www.deepinstinct.com/2019/04/16/applications-of-deep-learning/</p><p>106</p><p>Now there can be confusion about human languages and computer languages.</p><p>Haven’t computers been able to understand languages like BASIC, C, and</p><p>C++ for years? This is definitely true. It’s also true that computer languages</p><p>have English words like if, then, let, and print.</p><p>But this type of language is very different from human language. Consider that</p><p>a computer language has a limited set of commands and strict logic. If you use</p><p>something incorrectly, this will result in a bug in the code—leading to a crash.</p><p>Yes, computer languages are very literal!</p><p>Understanding How AI Translates Language</p><p>Now as we saw in Chapter 1, NLP was an early focus for AI researchers. But</p><p>because of the limited computer power, the capabilities were quite weak. The</p><p>goal was to create rules to interpret words and sentences—which turned out</p><p>to be complex and not very scalable. In a way, NLP in the early years was</p><p>mostly like a computer language!</p><p>But over time, there evolved a general structure for it. This was critical since</p><p>NLP deals with unstructured data, which can be unpredictable and difficult to</p><p>interpret.</p><p>Here’s a general high-level look at the two key steps:</p><p>• Cleaning and Preprocessing the Text: This involves using</p><p>techniques like tokenization, stemming, and lemmatization</p><p>to parse the text.</p><p>• Language Understanding and Generation: This is definitely</p><p>the most intensive part of the process, which often uses</p><p>deep learning algorithms.</p><p>In the next few sections, we’ll look at the different steps in more detail.</p><p>Step #1—Cleaning andPreprocessing</p><p>Three things need to be done during the cleaning and preprocessing step:</p><p>tokenization, stemming, and lemmatization.</p><p>Tokenization</p><p>Before there can be NLP, the text must be parsed and segmented into various</p><p>parts—a process known as tokenization. For example, let’s say we have the</p><p>following sentence: “John ate four cupcakes.” You would then separate and</p><p>categorize each element. Figure6-1 illustrates this tokenization.</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>107</p><p>All in all, kind of easy? Kind of.</p><p>After tokenization, there will be normalization of the text. This will entail</p><p>converting some of the text so as to make it easier for analysis, such as by</p><p>changing the case to upper or lower, removing punctuation, and eliminating</p><p>contractions.</p><p>But this can easily lead to some problems. Suppose we have a sentence that</p><p>has “A.I.” Should we get rid of the periods? And if so, will the computer know</p><p>what “A I” means?</p><p>Probably not.</p><p>Interestingly enough, even the case of words can have a major impact on the</p><p>meaning. Just look at the difference between “fed” and the “Fed.” The Fed is</p><p>often another name for the Federal Reserve. Or, in another case, let’s suppose</p><p>we have “us” and “US.” Are we talking about the United States here?</p><p>Here are some of the other issues:</p><p>• White Space Problem: This is where two or more words</p><p>should be one token because the words form a compound</p><p>phrase. Some examples include “New York” and “Silicon</p><p>Valley.”</p><p>• Scientif ic Words and Phrases: It’s common for such words</p><p>to have hyphens, parentheses, and Greek letters. If you</p><p>strip out these characters, the system may not be able to</p><p>understand the meanings of the words and phrases.</p><p>Figure 6-1. Example of sentence tokenization</p><p>Artificial Intelligence Basics</p><p>108</p><p>• Messy Text: Let’s face it, many documents have grammar</p><p>and spelling errors.</p><p>• Sentence Splitting: Words like “Mr.” or “Mrs.” can</p><p>prematurely end a sentence because of the period.</p><p>• Non-important Words: There are ones that really add little</p><p>or no meaning to a sentence, like “the,” “a,” and “an.” To</p><p>remove these, you can use a simple Stop Words filter.</p><p>As you can see, it can be easy to mis-parse sentences (and in some languages,</p><p>like Chinese and Japanese, things can get even more difficult with the syntax).</p><p>But this can have far-ranging consequences. Since tokenization is generally the</p><p>first step, a couple errors can cascade through the whole NLP process.</p><p>Stemming</p><p>Stemming describes the process of reducing a word to its root (or lemma),</p><p>such as by removing affixes and suffixes. This has actually been effective for</p><p>search engines, which involve the use of clustering to come up with more</p><p>relevant results. With stemming, it’s possible to find more matches as the</p><p>word has a broader meaning and even to handle such things as spelling errors.</p><p>And when using an AI application, it can help improve the overall understanding.</p><p>Figure 6-2 shows an example of stemming.</p><p>Figure 6-2. Example of stemming</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>109</p><p>There are a variety of algorithms to stem words, many of which are fairly</p><p>simple. But they have mixed results. According to IBM:</p><p>The Porter algorithm, for example, will state that ‘universal’ has the</p><p>same stem as ‘university’ and ‘universities,’</p><p>an observation that may have</p><p>historical basis but is no longer semantically relevant. The Porter</p><p>stemmer also does not recognize that ‘theater’ and ‘theatre’ should</p><p>belong to the same stem class. For reasons such as these, Watson</p><p>Explorer Engine does not use the Porter stemmer as its English stemmer.5</p><p>In fact, IBM has created its own proprietary stemmer, and it allows for</p><p>significant customization.</p><p>Lemmatization</p><p>Lemmatization is similar to stemming. But instead of removing affixes or</p><p>prefixes, there is a focus on finding similar root words. An example is “better,”</p><p>which we could lemmatize to “good.” This works so long as the meaning</p><p>remains mostly the same. In our example, both are roughly similar, but “good”</p><p>has a clearer meaning. Lemmatization also may work with providing better</p><p>searches or language understanding, especially with translations.</p><p>Figure 6-3 shows an example of lemmatization.</p><p>5 www.ibm.com/support/knowledgecenter/SS8NLW_11.0.1/com.ibm.swg.im.</p><p>infosphere.dataexpl.engine.doc/c_correcting_stemming_errors.html</p><p>Figure 6-3. Example of lemmatization</p><p>Artificial Intelligence Basics</p><p>http://www.ibm.com/support/knowledgecenter/SS8NLW_11.0.1/com.ibm.swg.im.infosphere.dataexpl.engine.doc/c_correcting_stemming_errors.html</p><p>http://www.ibm.com/support/knowledgecenter/SS8NLW_11.0.1/com.ibm.swg.im.infosphere.dataexpl.engine.doc/c_correcting_stemming_errors.html</p><p>110</p><p>To effectively use lemmatization, the NLP system must understand the</p><p>meanings of the words and the context. In other words, this process usually</p><p>has better performance than stemming. On the other hand, it also means that</p><p>the algorithms are more complicated and there are higher levels of computing</p><p>power required.</p><p>Step #2—Understanding andGenerating Language</p><p>Once the text has been put into a format that computers can process, then</p><p>the NLP system must understand the overall meaning. For the most part, this</p><p>is the hardest part.</p><p>But over the years, researchers have developed a myriad of techniques to help</p><p>out, such as the following:</p><p>• Tagging Parts of Speech (POS): This goes through the text</p><p>and designates each word into its proper grammatical</p><p>form, say nouns, verbs, adverbs, etc. Think of it like an</p><p>automated version of your grade school English class!</p><p>What’s more, some POS systems have variations. Note</p><p>that a noun has singular nouns (NN), singular proper</p><p>nouns (NNP), and plural nouns (NNS).</p><p>• Chunking: The words will then be analyzed in terms of</p><p>phrases. For example, a noun phrase (NP) is a noun that</p><p>acts as the subject or object to a verb.</p><p>• Named Entity Recognition: This is identifying words that</p><p>represent locations, persons, and organizations.</p><p>• Topic Modelling: This looks for hidden patterns and clusters</p><p>in the text. One of the algorithms, called Latent Dirichlet</p><p>Allocation (LDA), is based on unsupervised learning</p><p>approaches. That is, there will be random topics assigned,</p><p>and then the computer will iterate to find matches.</p><p>For many of these processes, we can use deep learning models. They can be</p><p>extended to more areas of analysis—to allow for seamless language</p><p>understanding and generation. This is a process known as distributional</p><p>semantics.</p><p>With a convolutional neural network (CNN), which we learned about in</p><p>Chapter 4, you can find clusters of words that are translated into a feature</p><p>map. This has allowed for applications like language translation, speech</p><p>recognition, sentiment analysis, and Q&A. In fact, the model can even do</p><p>things like detect sarcasm!</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>111</p><p>Yet there are some problems with CNNs. For example, the model has</p><p>difficulties with text that has dependencies across large distances. But there</p><p>are some ways to handle this, such as with time-delayed neural networks</p><p>(TDNN) and dynamic convolutional neural networks (DCNN). These</p><p>methods have shown high performance in handling sequenced data. Although,</p><p>the model that has shown more success with this is the recurrent neural</p><p>network (RNN), as it memorizes data.</p><p>So far, we have been focused mostly on text analysis. But for there to be</p><p>sophisticated NLP, we also must build voice recognition systems. We’ll take a</p><p>look at this in the next section.</p><p>Voice Recognition</p><p>In 1952, Bell Labs created the first voice recognition system, called Audrey</p><p>(for Automatic Digit Recognition). It was able to recognize phonemes, which</p><p>are the most basic units of sounds in a language. English, for example, has 44.</p><p>Audrey could recognize the sound of a digit, from zero to nine. It was accurate</p><p>for the voice of the machine’s creator, HK Davis, about 90% of the time.6 And</p><p>for anyone else, it was 70% to 80% or so.</p><p>Audrey was a major feat, especially in light of the limited computing power</p><p>and memory available at the time. But the program also highlighted the major</p><p>challenges with voice recognition. When we speak, our sentences can be</p><p>complex and somewhat jumbled. We also generally talk fast—an average of</p><p>150 words per minute.</p><p>As a result, voice recognition systems improved at a glacially slow pace. In</p><p>1962, IBM’s Shoebox system could recognize only 16 words, 10 digits, and 6</p><p>mathematical commands.</p><p>It was not until the 1980s that there was significant progress in the technology.</p><p>The key breakthrough was the use of the hidden Markov model (HMM), which</p><p>was based on sophisticated statistics. For example, if you say the word “dog,”</p><p>there will be an analysis of the individual sounds d, o, and g. The HMM</p><p>algorithm will assign a score to each of these. Over time, the system will get</p><p>better at understanding the sounds and translate them into words.</p><p>While HMM was critical, it still was unable to effectively handle continuous</p><p>speech. For example, voice systems were based on template matching. This</p><p>involved translating sound waves into numbers, which was done by sampling. The</p><p>result was that the software would measure the frequency of the intervals and</p><p>store the results. But there had to be a close match. Because of this, the voice</p><p>input had to be quite clear and slow. There also had to be little background noise.</p><p>6 www.bbc.com/future/story/20170214-the-machines-that-learned-to-listen</p><p>Artificial Intelligence Basics</p><p>http://www.bbc.com/future/story/20170214-the-machines-that-learned-to-listen</p><p>112</p><p>But by the 1990s, software developers would make strides and come out with</p><p>commercial systems, such as Dragon Dictate, which could understand</p><p>thousands of words in continuous speech. However, adoption was still not</p><p>mainstream. Many people still found it easier to type into their computers and</p><p>use the mouse. Yet there were some professions, like medicine (a popular use</p><p>case with transcribing diagnosis of patients), where speech recognition found</p><p>high levels of usage.</p><p>With the emergence of machine learning and deep learning, voice systems</p><p>have rapidly become much more sophisticated and accurate. Some of the key</p><p>algorithms involve the use of the long short-term memory (LSTM), recurrent</p><p>neural networks, and deep feed-forward neural networks. Google would go</p><p>on to implement these approaches in Google Voice, which was available to</p><p>hundreds of millions of smartphone users. And of course, we’ve seen great</p><p>progress with other offerings like Siri, Alexa, and Cortana.</p><p>NLP intheReal World</p><p>For the most part, we have gone through the main parts of the NLP workflow.</p><p>Next, let’s take a look at the powerful applications of this technology.</p><p>Use Case: Improving Sales</p><p>Roy Raanani, who has a career in working with tech startups, thought that the</p><p>countless conversions that occur every day in business are mostly ignored.</p><p>Perhaps AI could transform this into an opportunity?</p><p>In 2015, he founded Chorus to use NLP to divine insights from conversations</p><p>from sales people. Raanani called this the Conversation Cloud, which records,</p><p>organizes, and transcribes calls—which are entered in a CRM (Customer</p><p>Relationship Management) system. Over time, the algorithms will start to</p><p>learn about best practices</p><p>and indicate how things can be improved.</p><p>But pulling this off has not been easy. According to a Chorus blog:</p><p>There are billions of ways to ask questions, raise</p><p>objections, set action items, challenge hypotheses,</p><p>etc. all of which need to be identified if sales patterns</p><p>are to be codified. Second, signals and patterns evolve:</p><p>new competitors, product names and features, and</p><p>industry-related terminology change over time, and</p><p>machine-learned models quickly become obsolete.7</p><p>7 https://blog.chorus.ai/a-taste-of-chorus-s-secret-sauce-how-our-</p><p>system-teaches-itself</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>https://blog.chorus.ai/a-taste-of-chorus-s-secret-sauce-how-our-system-teaches-itself</p><p>https://blog.chorus.ai/a-taste-of-chorus-s-secret-sauce-how-our-system-teaches-itself</p><p>113</p><p>For example, one of the difficulties—which can be easily overlooked—is how</p><p>to identify the parties who are talking (there are often more than three on a</p><p>call). Known as “speaker separation,” it is considered even more difficult than</p><p>speech recognition. Chorus has created a deep learning model that essentially</p><p>creates a “voice fingerprint”—which is based on clustering—for each speaker.</p><p>So after several years of R&D, the company was able to develop a system that</p><p>could analyze large amounts of conversations.</p><p>As a testament to this, look at one of Chorus’ customers, Housecall Pro,</p><p>which is a startup that sells mobile technologies for field service management.</p><p>Before adopting the software, the company would often create personalized</p><p>sales pitches for each lead. But unfortunately, it was unscalable and had mixed</p><p>results.</p><p>But with Chorus, the company was able to create an approach that did not</p><p>have much variation. The software made it possible to measure every word</p><p>and the impact on the sales conversions. Chorus also measured whether a</p><p>sales rep was on-script or not.</p><p>The outcome? The company was able to increase the win rate of the sales</p><p>organization by 10%.8</p><p>Use Case: Fighting Depression</p><p>Across the world, about 300 million people suffer from depression, according</p><p>to data from the World Health Organization.9 About 15% of adults will</p><p>experience some type of depression during their life.</p><p>This may go undiagnosed because of lack of healthcare services, which can</p><p>mean that a person’s situation could get much worse. Unfortunately, the</p><p>depression can lead to other problems.</p><p>But NLP may be able to improve the situation. A recent study from Stanford</p><p>used a machine learning model that processed 3D facial expressions and the</p><p>spoken language. As a result, the system was able to diagnose depression with</p><p>an average error rate of 3.67 when using the Patient Health Questionnaire</p><p>(PHQ) scale. The accuracy was even higher for more aggravated forms of</p><p>depression.</p><p>In the study, the researchers noted: “This technology could be deployed to</p><p>cell phones worldwide and facilitate low-cost universal access to mental</p><p>health care.”10</p><p>8 www.chorus.ai/case-studies/housecall/</p><p>9 www.verywellmind.com/depression-statistics-everyone-should-know-4159056</p><p>10 “Measuring Depression Symptom Severity from Spoken Language and 3D Facial Expressions,”</p><p>A Haque, M Guo, AS Miner, L Fei-Fei, presented at the NeurIPS 2018 Workshop on</p><p>Machine Learning for Health (ML4H), https://arxiv.org/abs/1811.08592.</p><p>Artificial Intelligence Basics</p><p>http://www.chorus.ai/case-studies/housecall/</p><p>http://www.verywellmind.com/depression-statistics-everyone-should-know-4159056</p><p>https://arxiv.org/abs/1811.08592</p><p>114</p><p>Use Case: Content Creation</p><p>In 2015, several tech veterans like Elon Musk, Peter Thiel, Reid Hoffman, and</p><p>Sam Altman launched OpenAI, with the support of a whopping $1 billion in</p><p>funding. Structured as a nonprofit, the goal was to develop an organization</p><p>with the goal “to advance digital intelligence in the way that is most likely to</p><p>benefit humanity as a whole, unconstrained by a need to generate financial</p><p>return.”11</p><p>One of the areas of research has been on NLP.To this end, the company</p><p>launched a model called GPT-2 in 2019, which was based on a dataset of</p><p>roughly eight million web pages. The focus was to create a system that could</p><p>predict the next word based on a group of text.</p><p>To illustrate this, OpenAI provided an experiment with the following text as</p><p>the input: “In a shocking finding, scientist discovered a herd of unicorns living</p><p>in a remote, previously unexplored valley, in the Andes Mountains. Even more</p><p>surprising to the researchers was the fact that the unicorns spoke perfect</p><p>English.”</p><p>From this, the algorithms created a convincing story that was 377 words in</p><p>length!</p><p>Granted, the researchers admitted that the storytelling was better for topics</p><p>that related more to the underlying data, on topics like Lord of the Rings and</p><p>even Brexit. As should be no surprise, GPT-2 demonstrated poor performance</p><p>for technical domains.</p><p>But the model was able to score high on several well-known evaluations of</p><p>reading comprehension. See Table6-1.12</p><p>11 https://openai.com/blog/introducing-openai/</p><p>12 https://openai.com/blog/better-language-models/</p><p>Table 6-1. Reading comprehension results</p><p>DataSet Prior Record for Accuracy GPT-2’s Accuracy</p><p>Winograd Schema Challenge 63.7% 70.70%</p><p>LAMBADA 59.23% 63.24%</p><p>Children’s Book Test Common Nouns 85.7% 93.30%</p><p>Children’s Book Test Named Entities 82.3% 89.05%</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>https://openai.com/blog/introducing-openai/</p><p>https://openai.com/blog/better-language-models/</p><p>115</p><p>Even though a typical human would score 90%+ on these tests, the</p><p>performance of GPT-2 is still impressive. It’s important to note that the model</p><p>used Google’s neural network innovation, called a Transformer, and</p><p>unsupervised learning.</p><p>In keeping with OpenAI’s mission, the organization decided not to release the</p><p>complete model. The fear was that it could lead to adverse consequences like</p><p>fake news, spoofed Amazon.com reviews, spam, and phishing scams.</p><p>Use Case: Body Language</p><p>Just focusing on language itself can be limiting. Body language is also something</p><p>that should be included in a sophisticated AI model.</p><p>This is something that Rana el Kaliouby has been thinking about for some</p><p>time. While growing up in Egypt, she earned her master’s degree in science</p><p>from the American University in Cairo and then went on to get her PhD in</p><p>computer science at Newnham College of the University of Cambridge. But</p><p>there was something that was very compelling to her: How can computers</p><p>detect human emotions?</p><p>However, in her academic circles, there was little interest. The consensus</p><p>view in the computer science community was that this topic was really not</p><p>useful.</p><p>But Rana was undeterred and teamed up with noted professor Rosalind Picard</p><p>to create innovative machine learning models (she wrote a pivotal book, called</p><p>Affective Computing, which looked at emotions and machines).13 Yet there also</p><p>had to be the use of other domains like neuroscience and psychology. A big</p><p>part of this was leveraging the pioneering work of Paul Ekman, who did</p><p>extensive research on human emotions based on a person’s facial muscles. He</p><p>found that there were six universal human emotions (wrath, grossness,</p><p>scaredness, joy, loneliness, and shock) that could be coded by 46 movements</p><p>called action units—all becoming a part of the Facial Action Coding System,</p><p>or FACS.</p><p>While at the MIT Media Lab, Rana developed an “emotional hearing aid,”</p><p>which was a wearable that allowed those people with autism to better interact</p><p>in social environments.14 The system would detect the emotions of people</p><p>and provide appropriate ways to react.</p><p>13 Rosalind W.Picard, Affective Computing (MIT Press).</p><p>14 www.newyorker.com/magazine/2015/01/19/know-feel</p><p>Artificial Intelligence Basics</p><p>http://www.newyorker.com/magazine/2015/01/19/know-feel</p><p>116</p><p>It was groundbreaking as the New York Times named it as one of the most</p><p>consequential innovations in 2006. But Rana’s system also caught the attention</p><p>of Madison Avenue. Simply put, the technology</p><p>could be an effective tool to</p><p>gauge an audience’s mood about a television commercial.</p><p>Then a couple years later, Rana launched Affectiva. The company quickly</p><p>grew and attracted substantial amounts of venture capital (in all, it has raised</p><p>$54.2 million).</p><p>Rana, who was once ignored, had now become one of the leaders in a</p><p>trendcalled “emotion-tracking AI.”</p><p>The flagship product for Affectiva is Affdex, which is a cloud-based platform for</p><p>testing audiences for video. About a quarter of the Fortune Global 500 use it.</p><p>But the company has developed another product, called Affectiva Automotive</p><p>AI, which is an in-cabin sensing system for a vehicle. Some of the capabilities</p><p>include the following:</p><p>• Monitoring for driver fatigue or distraction, which will</p><p>trigger an alert (say a vibration of the seat belt).</p><p>• Providing for a handoff to a semi-autonomous system if</p><p>the driver is not waking or is angry. There is even an</p><p>ability to provide route alternatives to lessen the potential</p><p>for road rage!</p><p>• Personalizing the content—say music—based on the</p><p>passenger’s emotions.</p><p>For all of these offerings, there are advanced deep learning systems that</p><p>process enormous amounts of features of a database that has more than 7.5</p><p>million faces. These models also account for cultural influences and</p><p>demographic differences—which is all done in real-time.</p><p>Voice Commerce</p><p>NLP-driven technologies like virtual assistants, chatbots, and smart speakers</p><p>are poised to have powerful business models—and may even disrupt markets</p><p>like e-commerce and marketing. We have already seen an early version of this</p><p>with Tencent’s WeChat franchise. The company, which was founded during</p><p>the heyday of the Internet boom in the late 1990s, started with a simple</p><p>PC-based messenger product called OICQ.But it was the introduction of</p><p>WeChat that was a game changer, which has since become China’s largest</p><p>social media platform with over 1 billion monthly active users.15</p><p>15 www.wsj.com/articles/iphones-toughest-rival-in-china-is-wechat-</p><p>a-messaging-app-1501412406</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>http://www.wsj.com/articles/iphones-toughest-rival-in-china-is-wechat-a-messaging-app-1501412406</p><p>http://www.wsj.com/articles/iphones-toughest-rival-in-china-is-wechat-a-messaging-app-1501412406</p><p>117</p><p>But this app is more than for exchanging messages and posting content.</p><p>WeChat has quickly morphed into an all-purpose virtual assistant, where you</p><p>can easily hail a ride-sharing service, make a payment at a local retailer, place</p><p>a reservation for a flight, or play a game. For example, the app accounts for</p><p>close to 35% of the entire usage time on smartphones in China on a monthly</p><p>basis. WeChat is also a major reason that the country has become increasingly</p><p>a cash-less society.</p><p>All this points to the power of an emerging category called voice commerce</p><p>(or v-commerce), where you can make purchases via chat or voice. It’s such a</p><p>critical trend that Facebook’s Mark Zuckerberg wrote a blog post,16 in early</p><p>2019, where he said the company would become more like…WeChat.</p><p>According to research from Juniper, the market for voice commerce is</p><p>forecasted to hit a whopping $80 billion by 2023.17 But in terms of the winners</p><p>in this market, it seems like a good bet that it will be those companies that</p><p>have large install bases of smart devices like Amazon, Apple, and Google. But</p><p>there will still be room for providers of next-generation NLP technologies.</p><p>OK then, how might these AI systems impact the marketing industry? Well,</p><p>to see how, there was an article in the Harvard Business Review, called</p><p>“Marketing in the Age of Alexa” by Niraj Dawar and Neil Bendle. In it, the</p><p>authors note that “AI assistants will transform how companies connect with</p><p>their customers. They’ll become the primary channel through which people</p><p>get information, goods and services, and marketing will turn into the batter</p><p>for their attention.”18</p><p>Thus, the growth in chatbots, digital assistants, and smart speakers could be</p><p>much bigger than the initial web-based e-commerce revolution. These</p><p>technologies have significant benefits for customers, such as convenience. It’s</p><p>easy to tell a device to buy something, and the machine will also learn about</p><p>your habits. So the next time you say you want to have a soft drink, the</p><p>computer will know what you are referring to.</p><p>But this may lead to a winners-take-all scenario. Ultimately, it seems like</p><p>consumers will use only one smart device for their shopping. In addition, for</p><p>brands that want to sell their goods, there will be a need to deeply understand</p><p>what customers really want, so as to become the preferred vendor within the</p><p>recommendation engine.</p><p>16 www.facebook.com/notes/mark-zuckerberg/a-privacy-focused-vision-</p><p>for-social-networking/10156700570096634/</p><p>17 https://voicebot.ai/2019/02/19/juniper-forecasts-80-billion-in-voice-</p><p>commerce-in-2023-or-10-per-assistant/</p><p>18 https://hbr.org/2018/05/marketing-in-the-age-of-alexa</p><p>Artificial Intelligence Basics</p><p>http://www.facebook.com/notes/mark-zuckerberg/a-privacy-focused-vision-for-social-networking/10156700570096634/</p><p>http://www.facebook.com/notes/mark-zuckerberg/a-privacy-focused-vision-for-social-networking/10156700570096634/</p><p>https://voicebot.ai/2019/02/19/juniper-forecasts-80-billion-in-voice-commerce-in-2023-or-10-per-assistant/</p><p>https://voicebot.ai/2019/02/19/juniper-forecasts-80-billion-in-voice-commerce-in-2023-or-10-per-assistant/</p><p>https://hbr.org/2018/05/marketing-in-the-age-of-alexa</p><p>118</p><p>Virtual Assistants</p><p>In 2003, as the United States was embroiled in wars in the Middle East, the</p><p>Defense Department was looking to invest in next-generation technologies</p><p>for the battlefield. One of the key initiatives was to build a sophisticated</p><p>virtual assistant, which could recognize spoken instructions. The Defense</p><p>Department budgeted $150 million for this and tasked the SRI (Stanford</p><p>Research Institute) Lab—based in Silicon Valley—to develop the application.19</p><p>Even though the lab was a nonprofit, it still was allowed to license its</p><p>technologies (like the inkjet printer) to startups.</p><p>And this is what happened with the virtual assistant. Some of the members of</p><p>SRI—Dag Kittlaus, Tom Gruber, and Adam Cheyer—called it Siri and started</p><p>their own company to capitalize on the opportunity. They founded the</p><p>operation in 2007, which was when Apple’s iPhone was launched.</p><p>But there had to be much more R&D to get the product to the point where</p><p>it could be useful for consumers. The founders had to develop a system to</p><p>handle real-time data, build a search engine for geographic information, and</p><p>build security for credit cards and personal data. But it was NLP that was the</p><p>toughest challenge.</p><p>In an interview, Cheyer noted:</p><p>The hardest technical challenge with Siri was dealing with the massive</p><p>amounts of ambiguity present in human language. Consider the phrase</p><p>‘book 4-star restaurant in Boston’ — seems very straightforward to</p><p>understand. Our prototype system could handle this easily. However,</p><p>when we loaded in tens of millions of business names and hundreds of</p><p>thousands of cities into the system as vocabulary (just about every word</p><p>in the English language is a business name), the number of candidate</p><p>interpretations went through the roof.20</p><p>But the team was able to solve the problems and turn Siri into a powerful</p><p>system, which was launched on Apple’s App Store in February 2010. “It’s the</p><p>most sophisticated voice recognition to appear on a smartphone yet,”</p><p>according to a review in Wired.com.21</p><p>Steve Jobs took notice and called the founders. Within a few days, they would</p><p>meet, and the discussions quickly led to an acquisition, which happened in late</p><p>April for more than $200 million.</p><p>However, Jobs thought there needed to be improvements to Siri. Because of</p><p>this, there was a re-release in 2011. This actually happened a day before Jobs</p><p>died.</p><p>19 www.huffingtonpost.com/2013/01/22/siri-do-engine-apple-iphone_n_</p><p>2499165.html</p><p>20 https://medium.com/swlh/the-story-behind-siri-fbeb109938b0</p><p>21 www.wired.com/2010/02/siri-voice-recognition-iphone/</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>http://www.huffingtonpost.com/2013/01/22/siri-do-engine-apple-iphone_n_2499165.html</p><p>http://www.huffingtonpost.com/2013/01/22/siri-do-engine-apple-iphone_n_2499165.html</p><p>https://medium.com/swlh/the-story-behind-siri-fbeb109938b0</p><p>http://www.wired.com/2010/02/siri-voice-recognition-iphone/</p><p>119</p><p>Fast forward to today, Siri has the largest market share position in the virtual</p><p>assistant market, with 48.6%. Google Assistant is at 28.7%, and Amazon.com’s</p><p>Alexa has 13.2%.22</p><p>According to the “Voice Assistant Consumer Adoption Report,” about 146.6</p><p>million people in the United States have tried virtual assistants on their</p><p>smartphones and over 50 million with smart speakers. But this only covers</p><p>part of the story. Voice technology is also becoming embedded into wearables,</p><p>headphones, and appliances.23</p><p>Here are some other interesting findings:</p><p>• Using voice to search for products outranked searches</p><p>for various entertainment options.</p><p>• When it comes to productivity, the most common use</p><p>cases for voice include making calls, sending emails, and</p><p>setting alarms.</p><p>• The most common use of voice on smartphones occurs</p><p>when a person is driving.</p><p>• Regarding complaints with voice assistants on</p><p>smartphones, the one with the highest percentage was</p><p>inconsistency in understanding requests. Again, this</p><p>points to the continuing challenges of NLP.</p><p>The growth potential for virtual assistants remains bright, and the category is</p><p>likely to be a key for the AI industry. Juniper Research forecasts that the</p><p>number of virtual assistants in use on a global basis will more than triple to</p><p>2.5 billion by 2023.24 The fastest category is actually expected to be smart</p><p>TVs. Yes, I guess we’ll be holding conversations with these devices!</p><p>Chatbots</p><p>There is often confusion between the differences between virtual assistants</p><p>and chatbots. Keep in mind that there is much overlap between the two. Both</p><p>use NLP to interpret language and perform tasks.</p><p>But there are still critical distinctions. For the most part, chatbots are focused</p><p>primarily for businesses, such as for customer support or sales functions.</p><p>22 www.businessinsider.com/siri-google-assistant-voice-market-</p><p>share-charts-2018-6</p><p>23 https://voicebot.ai/wp-content/uploads/2018/11/voice-assistant-consumer-</p><p>adoption-report-2018-voicebot.pdf</p><p>24 https://techcrunch.com/2019/02/12/report-voice-assistants-in-use-to-</p><p>triple-to-8-billion-by-2023/</p><p>Artificial Intelligence Basics</p><p>http://www.businessinsider.com/siri-google-assistant-voice-market-share-charts-2018-6</p><p>http://www.businessinsider.com/siri-google-assistant-voice-market-share-charts-2018-6</p><p>https://voicebot.ai/wp-content/uploads/2018/11/voice-assistant-consumer-adoption-report-2018-voicebot.pdf</p><p>https://voicebot.ai/wp-content/uploads/2018/11/voice-assistant-consumer-adoption-report-2018-voicebot.pdf</p><p>https://techcrunch.com/2019/02/12/report-voice-assistants-in-use-to-triple-to-8-billion-by-2023/</p><p>https://techcrunch.com/2019/02/12/report-voice-assistants-in-use-to-triple-to-8-billion-by-2023/</p><p>120</p><p>Virtual assistants, on the other hand, are geared for essentially everyone to</p><p>help with their daily activities.</p><p>As we saw in Chapter 1, the origins of chatbots go back to the 1960s with the</p><p>development of ELIZA.But it was not until the past decade or so that this</p><p>technology became useable at scale.</p><p>Here’s a sampling of interesting chatbots:</p><p>• Ushur: This is integrated in the enterprise systems for</p><p>insurance companies, allowing for the automation of</p><p>claims/bill processing and sales enablement. The software</p><p>has shown, on average, a reduction of 30% in service</p><p>center call volumes and a 90% customer response rate.25</p><p>The company built its own state-of-the-art linguistics</p><p>engine called LISA (this stands for Language Intelligence</p><p>Services Architecture). LISA includes NLP, NLU,</p><p>sentiment analysis, sarcasm detection, topic detection,</p><p>data extraction, and language translations. The technology</p><p>currently supports 60 languages, making it a useful</p><p>platform for global organizations.</p><p>• Mya: This is a chatbot that can engage in conversations in</p><p>the recruiting process. Like Ushur, this is also based on a</p><p>home-grown NLP technology. Some of the reasons for</p><p>this include having better communications but also</p><p>handling specific topics for hiring.26 Mya greatly reduces</p><p>time to interview and time to hire by eliminating major</p><p>bottlenecks.</p><p>• Jane.ai: This is a platform that mines data across an</p><p>organization’s applications and databases—say Salesforce.</p><p>com, Office, Slack, and Gmail—in order to make it much</p><p>easier to get answers, which are personalized. Note that</p><p>about 35% of an employee’s time is spent just trying to</p><p>find information! For example, a use case of Jane.ai is</p><p>USA Mortgage. The company used the technology, which</p><p>was integrated into Slack, to help brokers to look up</p><p>information for mortgage processing. The result is that</p><p>USA Mortgage has saved about 1,000 human labor hours</p><p>per month.27</p><p>25 The information came from the author’s interview with the CEO and co-founder of</p><p>Ushur, Simha Sadasiva.</p><p>26 The information came from the author’s interview with the CEO and co-founder of</p><p>Mya, Eyal Grayevsky.</p><p>27 The information came from the author’s interview with the CEO and co-founder of</p><p>Jane.ai, David Karandish.</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>121</p><p>Despite all this, chatbots have still had mixed results. For example, just</p><p>one of the problems is that it is difficult to program systems for specialized</p><p>domains.</p><p>Take a look at a study from UserTesting, which was based on the responses</p><p>from 500 consumers of healthcare chatbots. Some of the main takeaways</p><p>included: there remains lots of anxiety with chatbots, especially when handling</p><p>personal information, and the technology has problems with understanding</p><p>complex topics.28</p><p>So before deploying a chatbot, there are some factors to consider:</p><p>• Set Expectations: Do not overpromise with the capabilities</p><p>with chatbots. This will only set up your organization for</p><p>disappointment. For example, you should not pretend</p><p>that the chatbot is a human. This is a surefire way to</p><p>create bad experiences. As a result, you might want to</p><p>start off a chatbot conversation with “Hi, I’m a chatbot</p><p>here to help you with…”</p><p>• Automation: In some cases, a chatbot can handle the</p><p>whole process with a customer. But you should still have</p><p>people in the loop. “The goal for chatbots is not to</p><p>replace humans entirely, but to be the first line of defense,</p><p>so to speak,” said Antonio Cangiano, who is an AI</p><p>evangelist at IBM. “This can mean not only saving</p><p>companies money but also freeing up human agents</p><p>who’ll be able to spend more time on complex inquiries</p><p>that are escalated to them.”29</p><p>• Friction: As much as possible, try to find ways for the</p><p>chatbot to solve problems as quickly as possible. And this</p><p>may not necessarily be using a conversation. Instead,</p><p>providing a simple form to fill out could be a better</p><p>alternative, say to schedule a demo.</p><p>• Repetitive Processes: These are often ideal for chatbots.</p><p>Examples include authentication, order status, scheduling,</p><p>and simple change requests.</p><p>• Centralization: Make sure you integrate the data with your</p><p>chatbots. This will allow for more seamless experiences.</p><p>No doubt, customers quickly get annoyed if they have to</p><p>repeat information.</p><p>28 www.forbes.com/sites/bernardmarr/2019/02/11/7-amazing-examples-of-online-</p><p>chatbots-and-virtual-digital-assistants-in-practice/#32bb1084533e</p><p>29 This is from the author’s interview with Antonio Cangiano, who is an AI evangelist at IBM.</p><p>Artificial Intelligence Basics</p><p>http://www.forbes.com/sites/bernardmarr/2019/02/11/7-amazing-examples-of-online-chatbots-and-virtual-digital-assistants-in-practice/#32bb1084533e</p><p>http://www.forbes.com/sites/bernardmarr/2019/02/11/7-amazing-examples-of-online-chatbots-and-virtual-digital-assistants-in-practice/#32bb1084533e</p><p>122</p><p>• Personalize the</p><p>Experience: This is not easy but can yield</p><p>major benefits. Jonathan Taylor, who is the CTO of</p><p>Zoovu, has this example: “Purchasing a camera lens will</p><p>be different for every shopper. There are many variations</p><p>of lenses that perhaps a slightly informed shopper</p><p>understands—but the average consumer may not be as</p><p>informed. Providing an assistive chatbot to guide a</p><p>customer to the right lens can help provide the same</p><p>level of customer service as an in-store employee. The</p><p>assistive chatbot can ask the right questions, understanding</p><p>the goal of the customer to provide a personalized</p><p>product recommendation including ‘what kind of camera</p><p>do you already have,’ ‘why are you buying a new camera,’</p><p>and ‘what are you primarily trying to capture in your</p><p>photographs?’”30</p><p>• Data Analytics: It’s critical to monitor the feedback with a</p><p>chatbot. What’s the satisfaction? What’s the accuracy rate?</p><p>• Conversational Design and User Experience (UX): It’s</p><p>different than creating a web site or even a mobile app.</p><p>With a chatbot, you need to think about the user’s</p><p>personality, gender, and even cultural context. Moreover,</p><p>you must consider the “voice” of your company. “Rather</p><p>than creating mockups of a visual interface, think about</p><p>writing scripts and playing them out before to build it,”</p><p>said Gillian McCann, who is head of Cloud Engineering</p><p>and Artificial Intelligence at Workgrid Software.31</p><p>Even with the issues with chatbots, the technology is continuing to improve.</p><p>More importantly, these systems are likely to become an increasingly important</p><p>part of the AI industry. According to IDC, about $4.5 billion will be spent on</p><p>chatbots in 2019—which compares to a total of $35.8 billion estimated for AI</p><p>systems.32</p><p>Something else: A study from Juniper Research indicates that the cost savings</p><p>from chatbots are likely to be substantial. The firm predicts they will reach</p><p>$7.3 billion by 2023, up from a mere $209 million in 2019.33</p><p>30 This is from the author’s interview with Jonathan Taylor, who is the CTO of Zoovu.</p><p>31 This is from the author’s interview with Gillian McCann, who is the head of Cloud</p><p>Engineering and Artificial Intelligence at Workgrid Software.</p><p>32 www.twice.com/retailing/artificial-intelligence-retail-chatbots-</p><p>idc-spending</p><p>33 www.juniperresearch.com/press/press-releases/bank-cost-</p><p>savings-via-chatbots-to-reach</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>http://www.twice.com/retailing/artificial-intelligence-retail-chatbots-idc-spending</p><p>http://www.twice.com/retailing/artificial-intelligence-retail-chatbots-idc-spending</p><p>http://www.juniperresearch.com/press/press-releases/bank-cost-savings-via-chatbots-to-reach</p><p>http://www.juniperresearch.com/press/press-releases/bank-cost-savings-via-chatbots-to-reach</p><p>123</p><p>Future ofNLP</p><p>In 1947, Boris Katz was born in Moldova, which was part of the Soviet Union.</p><p>He would go on to graduate from Moscow State University, where he learned</p><p>about computers, and then left the country to the United States (with the</p><p>assistance of Senator Edward Kennedy).</p><p>He wasted little time with the opportunity. Besides writing more than 80</p><p>technical publications and receiving two US patents, he created the START</p><p>system that allowed for sophisticated NLP capabilities. It was actually the</p><p>basis for the first Q&A site on the Web in 1993. Yes, this was the forerunner</p><p>to breakout companies like Yahoo! and Google.</p><p>Boris’s innovations were also critical for IBM’s Watson, which is now at the</p><p>core of the company’s AI efforts. This computer, in 2011, would shock the</p><p>world when it beat two of the all-time champions of the popular game show</p><p>Jeopardy!</p><p>Despite all the progress with NLP, Boris is not satisfied. He believes we are</p><p>still in the early stages and lots more must be done to get true value. In an</p><p>interview with the MIT Technology Review, he said: “But on the other hand,</p><p>these programs [like Siri and Alexa] are so incredibly stupid. So there’s a</p><p>feeling of being proud and being almost embarrassed. You launch something</p><p>that people feel is intelligent, but it’s not even close.”34</p><p>This is not to imply he’s a pessimist. However, he still thinks there needs to</p><p>be a rethinking of NLP if it is to get to the point of “real intelligence.” To this</p><p>end, he believes researchers must look beyond pure computer science to</p><p>broad areas like neuroscience, cognitive science, and psychology. He also</p><p>thinks NLP systems must do a much better job of understanding the actions</p><p>in the real world.</p><p>Conclusion</p><p>For many people, the first interaction with NLP is with virtual assistants. Even</p><p>while the technology is far from perfect, it still is quite useful—especially for</p><p>answering questions or getting information, say about a nearby restaurant.</p><p>But NLP is also having a major impact in the business world. In the years</p><p>ahead, the technology will become increasingly important for e-commerce</p><p>and customer service—providing significant cost savings and allowing</p><p>employees to focus on more value-added activities.</p><p>34 www.technologyreview.com/s/612826/virtual-assistants-thinks-theyre-</p><p>doomed-without-a-new-ai-approach/</p><p>Artificial Intelligence Basics</p><p>https://www.technologyreview.com/s/612826/virtual-assistants-thinks-theyre-doomed-without-a-new-ai-approach/</p><p>https://www.technologyreview.com/s/612826/virtual-assistants-thinks-theyre-doomed-without-a-new-ai-approach/</p><p>124</p><p>True, there is still a long way to go because of the complexities of language.</p><p>But the progress continues to be rapid, especially with the help of next-</p><p>generation AI approaches like deep learning.</p><p>Key Takeaways</p><p>• Natural Language Processing (NLP) is the use of AI to</p><p>allow computers to understand people.</p><p>• A chatbot is an AI system that communicates with</p><p>people, say by voice or online chat.</p><p>• While there have been great strides in NLP, there is much</p><p>work to be done. Just some of the challenges include</p><p>ambiguity of language, nonverbal cues, different dialects</p><p>and accents, and changes to the language.</p><p>• The two main steps with NLP include cleaning/</p><p>preprocessing the text and using AI to understand and</p><p>generate language.</p><p>• Tokenization is where text is parsed and segmented into</p><p>various parts.</p><p>• With normalization, text is converted into a form that</p><p>makes it easier for analysis, such as by removing</p><p>punctuation or contractions.</p><p>• Stemming describes the process of reducing a word to its</p><p>root (or lemma), such as by removing affixes and suffixes.</p><p>• Similar to stemming, lemmatization involves finding</p><p>similar root words.</p><p>• For NLP to understand language, there are a variety of</p><p>approaches like tagging parts of speech (putting the text</p><p>in the grammatical form), chunking (processing text in</p><p>phrases), and topic modelling (finding hidden patterns</p><p>and clusters).</p><p>• A phoneme is the most basic unit of sound in a language.</p><p>Chapter 6 | Natural Language Processing (NLP)</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_7</p><p>C H A P T E R</p><p>7</p><p>Physical Robots</p><p>The Ultimate Manifestation of AI</p><p>In the city of Pasadena, I went to CaliBurger for lunch and noticed a crowd of</p><p>people next to the area where the food was being cooked—which was behind</p><p>glass. The people were taking photos with their smartphones!</p><p>Why? The reason was Flippy, an AI-powered robot that can cook burgers.</p><p>I was there at the restaurant with David Zito, the CEO and co-founder of the</p><p>company Miso Robotics that built the system. “Flippy helps improve the</p><p>quality of the food because of the consistency and reduces production costs,”</p><p>he said. “We also built the robot to be in strict compliance with regulatory</p><p>standards.”1</p><p>After lunch, I walked over to the lab for Miso Robotics, which included a</p><p>testing center with sample robots. It was here that I saw the convergence of</p><p>software AI systems and physical robots. The engineers were building Flippy’s</p><p>brain, which was uploaded to the cloud. Just some of the capabilities included</p><p>washing down utensils and the grill, learning to adapt</p><p>to problems with</p><p>cooking, switching between a spatula for raw meat and one for cooked meat,</p><p>and placing baskets in the fryer. All this was being done in real-time.</p><p>But the food service industry is just one of the many areas that will be greatly</p><p>impacted by robotics and AI.</p><p>1 This is based on the author’s interview, in January 2019, with David Zito, who is the CEO</p><p>and co-founder of Miso Robotics.</p><p>126</p><p>According to International Data Corporation (IDC), the spending on robotics</p><p>and drones is forecasted to go from $115.7 billion in 2019 to $210.3 billion</p><p>by 2022.2 This represents a compound annual growth rate of 20.2%. About</p><p>two thirds of the spending will be for hardware systems.</p><p>In this chapter, we’ll take a look at physical robots and how AI will transform</p><p>the industry.</p><p>What Is aRobot?</p><p>The origins of the word “robot” go back to 1921in a play by Karel Capek</p><p>called Rossum’s Universal Robots. It’s about a factory that created robots from</p><p>organic matter, and yes, they were hostile! They would eventually join together</p><p>to rebel against their human masters (consider that “robot” comes from the</p><p>Czech word robata for forced labor).</p><p>But as of today, what is a good definition for this type of system? Keep in mind</p><p>that there are many variations, as robots can have a myriad of forms and</p><p>functions.</p><p>But we can boil them down into a few key parts:</p><p>• Physical: A robot can range in size, from tiny machines</p><p>that can explore our body to massive industrial systems</p><p>to flying machines to underwater vessels. There also</p><p>needs to be some type of energy source, like a battery,</p><p>electricity, or solar.</p><p>• Act: Simply enough, a robot must be able to take certain</p><p>actions. This could include moving an item or even talking.</p><p>• Sense: In order to act, a robot must understand its</p><p>environment. This is possible with sensors and feedback</p><p>systems.</p><p>• Intelligence: This does not mean full-on AI capabilities. Yet a</p><p>robot needs to be able to be programmed to take actions.</p><p>Nowadays it’s not too difficult to create a robot from scratch. For example,</p><p>RobotShop.com has hundreds of kits that range from under $10 to as much</p><p>as $35,750.00 (this is the Dr. Robot Jaguar V6 Tracked Mobile Platform).</p><p>A heart-warming story of the ingenuity of building robots concerns a 2-year</p><p>old, Cillian Jackson. He was born with a rare genetic condition that rendered</p><p>him immobile. His parents tried to get reimbursement for a special electric</p><p>wheelchair but were denied.</p><p>2 www.idc.com/getdoc.jsp?containerId=prUS44505618</p><p>Chapter 7 | Physical Robots</p><p>http://www.idc.com/getdoc.jsp?containerId=prUS44505618</p><p>127</p><p>Well, the students at Farmington High School took action and built a system</p><p>for Cillian.3 Essentially, it was a robot wheelchair, and it took only a month</p><p>to finish. Because of this, Cillian can now chase around his two corgis around</p><p>the house!</p><p>While above we looked at the features of robots, there are key interactions</p><p>to consider too:</p><p>• Sensors: The typical sensor is a camera or a Lidar (light</p><p>detection and ranging), which uses a laser scanner to</p><p>create 3D images. But robots might also have systems for</p><p>sound, touch, taste, and even smell. In fact, they could</p><p>also include sensors that go beyond human capabilities,</p><p>such as night vision or detecting chemicals. The</p><p>information from the sensors is sent to a controller that</p><p>can activate an arm or other parts of the robot.</p><p>• Actuators: These are electro-mechanical devices like</p><p>motors. For the most part, they help with the movement</p><p>of the arms, legs, head, and any other movable part.</p><p>• Computer: There are memory storage and processors to</p><p>help with the inputs from the sensors. In advanced robots,</p><p>there may also be AI chips or Internet connections to AI</p><p>cloud platforms.</p><p>Figure 7-1 shows the interactions of these functions.</p><p>3 www.nytimes.com/2019/04/03/us/robotics-wheelchair.html</p><p>Figure 7-1. The general system for a physical robot</p><p>Artificial Intelligence Basics</p><p>http://www.nytimes.com/2019/04/03/us/robotics-wheelchair.html</p><p>128</p><p>There are also two main ways to operate a robot. First of all, there is remote</p><p>control by a human operation. In this case, the robot is called a telerobot.</p><p>Then there is the autonomous robot, which uses its own abilities to navigate—</p><p>such as with AI.</p><p>So what was the first mobile, thinking robot? It was Shakey. The name was</p><p>apt, as the project manager of the system, Charles Rosen, noted: “We worked</p><p>for a month trying to find a good name for it, ranging from Greek names to</p><p>whatnot, and then one of us said, ‘Hey, it shakes like hell and moves around,</p><p>let’s just call it Shakey.’”4</p><p>The Stanford Research Institute (SRI), with funding from DARPA, worked on</p><p>Shakey from 1966 to 1972. And it was quite sophisticated for the era. Shakey</p><p>was large, at over five feet tall, and had wheels to move and sensors and</p><p>cameras to help with touching. It was also wirelessly connected to DEC PDP-</p><p>10 and PDP-15 computers. From here, a person could enter commands via</p><p>teletype. Although, Shakey used algorithms to navigate its environment, even</p><p>closing doors.</p><p>The development of the robot was the result of a myriad of AI breakthroughs.</p><p>For example, Nils Nilsson and Richard Fikes created STRIPS (Stanford</p><p>Research Institute Problem Solver), which allowed for automated planning as</p><p>well as the A∗ algorithm for finding the shortest path with the least amount</p><p>of computer resources.5</p><p>By the late 1960s, as America was focused on the space program, Shakey got</p><p>quite a bit of buzz. A flattering piece in Life declared that the robot was the</p><p>“first electronic person.”6</p><p>But unfortunately, in 1972, as the AI winter took hold, DARPA pulled the</p><p>funding on Shakey. Yet the robot would still remain a key part of tech history</p><p>and was inducted into the Robot Hall of Fame in 2004.7</p><p>Industrial andCommercial Robots</p><p>The first real-world use of robots had to do with manufacturing industries.</p><p>But these systems did take quite a while to get adoption.</p><p>4 www.computerhistory.org/revolution/artificial-intelligence-robotics/</p><p>13/289</p><p>5 https://spectrum.ieee.org/view-from-the-valley/tech-history/space-age/</p><p>sri-shakey-robot-honored-as-ieee-milestone</p><p>6 www.sri.com/work/timeline-innovation/timeline.php?timeline=computing-</p><p>digital#!&innovation=shakey-the-robot</p><p>7 www.wired.com/2013/09/tech-time-warp-shakey-robot/</p><p>Chapter 7 | Physical Robots</p><p>http://www.computerhistory.org/revolution/artificial-intelligence-robotics/13/289</p><p>http://www.computerhistory.org/revolution/artificial-intelligence-robotics/13/289</p><p>https://spectrum.ieee.org/view-from-the-valley/tech-history/space-age/sri-shakey-robot-honored-as-ieee-milestone</p><p>https://spectrum.ieee.org/view-from-the-valley/tech-history/space-age/sri-shakey-robot-honored-as-ieee-milestone</p><p>http://www.sri.com/work/timeline-innovation/timeline.php?timeline=computing-digital#!&innovation=shakey-the-robot</p><p>http://www.sri.com/work/timeline-innovation/timeline.php?timeline=computing-digital#!&innovation=shakey-the-robot</p><p>http://www.wired.com/2013/09/tech-time-warp-shakey-robot/</p><p>129</p><p>The story begins with George Devol, an inventor who did not finish high</p><p>school. But this was not a problem. Devol had a knack for engineering and</p><p>creativity, as he would go on to create some of the core systems for microwave</p><p>ovens, barcodes, and automatic doors (during his life, he would obtain over</p><p>40 patents).</p><p>It was during the early 1950s that he also received a patent on a programmable</p><p>robot called “Unimate.” He struggled to get interest in his idea as every</p><p>investor turned him down.</p><p>However, in 1957, his life would change forever when he met Joseph</p><p>Engelberger at a cocktail party. Think of it like when Steve Jobs met Steve</p><p>Wozniak to create the Apple computer.</p><p>Engelberger was an engineer but also a savvy businessman. He even had a love</p><p>for reading science fiction, such as Isaac Asimov’s stories. Because of this,</p><p>Engelberger wanted the Unimate to benefit society.</p><p>Yet there was still resistance—as many people thought the idea was unrealistic</p><p>and,</p><p>well, science fiction—and it took a year to get funding. But once</p><p>Engelberger did, he wasted little time in building the robot and was able to sell</p><p>it to General Motors (GM) in 1961. Unimate was bulky (weighing 2,700</p><p>pounds) and had one 7-foot arm, but it was still quite useful and also meant</p><p>that people would not have to do inherently dangerous activities. Some of its</p><p>core functions included welding, spraying, and gripping—all done accurately</p><p>and on a 24/7 basis.</p><p>Engelberger looked for creative ways to evangelize his robot. To this end, he</p><p>appeared on Johnny Carson’s The Tonight Show in 1966, in which Unimate</p><p>putted a golf ball perfectly and even poured beer. Johnny quipped that the</p><p>machine could “replace someone’s job.”8</p><p>But industrial robots did have their nagging issues. Interestingly enough, GM</p><p>learned this the hard way during the 1980s. At the time, CEO Roger Smith</p><p>promoted the vision of a “lights out” factory—that is, where robots could</p><p>build cars in the dark!</p><p>He went on to shell out a whopping $90 billion on the program and even</p><p>created a joint venture, with Fujitsu-Fanuc, called GMF Robotics. The</p><p>organization would become the world’s largest manufacturer of robots.</p><p>But unfortunately, the venture turned out to be a disaster. Besides aggravating</p><p>unions, the robots often failed to live up to expectations. Just some of the</p><p>fiascos included robots that welded doors shut or painted themselves—not</p><p>the cars!</p><p>8 www.theatlantic.com/technology/archive/2011/08/unimate-robot-on-johnny-</p><p>carsons-tonight-show-1966/469779/</p><p>Artificial Intelligence Basics</p><p>http://www.theatlantic.com/technology/archive/2011/08/unimate-robot-on-johnny-carsons-tonight-show-1966/469779/</p><p>http://www.theatlantic.com/technology/archive/2011/08/unimate-robot-on-johnny-carsons-tonight-show-1966/469779/</p><p>130</p><p>However, the situation of GMF is nothing really new—and it’s not necessarily</p><p>about misguided senior managers. Take alook at Tesla, which is one of the</p><p>world’s most innovative companies. But CEO Elon Musk still suffered major</p><p>issues with robots on his factory floors. The problems got so bad that Tesla’s</p><p>existence was jeopardized.</p><p>In an interview on CBS This Morning in April 2018, Musk said he used too many</p><p>robots when manufacturing the Model 3 and this actually slowed down the</p><p>process.9 He noted that he should have had more people involved.</p><p>All this points to what Hans Moravec once wrote: “It is comparatively easy to</p><p>make computers exhibit adult level performance on intelligence tests or</p><p>playing checkers, and difficult or impossible to give them the skills of a one-</p><p>year-old when it comes to perception and mobility.”10 This is often called the</p><p>Moravec paradox.</p><p>Regardless of all this, industrial robots have become a massive industry,</p><p>expanding across diverse segments like consumer goods, biotechnology/</p><p>healthcare, and plastics. As of 2018, there were 35,880 industrial and</p><p>commercial robots shipped in North America, according to data from the</p><p>Robotic Industries Association (RIA).11 For example, the auto industry</p><p>accounted for about 53%, but this has been declining.</p><p>Jeff Burnstein, president of the Association for Advancing Automation, had</p><p>this to say:</p><p>And as we’ve heard from our members and at shows such as Automate,</p><p>these sales and shipments aren’t just to large, multinational companies</p><p>anymore. Small and medium-sized companies are using robots to solve</p><p>real-world challenges, which is helping them be more competitive on a</p><p>global scale.12</p><p>At the same time, the costs of manufacturing industrial robots continue to</p><p>drop. Based on research from ARK, there will be a 65% reduction by 2025—</p><p>with devices averaging less than $11,000 each.13 The analysis is based on</p><p>Wright’s Law, which states that for every cumulative doubling in the number</p><p>of units produced, there is a consistent decline in costs in percentage terms.</p><p>OK then, what about AI and robots? Where is that status of the technology?</p><p>Even with the breakthroughs with deep learning, there has generally been</p><p>slow progress with using AI with robots. Part of this is due to the fact that</p><p>much of the research has been focused on software-based models, such as</p><p>9 www.theverge.com/2018/4/13/17234296/tesla-model-3-robots-production-</p><p>hell-elon-musk</p><p>10 www.graphcore.ai/posts/is-moravecs-paradox-still-relevant-for-ai-today</p><p>11 www.apnews.com/b399fa71204d47199fdf4c753102e6c7</p><p>12 www.apnews.com/b399fa71204d47199fdf4c753102e6c7</p><p>13 https://ark-invest.com/research/industrial-robot-costs</p><p>Chapter 7 | Physical Robots</p><p>http://www.theverge.com/2018/4/13/17234296/tesla-model-3-robots-production-hell-elon-musk</p><p>http://www.theverge.com/2018/4/13/17234296/tesla-model-3-robots-production-hell-elon-musk</p><p>http://www.graphcore.ai/posts/is-moravecs-paradox-still-relevant-for-ai-today</p><p>http://www.apnews.com/b399fa71204d47199fdf4c753102e6c7</p><p>http://www.apnews.com/b399fa71204d47199fdf4c753102e6c7</p><p>https://ark-invest.com/research/industrial-robot-costs</p><p>131</p><p>with image recognition. But another reason is that physical robots require</p><p>sophisticated technologies to understand the environment—which is often</p><p>noisy and distracting—in real-time. This involves enabling simultaneous</p><p>localization and mapping (SLAM) in unknown environments while</p><p>simultaneously tracking the robot’s location. To do this effectively, there may</p><p>even need to be new technologies created, such as better neural network</p><p>algorithms and quantum computers.</p><p>Despite all this, there is certainly progress being made, especially with the use</p><p>of reinforcement learning techniques. Consider some of the following</p><p>innovations:</p><p>• Osaro: The company develops systems that allow robots</p><p>to learn quickly. Osaro describes this as “the ability to</p><p>mimic behavior that requires learned sensor fusion as</p><p>well as high level planning and object manipulation. It will</p><p>also enable the ability to learn from one machine to</p><p>another and improve beyond a human programmer’s</p><p>insights.” 14 For example, one of its robots was able to</p><p>learn, within only five seconds, how to lift and place a</p><p>chicken (the system is expected to be used in poultry</p><p>factories).15 But the technology could have many</p><p>applications, such as for drones, autonomous vehicles,</p><p>and IoT (Internet of Things).</p><p>• OpenAI: They have created the Dactyl, which is a robot</p><p>hand that has human-like dexterity. This is based on</p><p>sophisticated training of simulations, not real-world</p><p>interactions. OpenAI calls this “domain randomization,”</p><p>which presents the robot many scenarios—even those</p><p>that have a very low probability of happening. With</p><p>Dactyl, the simulations were able to involve about 100</p><p>years of problem solving.16 One of the surprising results</p><p>was that the system learned human hand actions that</p><p>were not preprogrammed—such as sliding of the finger.</p><p>Dactyl also has been trained to deal with imperfect</p><p>information, say when the sensors have delayed readings,</p><p>or when there is a need to handle multiple objects.</p><p>14 www.osaro.com/technology</p><p>15 www.technologyreview.com/s/611424/this-is-how-the-robot-uprising-</p><p>finally-begins/</p><p>16 https://openai.com/blog/learning-dexterity/</p><p>Artificial Intelligence Basics</p><p>http://www.osaro.com/technology</p><p>http://www.technologyreview.com/s/611424/this-is-how-the-robot-uprising-finally-begins/</p><p>http://www.technologyreview.com/s/611424/this-is-how-the-robot-uprising-finally-begins/</p><p>https://openai.com/blog/learning-dexterity/</p><p>132</p><p>• MIT: It can easily take thousands of sample data for a</p><p>robot to understand its environment, such as to detect</p><p>something as simple as a mug. But according to a research</p><p>paper from professors at MIT, there may be a way to</p><p>reduce this. They used a neural network that focused on</p><p>only a few key features.17 The research is still in the early</p><p>stages, but it could prove very impactful for robots.</p><p>• Google: Beginning in 2013, the company went on an M&A</p><p>(mergers and acquisitions) binge for robotics companies.</p><p>But the results were disappointing. Despite this, it has</p><p>not given up on the business. Over the</p><p>past few years,</p><p>Google has focused on pursuing simpler robots that are</p><p>driven by AI and the company has created a new division,</p><p>called Robotics at Google. For example, one of the</p><p>robots can look at a bin of items and identify the one that</p><p>is requested—picking it up with a three-fingered hand—</p><p>about 85% of the time. A typical person, on the other</p><p>hand, was able to do this at about 80%.18</p><p>So does all this point to complete automation? Probably not—at least for the</p><p>foreseeable future. Keep in mind that a major trend is the development of</p><p>cobots. These are robots that work along with people. All in all, it is turning</p><p>into a much more powerful approach, as there can be leveraging of the</p><p>advantages of both machines and humans.</p><p>Note that one of the major leaders in this category is Amazon.com. Back in</p><p>2012, the company shelled out $775 million for Kiva, a top industrial robot</p><p>manufacturer. Since then, Amazon.com has rolled out about 100,000 systems</p><p>across more than 25 fulfillment centers (because of this, the company has</p><p>seen 40% improvement in inventory capacity).19 This is how the company</p><p>describes it:</p><p>Amazon Robotics automates fulfilment center operations using various</p><p>methods of robotic technology including autonomous mobile robots,</p><p>sophisticated control software, language perception, power management,</p><p>computer vision, depth sensing, machine learning, object recognition,</p><p>and semantic understanding of commands.20</p><p>Within the warehouses, robots quickly move across the floor helping to</p><p>locate and lift storage pods. But people are also critical as they are better able</p><p>to identify and pick individual products.</p><p>17 https://arxiv.org/abs/1903.06684</p><p>18 www.nytimes.com/2019/03/26/technology/google-robotics-lab.html</p><p>19 https://techcrunch.com/2019/03/29/built-robotics-massive-construction-</p><p>excavator-drives-itself/</p><p>20 www.amazonrobotics.com/#/vision</p><p>Chapter 7 | Physical Robots</p><p>https://arxiv.org/abs/1903.06684</p><p>http://www.nytimes.com/2019/03/26/technology/google-robotics-lab.html</p><p>https://techcrunch.com/2019/03/29/built-robotics-massive-construction-excavator-drives-itself/</p><p>https://techcrunch.com/2019/03/29/built-robotics-massive-construction-excavator-drives-itself/</p><p>http://www.amazonrobotics.com/#/vision</p><p>133</p><p>Yet the setup is very complicated. For example, warehouse employees wear</p><p>Robotic Tech Vests so as not to be run down by robots!21 This technology</p><p>makes it possible for a robot to identify a person.</p><p>But there are other issues with cobots. For example, there is the real fear that</p><p>employees will ultimately be replaced by the machines. What’s more, it’s</p><p>natural for people to feel like a proverbial cog in the wheel, which could mean</p><p>lower morale. Can people really bond with robots? Probably not, especially</p><p>industrial robots, which really do not have human qualities.</p><p>Robots intheReal World</p><p>OK then, let’s now take a look at some of the other interesting use cases with</p><p>industrial and commercial robots.</p><p>Use Case: Security</p><p>Both Erik Schluntz and Travis Deyle have extensive backgrounds in the robotics</p><p>industry, with stints at companies like Google and SpaceX. In 2016, they</p><p>wanted to start their own venture but first spent considerable time trying to</p><p>find a real-world application for the technology, which involved talking to</p><p>numerous companies. Schluntz and Deyle found one common theme: the need</p><p>for physical security of facilities. How could robots provide protection after</p><p>5 pm—without having to spend large amounts on security guards?</p><p>This resulted in the launch of Cobalt Robotics. The timing was spot-on</p><p>because of the convergence of technologies like computer vision, machine</p><p>learning, and, of course, the strides in robotics.</p><p>While using traditional security technology is effective—say with cameras and</p><p>sensors—they are static and not necessarily good for real-time response. But</p><p>with a robot, it’s possible to be much more proactive because of the mobility</p><p>and the underlying intelligence.</p><p>However, people are still in the loop. Robots can then do what they are good</p><p>at, such as 24/7 data processing and sensing, and people can focus on thinking</p><p>critically and weighing the alternatives.</p><p>Besides its technology, Cobalt has been innovative with its business model,</p><p>which it calls Robotics as a Service (RaaS). By charging a subscription, these</p><p>devices are much more affordable for customers.</p><p>21 www.theverge.com/2019/1/21/18191338/amazon-robot-warehouse-tech-</p><p>vest-utility-belt-safety</p><p>Artificial Intelligence Basics</p><p>http://www.theverge.com/2019/1/21/18191338/amazon-robot-warehouse-tech-vest-utility-belt-safety</p><p>http://www.theverge.com/2019/1/21/18191338/amazon-robot-warehouse-tech-vest-utility-belt-safety</p><p>134</p><p>Use Case: Floor-Scrubbing Robots</p><p>We are likely to see some of the most interesting applications for robots in</p><p>categories that are fairly mundane. Then again, these machines are really good</p><p>at handling repetitive processes.</p><p>Take a look at Brain Corp, which was founded in 2009 by Dr. Eugene Izhikevich</p><p>and Dr. Allen Gruber. They initially developed their technology for Qualcomm</p><p>and DARPA.But Brain has since gone on to leverage machine learning and</p><p>computer vision for self-driving robots. In all, the company has raised $125</p><p>million from investors like Qualcomm and SoftBank.</p><p>Brain’s flagship robot is Auto-C, which efficiently scrubs floors. Because of the</p><p>AI system, called BrainOS (which is connected to the cloud), the machine is</p><p>able to autonomously navigate complex environments. This is done by pressing</p><p>a button, and then Auto-C quickly maps the route.</p><p>In late 2018, Brain struck an agreement with Walmart to roll out 1,500</p><p>Auto-C robots across hundreds of store locations.22 The company has also</p><p>deployed robots at airports and malls.</p><p>But this is not the only robot in the works for Walmart. The company is also</p><p>installing machines that can scan shelves to help with inventory management.</p><p>With about 4,600 stores across the United States, robots will likely have a</p><p>major impact on the retailer.23</p><p>Use Case: Online Pharmacy</p><p>As a second-generation pharmacist, TJ Parker had first-hand experience with</p><p>the frustrations people felt when managing their prescriptions. So he</p><p>wondered: Might the solution be to create a digital pharmacy?</p><p>He was convinced that the answer was yes. But while he had a strong</p><p>background in the industry, he needed a solid tech co-founder, which he found</p><p>in Elliot Cohen, an MIT engineer. They would go on to create PillPack in 2013.</p><p>The focus was to reimagine the customer experience. By using an app or</p><p>going to the PillPack web site, a user could easily sign up—such as to input</p><p>insurance information, enter prescription needs, and schedule deliveries.</p><p>When the user received the package, it would have detailed information</p><p>about dose instructions and even images of each pill. Furthermore, each of</p><p>the pills included labels and were presorted into containers.</p><p>22 www.wsj.com/articles/walmart-is-rolling-out-the-robots-11554782460</p><p>23 https://techcrunch.com/2019/04/10/the-startup-behind-walmarts-</p><p>shelf-scanning-robots/</p><p>Chapter 7 | Physical Robots</p><p>http://www.wsj.com/articles/walmart-is-rolling-out-the-robots-11554782460</p><p>https://techcrunch.com/2019/04/10/the-startup-behind-walmarts-shelf-scanning-robots/</p><p>https://techcrunch.com/2019/04/10/the-startup-behind-walmarts-shelf-scanning-robots/</p><p>135</p><p>To make all this a reality required a sophisticated technology infrastructure,</p><p>called PharmacyOS.It also was based on a network of robots, which were</p><p>located in an 80,000-square-foot warehouse. Through this, the system could</p><p>efficiently sort and package the prescriptions. But the facility also had licensed</p><p>pharmacists to manage the process and make sure everything was in</p><p>compliance.</p><p>In June 2018, Amazon.com shelled out about $1 billion for PillPack. On the</p><p>news, the shares of companies like CVS and Walgreens dropped on the fears</p><p>that the e-commerce giant was preparing to make a big play for the healthcare</p><p>market.</p><p>Use Case: Robot</p><p>Scientists</p><p>Developing prescription drugs is enormously expensive. Based on research</p><p>from the Tufts Center for the Study of Drug Development, the average comes</p><p>to about $2.6 billion per approved compound.24 In addition, it can easily take</p><p>over a decade to get a new drug to market because of the onerous regulations.</p><p>But the use of sophisticated robots and deep learning could help. To see how,</p><p>look at what researchers at the Universities of Aberystwyth and Cambridge</p><p>have done. In 2009, they launched Adam, which was essentially a robot</p><p>scientist that helped with the drug discovery process. Then a few years later,</p><p>they launched Eve, which was the next-generation robot.</p><p>The system can come up with hypotheses and test them as well as run</p><p>experiments. But the process is not just about brute-force calculations (the</p><p>system can screen more than 10,000 compounds per day).25 With deep learning,</p><p>Eve is able to use intelligence to better identify those compounds with the most</p><p>potential. For example, it was able to show that triclosan—a common element</p><p>found in toothpaste to prevent the buildup of plaque—could be effective against</p><p>parasite growth in malaria. This is especially important since the disease has</p><p>been becoming more resistant to existing therapies.</p><p>Humanoid andConsumer Robots</p><p>The popular cartoon, The Jetsons, came out in the early 1960s and had a great</p><p>cast of characters. One was Rosie, which was a robot maid that always had a</p><p>vacuum cleaner in hand.</p><p>24 www.policymed.com/2014/12/a-tough-road-cost-to-develop-one-new-</p><p>drug-is-26-billion-approval-rate-for-drugs-entering-clinical-de.html</p><p>25 www.cam.ac.uk/research/news/artificially-intelligent-robot-scientist-</p><p>eve-could-boost-search-for-new-drugs</p><p>Artificial Intelligence Basics</p><p>http://www.policymed.com/2014/12/a-tough-road-cost-to-develop-one-new-drug-is-26-billion-approval-rate-for-drugs-entering-clinical-de.html</p><p>http://www.policymed.com/2014/12/a-tough-road-cost-to-develop-one-new-drug-is-26-billion-approval-rate-for-drugs-entering-clinical-de.html</p><p>http://www.cam.ac.uk/research/news/artificially-intelligent-robot-scientist-eve-could-boost-search-for-new-drugs</p><p>http://www.cam.ac.uk/research/news/artificially-intelligent-robot-scientist-eve-could-boost-search-for-new-drugs</p><p>136</p><p>Who wouldn’t want something like this? I would. But don’t expect something</p><p>like Rosie coming to a home anytime soon. When it comes to consumer</p><p>robots, we are still in the early days. In other words, we are instead seeing</p><p>robots that have only some human features.</p><p>Here are notable examples:</p><p>• Sophia: Developed by the Hong Kong–based company</p><p>Hanson Robotics, this is perhaps the most famous. In</p><p>fact, in late 2017 Saudi Arabia granted her citizenship!</p><p>Sophia, which has the likeness of Audrey Hepburn, can</p><p>walk and talk. But there are also subtleties with her</p><p>actions, such as sustaining eye contact.</p><p>• Atlas: The developer is Boston Dynamics, which launched</p><p>this in the summer of 2013. No doubt, Atlas has gotten</p><p>much better over the years. It can, for example, perform</p><p>backflips and pick itself up when it falls down.</p><p>• Pepper: This is a humanoid robot, created by SoftBank</p><p>Robotics, that is focused on providing customer service,</p><p>such as at retail locations. The machine can use gestures—</p><p>to help improve communication—and can also speak</p><p>multiple languages.</p><p>As humanoid technologies get more realistic and advanced, there will inevitably</p><p>be changes in society. Social norms about love and friendship will evolve. After</p><p>all, as seen with the pervasiveness with smartphones, we are already seeing</p><p>how technology can change the way we relate to people, say with texting and</p><p>engaging in social media. According to a survey of Millennials from Tappable,</p><p>close to 10% would rather sacrifice their pinky finger than forgo their</p><p>smartphone!26</p><p>As for robots, we may see something similar. It’s about social robots. Such a</p><p>machine—which is life-like with realistic features and AI—could ultimately</p><p>become like, well, a friend or…even a lover.</p><p>Granted, this is likely far in the future. But as of now, there are certainly some</p><p>interesting innovations with social robots. One example is ElliQ, which</p><p>involves a tablet and a small robot head. For the most part, it is for those who</p><p>live alone, such as the elderly. ElliQ can talk but also provide invaluable</p><p>assistance like give reminders for taking medicine. The system can allow for</p><p>video chats with family members as well.27</p><p>26 www.mediapost.com/publications/article/322677/one-in-10-millennials-</p><p>would-rather-lose-a-finger-t.html</p><p>27 www.wsj.com/articles/on-demand-grandkids-and-robot-pals-technology-</p><p>strives-to-cure-senior-loneliness-11550898010?mod=hp_lead_pos9</p><p>Chapter 7 | Physical Robots</p><p>http://www.mediapost.com/publications/article/322677/one-in-10-millennials-would-rather-lose-a-finger-t.html</p><p>http://www.mediapost.com/publications/article/322677/one-in-10-millennials-would-rather-lose-a-finger-t.html</p><p>http://www.wsj.com/articles/on-demand-grandkids-and-robot-pals-technology-strives-to-cure-senior-loneliness-11550898010?mod=hp_lead_pos9</p><p>http://www.wsj.com/articles/on-demand-grandkids-and-robot-pals-technology-strives-to-cure-senior-loneliness-11550898010?mod=hp_lead_pos9</p><p>137</p><p>Yet there are certainly downsides to social robots. Just look at the awful</p><p>situation of Jibo. The company, which had raised $72.7 million in venture</p><p>funding, created the first social robot for the home. But there were many</p><p>problems, such as product delays and the onslaught of knock-offs. Because of</p><p>all this, Jibo filed for bankruptcy in 2018, and by April the following year, the</p><p>servers were shut down.28</p><p>Needless to say, there were many disheartened owners of Jibo, evidenced by</p><p>the many posts on Reddit.</p><p>The Three Laws ofRobotics</p><p>Isaac Asimov, a prolific writer of many diverse subjects like science fiction,</p><p>history, chemistry, and Shakespeare, would also have a major impact on</p><p>robots. In a short story he wrote in 1942 (“Runaround”), he set forth his</p><p>Three Laws of Robotics:</p><p>1. A robot may not injure a human being or, through</p><p>inaction, allow a human being to come to harm.</p><p>2. A robot must obey the orders given to it by human</p><p>beings, except where such orders would conflict with the</p><p>First Law.</p><p>3. A robot must protect its own existence as long as such</p><p>protection does not conflict with the First or Second Law.</p><p>■ Note Asimov would later add another one, the zeroth law, which stated: “A robot may not</p><p>harm humanity, or, by inaction, allow humanity to come to harm.” He considered this law to be</p><p>the most important.</p><p>Asimov would write more short stories that reflected how the laws would</p><p>play out in complex situations, and they would be collected in a book called I,</p><p>Robot. All these took place in the world of the 21st century.</p><p>The Three Laws represented Asimov’s reaction to how science fiction portrayed</p><p>robots as malevolent. But he thought this was unrealistic. Asimov had the</p><p>foresight that there would emerge ethical rules to control the power of robots.</p><p>As of now, Asimov’s vision is starting to become more real—in other words,</p><p>it is a good idea to explore ethical principles. Granted, this may not necessarily</p><p>mean that his approach is the right way. But it is a good start, especially as</p><p>robots get smarter and more personal because of the power of AI.</p><p>28 https://techcrunch.com/2019/03/04/the-lonely-death-of-jibo-the-</p><p>social-robot/</p><p>Artificial Intelligence Basics</p><p>https://techcrunch.com/2019/03/04/the-lonely-death-of-jibo-the-social-robot/</p><p>https://techcrunch.com/2019/03/04/the-lonely-death-of-jibo-the-social-robot/</p><p>138</p><p>Cybersecurity andRobots</p><p>Cybersecurity has not been much of a problem with robots. But unfortunately,</p><p>this will not likely be the case for long. The main reason is that it is becoming</p><p>much more common for robots to be connected to the cloud. The same goes for</p><p>other systems, such as the Internet of Things or IoT, and autonomous cars. For</p><p>example, many of these systems are updated wirelessly, which</p><p>of many predictions of</p><p>AI that would come up short.</p><p>So how has the Turing Test held up over the years? Well, it has proven to be</p><p>difficult to crack. Keep in mind that there are contests, such as the Loebner</p><p>Prize and the Turing Test Competition, to encourage people to create</p><p>intelligent software systems.</p><p>In 2014, there was a case where it did look like the Turing Test was passed. It</p><p>involved a computer that said it was 13 years old.2 Interestingly enough, the</p><p>human judges likely were fooled because some of the answers had errors.</p><p>Then in May 2018 at Google’s I/O conference, CEO Sundar Pichai gave a</p><p>standout demo of Google Assistant.3 Before a live audience, he used the</p><p>device to call a local hairdresser to make an appointment. The person on the</p><p>other end of the line acted as if she was talking to a person!</p><p>Amazing, right? Definitely. Yet it still probably did not pass the Turing Test.</p><p>The reason is that the conversation was focused on one topic—not open</p><p>ended.</p><p>As should be no surprise, there has been ongoing controversy with the Turing</p><p>Test, as some people think it can be manipulated. In 1980, philosopher John</p><p>Searle wrote a famous paper, entitled “Minds, Brains, and Programs,” where</p><p>he set up his own thought experiment, called the “Chinese room argument”</p><p>to highlight the flaws.</p><p>Here’s how it worked: Let’s say John is in a room and does not understand the</p><p>Chinese language. However, he does have manuals that provide easy-to-use</p><p>rules to translate it. Outside the room is Jan, who does understand the</p><p>language and submits characters to John. After some time, she will then get</p><p>an accurate translation from John. As such, it’s reasonable to assume that Jan</p><p>believes that John can speak Chinese.</p><p>2 www.theguardian.com/technology/2014/jun/08/super-computer-</p><p>simulates-13-year-old-boy-passes-turing-test</p><p>3 www.theverge.com/2018/5/8/17332070/google-assistant-makes-</p><p>phone-call-demo-duplex-io-2018</p><p>Artificial Intelligence Basics</p><p>http://www.theguardian.com/technology/2014/jun/08/super-computer-simulates-13-year-old-boy-passes-turing-test</p><p>http://www.theguardian.com/technology/2014/jun/08/super-computer-simulates-13-year-old-boy-passes-turing-test</p><p>http://www.theverge.com/2018/5/8/17332070/google-assistant-makes-phone-call-demo-duplex-io-2018</p><p>http://www.theverge.com/2018/5/8/17332070/google-assistant-makes-phone-call-demo-duplex-io-2018</p><p>4</p><p>Searle’s conclusion:</p><p>The point of the argument is this: if the man in the room does not</p><p>understand Chinese on the basis of implementing the appropriate</p><p>program for understanding Chinese then neither does any other digital</p><p>computer solely on that basis because no computer, qua computer, has</p><p>anything the man does not have.4</p><p>It was a pretty good argument—and has been a hot topic of debate in AI</p><p>circles since.</p><p>Searle also believed there were two forms of AI:</p><p>• Strong AI: This is when a machine truly understands what</p><p>is happening. There may even be emotions and creativity.</p><p>For the most part, it is what we see in science fiction</p><p>movies. This type of AI is also known as Artificial General</p><p>Intelligence (AGI). Note that there are only a handful of</p><p>companies that focus on this category, such as Google’s</p><p>DeepMind.</p><p>• Weak AI: With this, a machine is pattern matching and</p><p>usually focused on narrow tasks. Examples of this include</p><p>Apple’s Siri and Amazon’s Alexa.</p><p>The reality is that AI is in the early phases of weak AI.Reaching the point of</p><p>strong AI could easily take decades. Some researchers think it may never</p><p>happen.</p><p>Given the limitations to the Turing Test, there have emerged alternatives,</p><p>such as the following:</p><p>• Kurzweil-Kapor Test: This is from futurologist Ray Kurzweil</p><p>and tech entrepreneur Mitch Kapor. Their test requires</p><p>that a computer carry on a conversation for two hours</p><p>and that two of three judges believe it is a human talking.</p><p>As for Kapor, he does not believe this will be achieved</p><p>until 2029.</p><p>• Coffee Test: This is from Apple co-founder Steve Wozniak.</p><p>According to the coffee test, a robot must be able to go</p><p>into a stranger’s home, locate the kitchen, and brew a</p><p>cup of coffee.</p><p>4 https://plato.stanford.edu/entries/chinese-room/</p><p>Chapter 1 | AI Foundations</p><p>https://plato.stanford.edu/entries/chinese-room/</p><p>5</p><p>The Brain Is a…Machine?</p><p>In 1943, Warren McCulloch and Walter Pitts met at the University of Chicago,</p><p>and they became fast friends even though their backgrounds were starkly</p><p>different as were their ages (McCulloch was 42 and Pitts was 18). McCulloch</p><p>grew up in a wealthy Eastern Establishment family, having gone to prestigious</p><p>schools. Pitts, on the other hand, grew up in a low-income neighborhood and</p><p>was even homeless as a teenager.</p><p>Despite all this, the partnership would turn into one of the most consequential</p><p>in the development of AI.McCulloch and Pitts developed new theories to</p><p>explain the brain, which often went against the conventional wisdom of</p><p>Freudian psychology. But both of them thought that logic could explain the</p><p>power of the brain and also looked at the insights from Alan Turing. From this,</p><p>they co-wrote a paper in 1943 called “A Logical Calculus of the Ideas Immanent</p><p>in Nervous Activity,” and it appeared in the Bulletin of Mathematical Biophysics.</p><p>The thesis was that the brain’s core functions like neurons and synapses could</p><p>be explained by logic and mathematics, say with logical operators like And,</p><p>Or, and Not. With these, you could construct a complex network that could</p><p>process information, learn, and think.</p><p>Ironically, the paper did not get much traction with neurologists. But it did get</p><p>the attention with those working on computers and AI.</p><p>Cybernetics</p><p>While Norbert Wiener created various theories, his most famous one was</p><p>about cybernetics. It was focused on understanding control and communications</p><p>with animals, people, and machines—showing the importance of feedback loops.</p><p>In 1948, Wiener published Cybernetics: Or Control and Communication in the</p><p>Animal and the Machine. Even though it was a scholarly work—filled with complex</p><p>equations—the book still became a bestseller, hitting the New York Times list.</p><p>It was definitely wide ranging. Some of the topics included Newtonian</p><p>mechanics, meteorology, statistics, astronomy, and thermodynamics. This</p><p>book would anticipate the development of chaos theory, digital</p><p>communications, and even computer memory.</p><p>But the book would also be influential for AI.Like McCulloch and Pitts, Wiener</p><p>compared the human brain to the computer. Furthermore, he speculated that</p><p>a computer would be able to play chess and eventually beat grand masters.</p><p>The main reason is that he believed that a machine could learn as it played</p><p>games. He even thought that computers would be able to replicate themselves.</p><p>But Cybernetics was not utopian either. Wiener was also prescient in</p><p>understanding the downsides of computers, such as the potential for</p><p>dehumanization. He even thought that machines would make people unnecessary.</p><p>Artificial Intelligence Basics</p><p>6</p><p>It was definitely a mixed message. But Wiener’s ideas were powerful and</p><p>spurred the development of AI.</p><p>The Origin Story</p><p>John McCarthy’s interest in computers was spurred in 1948, when he attended</p><p>a seminar, called “Cerebral Mechanisms in Behavior,” which covered the topic</p><p>of how machines would eventually be able to think. Some of the participants</p><p>included the leading pioneers in the field such as John von Neumann, Alan</p><p>Turing, and Claude Shannon.</p><p>McCarthy continued to immerse himself in the emerging computer industry—</p><p>including a stint at Bell Labs—and in 1956, he organized a ten-week research</p><p>project at Dartmouth University. He called it a “study of artificial intelligence.”</p><p>It was the first time the term had been used.</p><p>The attendees included academics like Marvin Minsky, Nathaniel Rochester,</p><p>Allen Newell, O.G. Selfridge, Raymond Solomonoff, and Claude Shannon. All</p><p>of them would go on to become major players in AI.</p><p>The goals for the study were definitely ambitious:</p><p>The study is</p><p>exposes them to</p><p>malware, viruses, and even ransoms. Furthermore, when it comes to electric</p><p>vehicles, there is also a vulnerability to attacks from the charging network.</p><p>In fact, your data could linger within a vehicle! So if it is wrecked or you sell</p><p>it, the information—say video, navigation details, and contacts from paired</p><p>smartphone connections—may become available to other people. A white</p><p>hat hacker, called GreenTheOnly, has been able to extract this data from a</p><p>variety of Tesla models at junkyards, according to CNBC.com.29 But it’s</p><p>important to note that the company does provide options to wipe the data</p><p>and you can opt out of data collection (but this means not having certain</p><p>advantages, like over-the-air (OTA) updates).</p><p>Now if there is a cybersecurity breach with a robot, the implications can</p><p>certainly be devastating. Just imagine if a hacker infiltrated a manufacturing</p><p>line or a supply chain or even a robotic surgery system. Lives could be in</p><p>jeopardy.</p><p>Regardless, there has not been much investment in cybersecurity for robots.</p><p>So far, there are just a handful of companies, like Karamba Security and</p><p>Cybereason, that are focused on this. But as the problems get worse, there</p><p>will inevitably be a ramping of investments from VCs and new initiatives from</p><p>legacy cybersecurity firms.</p><p>Programming Robots forAI</p><p>It is getting easier to create intelligent robots, as systems get cheaper and</p><p>there are new software platforms emerging. A big part of this has been due to</p><p>the Robot Operating System (ROS), which is becoming a standard in the</p><p>industry. The origins go back to 2007 when the platform began as an open</p><p>source project at the Stanford Artificial Intelligence Laboratory.</p><p>Despite its name, ROS is really not a true operating system. Instead, it is</p><p>middleware that helps to manage many of the critical parts of a robot: planning,</p><p>simulations, mapping, localization, perception, and prototypes. ROS is also</p><p>modular, as you can easily pick and choose the functions you need. The result</p><p>is that the system can easily cut down on development time.</p><p>29 www.cnbc.com/2019/03/29/tesla-model-3-keeps-data-like-crash-videos-</p><p>location-phone-contacts.html</p><p>Chapter 7 | Physical Robots</p><p>http://www.cnbc.com/2019/03/29/tesla-model-3-keeps-data-like-crash-videos-location-phone-contacts.html</p><p>http://www.cnbc.com/2019/03/29/tesla-model-3-keeps-data-like-crash-videos-location-phone-contacts.html</p><p>139</p><p>Another advantage: ROS has a global community of users. Consider that</p><p>there are over 3,000 packages for the platform.30</p><p>As a testament to the prowess of ROS, Microsoft announced in late 2018 that</p><p>it would release a version for the Windows operating system. According to</p><p>the blog post from Lou Amadio, the principal software engineer of Windows</p><p>IoT, “As robots have advanced, so have the development tools. We see</p><p>robotics with artificial intelligence as universally accessible technology to</p><p>augment human abilities.”31</p><p>The upshot is that ROS can be used with Visual Studio and there will be</p><p>connections to the Azure cloud, which includes AI Tools.</p><p>OK then, when it comes to developing intelligent robots, there is often a</p><p>different process than with the typical approach with software-based AI.That</p><p>is, there not only needs to be a physical device but also a way to test it. Often</p><p>this is done by using a simulation. Some developers will even start with</p><p>creating cardboard models, which can be a great way to get a sense of the</p><p>physical requirements.</p><p>But of course, there are also useful virtual simulators, such as MuJoCo,</p><p>Gazebo, MORSE, and V-REP.These systems use sophisticated 3D graphics to</p><p>deal with movements and the physics of the real world.</p><p>Then how do you create the AI models for robots? Actually, it is little different</p><p>from the approach with software-based algorithms (as we covered in Chapter</p><p>2). But with a robot, there is the advantage that it will continue to collect data</p><p>from its sensors, which can help evolve the AI.</p><p>The cloud is also becoming a critical factor in the development of intelligent</p><p>robots, as seen with Amazon.com. The company has leveraged its hugely</p><p>popular AWS platform with a new offering, called AWS RoboMaker. By using</p><p>this, you can build, test, and deploy robots without much configuration. AWS</p><p>RoboMaker operates on ROS and also allows the use of services for machine</p><p>learning, analytics, and monitoring. There are even prebuilt virtual 3D worlds</p><p>for retail stores, indoor rooms, and race tracks! Then once you are finished</p><p>with the robot, you can use AWS to develop an over-the-air (OTA) system for</p><p>secure deployment and periodic updates.</p><p>And as should be no surprise, Google is planning on releasing its own robot</p><p>cloud platform (it’s expected to launch in 2019).32</p><p>30 www.ros.org/is-ros-for-me/</p><p>31 https://blogs.windows.com/windowsexperience/2018/09/28/bringing-the-</p><p>power-of-windows-10-to-the-robot-operating-system/</p><p>32 www.therobotreport.com/google-cloud-robotics-platform/</p><p>Artificial Intelligence Basics</p><p>http://www.ros.org/is-ros-for-me/</p><p>https://blogs.windows.com/windowsexperience/2018/09/28/bringing-the-power-of-windows-10-to-the-robot-operating-system/</p><p>https://blogs.windows.com/windowsexperience/2018/09/28/bringing-the-power-of-windows-10-to-the-robot-operating-system/</p><p>http://www.therobotreport.com/google-cloud-robotics-platform/</p><p>140</p><p>The Future ofRobots</p><p>Rodney Brooks is one of the giants of the robotics industry. In 1990, he</p><p>co-founded iRobot to find ways to commercialize the technology. But it was</p><p>not easy. It was not until 2002 that the company launched its Roomba</p><p>vacuuming robot, which was a big hit with consumers. As of this writing,</p><p>iRobot has a market value of $3.2 billion and posted more than $1 billion in</p><p>revenues for 2018.</p><p>But iRobot was not the only startup for Brooks. He would also help to launch</p><p>Rethink Robotics—and his vision was ambitious. Here’s how he put it during</p><p>2010, when his company announced a $20 million funding:</p><p>Our robots will be intuitive to use, intelligent and highly flexible. They’ll</p><p>be easy to buy, train, and deploy and will be unbelievably inexpensive.</p><p>[Rethink Robotics] will change the definition of how and where robots</p><p>can be used, dramatically expanding the robot marketplace.33</p><p>But unfortunately, as with iRobot, there were many challenges. Even though</p><p>Brook’s idea for cobots was pioneering—and would ultimately prove to be a</p><p>lucrative market—he had to struggle with the complications of building an</p><p>effective system. The focus on safety meant that precision and accuracy was</p><p>not up to the standards of industrial customers. Because of this, the demand</p><p>for Rethink’s robots was tepid.</p><p>By October 2018, the company ran out of cash and had to close its doors. In</p><p>all, Rethink had raised close to $150 million from VCs and strategic investors</p><p>like Goldman Sachs, Sigma Partners, GE, and Bezos Expeditions. The company’s</p><p>intellectual property was sold off to a German automation firm, HAHN Group.</p><p>True, this is just one example. But then again, it does show that even the</p><p>smartest tech people can get things wrong. And more importantly, the</p><p>robotics market has unique complexities. When it comes to the evolution of</p><p>this category, progress may be choppy and volatile.</p><p>As Cobalt’s Schluntz has noted:</p><p>While the industry has made progress in the last decade, robotics hasn’t</p><p>yet realized its full potential. Any new technology will create a wave of</p><p>numerous new companies, but only a few will survive and turn into lasting</p><p>businesses. The Dot-Com bust killed the majority of internet companies,</p><p>but Google, Amazon, and Netflix all survived. What robotics companies</p><p>need to do is to be upfront about what their robots can do for customers</p><p>today, overcome Hollywood stereotypes of robots as the bad guys, and</p><p>demonstrate a clear ROI (Return On Investment) to customers.34</p><p>33 www.rethinkrobotics.com/news-item/heartland-robotics-raises-20-million-</p><p>in-series-b-financing/</p><p>34 From the author’s interview with Erik Schluntz, CTO</p><p>of Cobalt Robotics.</p><p>Chapter 7 | Physical Robots</p><p>http://www.rethinkrobotics.com/news-item/heartland-robotics-raises-20-million-in-series-b-financing/</p><p>http://www.rethinkrobotics.com/news-item/heartland-robotics-raises-20-million-in-series-b-financing/</p><p>141</p><p>Conclusion</p><p>Until the past few years, robots were mostly for high-end manufacturing, such</p><p>as for autos. But with the growth in AI and the lower costs for building</p><p>devices, robots are becoming more widespread across a range of industries.</p><p>As seen in this chapter, there are interesting use cases with robots that do</p><p>things like clean floors or provide security for facilities.</p><p>But the use of AI with robotics is still in the nascent stages. Programming</p><p>hardware systems is far from easy, and there is the need of sophisticated</p><p>systems to navigate environments. However, with AI approaches like</p><p>reinforcement learning, there has been accelerated progress.</p><p>But when thinking of using robots, it’s important to understand the limitations.</p><p>There also must be a clear-cut purpose. If not, a deployment can easily lead to</p><p>a costly failure. Even some of the world’s most innovative companies, like</p><p>Google and Tesla, have had challenges in working with robots.</p><p>Key Takeaways</p><p>• A robot can take actions, sense its environment, and have</p><p>some level of intelligence. There are also key functions</p><p>like sensors, actuators (such as motors), and computers.</p><p>• There are two main ways to operate a robot: the</p><p>telerobot (this is controlled by a human) and autonomous</p><p>robot (based on AI systems).</p><p>• Developing robots is incredibly complicated. Even some</p><p>of the world’s best technologists, like Tesla’s Elon Musk,</p><p>have had major troubles with the technology. A key</p><p>reason is the Moravec paradox. Basically, what’s easy for</p><p>humans is often difficult for robots and vice versa.</p><p>• While AI is making an impact on robots, the process has</p><p>been slow. One reason is that there has been more</p><p>emphasis on software-based technologies. But also</p><p>robots are extremely complicated when it comes to</p><p>moving and understanding the environment.</p><p>• Cobots are machines that work alongside humans. The</p><p>idea is that this will allow for the leveraging of the</p><p>advantages of both machines and people.</p><p>Artificial Intelligence Basics</p><p>142</p><p>• The costs of robots are a major reason for lack of</p><p>adoption. But innovative companies, like Cobalt Robotics,</p><p>are using new business models to help out, such as with</p><p>subscriptions.</p><p>• Consumer robots are still in the initial stages, especially</p><p>compared to industrial robots. But there are some</p><p>interesting use cases, such as with machines that can be</p><p>companions for people.</p><p>• During the 1950s, science fiction writer Isaac Asimov</p><p>created the Three Laws of robotics. For the most part,</p><p>they focused on making sure that the machines would</p><p>not harm people or society. Even though there are</p><p>criticisms of Asimov’s approach, they are still widely</p><p>accepted.</p><p>• Security has not generally been a problem with robots.</p><p>But this will likely change—and fast. After all, more</p><p>robots are connected to the cloud, which allows for the</p><p>intrusion of viruses and malware.</p><p>• The Robot Operating System (ROS) has become a</p><p>standard for the robotics industry. This middleware helps</p><p>with planning, simulations, mapping, localization, perception,</p><p>and prototypes.</p><p>• Developing intelligent robots has many challenges</p><p>because of the need to create physical systems. Although,</p><p>there are tools to help out, such as by allowing for</p><p>sophisticated simulations.</p><p>Chapter 7 | Physical Robots</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_8</p><p>C H A P T E R</p><p>8</p><p>Implementation</p><p>ofAI</p><p>Moving the Needle for Your Company</p><p>In March 2019, a shooter live-streamed on Facebook his brutal killing of 50</p><p>people in two mosques in New Zealand. It was viewed about 4,000 times and</p><p>was not shut off until 29 minutes after the attack.1 The video was then</p><p>uploaded to other platforms and was viewed millions of times.</p><p>Yes, this was a stark example of how AI can fail in a horrible way.</p><p>In a blog post, Facebook’s VP of Product Management, Guy Rosen, noted:</p><p>AI systems are based on ‘training data,’ which means</p><p>you need many thousands of examples of content in</p><p>order to train a system that can detect certain types</p><p>of text, imagery or video. This approach has worked</p><p>very well for areas such as nudity, terrorist propaganda</p><p>and also graphic violence where there is a large</p><p>number of examples we can use to train our systems.</p><p>However, this particular video did not trigger our</p><p>automatic detection systems. To achieve that we will</p><p>need to provide our systems with large volumes of</p><p>1 www.cnbc.com/2019/03/21/why-facebooks-ai-didnt-detect-the-new-zealand-</p><p>mosque-shooting-video.html</p><p>http://www.cnbc.com/2019/03/21/why-facebooks-ai-didnt-detect-the-new-zealand-mosque-shooting-video.html</p><p>http://www.cnbc.com/2019/03/21/why-facebooks-ai-didnt-detect-the-new-zealand-mosque-shooting-video.html</p><p>144</p><p>data of this specific kind of content, something which</p><p>is difficult as these events are thankfully rare. Another</p><p>challenge is to automatically discern this content from</p><p>visually similar, innocuous content—for example if</p><p>thousands of videos from live-streamed video games</p><p>are flagged by our systems, our reviewers could miss</p><p>the important real-world videos where we could alert</p><p>first responders to get help on the ground.2</p><p>It also did not help that there were various bad actors that re-uploaded edited</p><p>versions of the video in order to foil Facebook’s AI system.</p><p>Of course, this was a big lesson in the shortfalls of technology, and the</p><p>company says it is committed to keep improving its systems. But the Facebook</p><p>case study also highlights that even the most technologically sophisticated</p><p>companies have major challenges. This is why when it comes to implementing</p><p>AI, there needs to be solid planning as well as an understanding that there will</p><p>inevitably be problems. But it can be tough as senior managers at companies</p><p>are under pressure to get results from this technology.</p><p>In this chapter, we’ll take a look at some of the best practices for AI</p><p>implementations.</p><p>Approaches toImplementing AI</p><p>Using AI in a company generally involves two approaches: using vendor</p><p>software or creating in-house models. The first one is the most prevalent—</p><p>and may be enough for a large number of companies. The irony is that you</p><p>may already be using software, say from Salesforce.com, Microsoft, Google,</p><p>Workday, Adobe, or SAP, that already has powerful AI capabilities. In other</p><p>words, a good approach is to make sure you are taking advantage of these to</p><p>the fullest.</p><p>To see what’s available, take a look at Salesforce.com’s Einstein, which was</p><p>launched in September 2016. This AI system is seamlessly embedded into the</p><p>main CRM (Customer Relationship Management) platform, allowing for more</p><p>predictive and personalized actions for sales, service, marketing, and</p><p>commerce. Salesforce.com calls Einstein a “personal data scientist” as it is</p><p>fairly easy to use, such as with drag and drop to create the workflows. Some</p><p>of the capabilities include the following:</p><p>• Predictive Scoring: This shows the likelihood that a lead</p><p>will convert into an opportunity.</p><p>2 https://newsroom.fb.com/news/2019/03/technical-update-on-new-zealand/</p><p>Chapter 8 | Implementation ofAI</p><p>https://newsroom.fb.com/news/2019/03/technical-update-on-new-zealand/</p><p>145</p><p>• Sentiment Analysis: This provides a way to get a sense of</p><p>how people view your brand and products by analyzing</p><p>social media.</p><p>• Smart Recommendations: Einstein crunches data to show</p><p>what products are the most ideal for leads.</p><p>However, while these prebuilt features make it easier to use AI, there are still</p><p>potential issues. “We have been building AI functions into our applications</p><p>during the past few years and this has been a great learning experience,” said</p><p>Ricky Thakrar, who is Zoho’s customer experience evangelist. “But to make</p><p>the technology</p><p>work, the users must use the software right. If the sales people</p><p>are not inputting information correctly, then the results will likely be off. We</p><p>also found that there should be at least three months of usage for the models</p><p>to get trained. And besides, even if your employees are doing everything right,</p><p>this does not mean that the AI predictions will be perfect. Always take things</p><p>with a grain of salt.”3</p><p>Now as for building your own AI models, this is a significant commitment for</p><p>a company. And this is what we’ll be covering in this chapter.</p><p>But regardless of what approach you may take, the implementation and use of AI</p><p>should first begin with education and training. It does not matter whether the</p><p>employees are non-technical people or software engineers. For AI to be</p><p>successful in an organization, everyone must have a core understanding of the</p><p>technology. Yes, this book will be helpful but there are many online resources to</p><p>help out as well, such as from training platforms like Lynda, Udacity, and Udemy.</p><p>They provide hundreds of high-quality courses on many topics about AI.</p><p>To give a sense of what a corporate training program looks like, consider Adobe.</p><p>Even though the company has incredibly talented engineers, there are still a</p><p>large number who do not have a background in AI.Some of them may not have</p><p>specialized in this in school or their work. Yet Adobe wanted to ensure that all</p><p>the engineers had a solid grasp of the core principles of AI.To this end, the</p><p>company has a six-month certification program, which trained 5,000 engineers</p><p>in 2018. The goal is to unleash the data scientist in each engineer.</p><p>The program includes both online courses and in-person sessions, which not</p><p>only cover technical topics but also areas like strategy and even ethics. Adobe</p><p>also provides help from senior computer scientists to assist students to</p><p>master the topics.</p><p>Next, early on in the implementation process, it’s essential to think about the</p><p>potential risks. Perhaps one of the most threatening is bias since it can easily</p><p>seep into an AI model.</p><p>3 This is based on the author’s interview, in April 2019, with Ricky Thakrar, who is Zoho’s</p><p>customer experience evangelist.</p><p>Artificial Intelligence Basics</p><p>146</p><p>An example of this is Amazon.com, which shut down its AI-powered recruiting</p><p>software in 2017. The main issue was that it was biased for hiring males.</p><p>Interestingly enough, this was a classic case of a training problem for the</p><p>model. Consider that a majority of the resume submissions were from men—</p><p>so the data was skewed. Amazon.com even tried to tweak the model, but still</p><p>the results were far from being gender neutral.4</p><p>In this case, the issue was not just about making decisions that were based on</p><p>faulty premises. Amazon.com was also probably exposing itself to potential</p><p>legal liability, such as with discrimination claims.</p><p>Given the tricky issues with AI, more companies are putting together ethics</p><p>boards. But even this can be fraught with problems. Hey, what may be ethical</p><p>for one person may not be a big deal for someone else, right? Definitely.</p><p>For example, Google closed down its own ethics board in about a week of its</p><p>launch. It appears the main reason was the backlash that came from including</p><p>a member from the Heritage Foundation, which is a conservative think tank.5</p><p>The Steps forAI Implementation</p><p>If you plan to implement your own AI models, what are the main steps to</p><p>consider? What are the best practices? Well, first of all, it’s critically important</p><p>that your data is fairly clean and structured in a way to allow for modelling</p><p>(see Chapter 2).</p><p>Here are some other steps to look at:</p><p>• Identify a problem to solve.</p><p>• Put together a strong team.</p><p>• Select the right tools and platforms.</p><p>• Create the AI model (we went through this process in</p><p>Chapter 3).</p><p>• Deploy and monitor the AI model.</p><p>Let’s take a look at each.</p><p>4 www.reuters.com/article/us-amazon-com-jobs-automation-insight/</p><p>amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-</p><p>idUSKCN1MK08G</p><p>5 www.theverge.com/2019/4/4/18296113/google-ai-ethics-board-ends-</p><p>controversy-kay-coles-james-heritage-foundation</p><p>Chapter 8 | Implementation ofAI</p><p>http://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G</p><p>http://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G</p><p>http://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G</p><p>http://www.theverge.com/2019/4/4/18296113/google-ai-ethics-board-ends-controversy-kay-coles-james-heritage-foundation</p><p>http://www.theverge.com/2019/4/4/18296113/google-ai-ethics-board-ends-controversy-kay-coles-james-heritage-foundation</p><p>147</p><p>Identify aProblem toSolve</p><p>Founded in 1976, HCL Technologies is one of the largest IT consulting firms,</p><p>with 132,000 employees across 44 countries, and has half the Fortune 500 as</p><p>customers. The company also has implemented a large number of AI systems.</p><p>Here’s what Kalyan Kumar, who is the corporate vice president and global</p><p>CTO of HCL Technologies, has to say:</p><p>Business leaders need to understand and realize that</p><p>the adoption of Artificial Intelligence is a journey and</p><p>not a sprint. It is critical that the people driving AI</p><p>adoption within an enterprise remain realistic about</p><p>the timeframe and what AI is capable of doing. The</p><p>relationship between humans and AI is mutually</p><p>empowering, and any AI implementation may take</p><p>some time before it starts to make a positive and</p><p>significant impact.6</p><p>It’s great advice. This is why—especially for companies that are starting in the</p><p>AI journey—it’s essential to take an experimental approach. Think of it as</p><p>putting together a pilot program—that is, you are in the “crawl and walk phase.”</p><p>But when it comes to the AI implementation process, it’s common to get too</p><p>focused on the different technologies, which are certainly fascinating and</p><p>powerful. Yet success is far more than just technology; in other words, there</p><p>must first be a clear business case. So here are some areas to think about</p><p>when starting out:</p><p>• No doubt, decisions in companies are often ad hoc and,</p><p>well, a matter of guessing! But with AI, you have an</p><p>opportunity to use data-driven decision-making, which</p><p>should have more accuracy. Then where in your</p><p>organization can this have the biggest benefit?</p><p>• As seen with Robotic Process Automation (RPA), which</p><p>we covered in Chapter 5, AI can be extremely effective</p><p>when handling repetitive and mundane tasks.</p><p>• Chatbots can be another way to start out with AI.They</p><p>are relatively easy to set up and can serve specific use</p><p>cases, such as customer service. You can learn more</p><p>about this in Chapter 6.</p><p>6 This is based on the author’s interview, in March 2019, with Kalyan Kumar, who is the</p><p>corporate vice president and global CTO of HCL Technologies.</p><p>Artificial Intelligence Basics</p><p>148</p><p>Andrew Ng, who is the CEO of Landing AI and the former head of Google</p><p>Brain, has come up with various approaches to think about when identifying</p><p>what to focus on with your initial AI project:7</p><p>• Quick Win: A project should take anywhere from 6 to 12</p><p>months and must have a high probability of success,</p><p>which should help provide momentum for more</p><p>initiatives. Andrew suggests having a couple projects as it</p><p>increases the odds of getting a win.</p><p>• Meaningful: A project does not have to be transformative.</p><p>But it should have results that help improve the company</p><p>in a notable way, creating more buy-in for additional AI</p><p>investments. The value usually comes from lower costs,</p><p>higher revenues, finding new extensions of the business,</p><p>or mitigating risks.</p><p>• Industry-Specific Focus: This is critical since a successful</p><p>project will be another factor in boosting buy-in. Thus, if</p><p>you have a company that sells a subscription service,</p><p>then</p><p>an AI system to lessen churn would be a good place to</p><p>start.</p><p>• Data: Do not limit your options based on the amount of</p><p>data you have. Andrew notes that a successful AI project</p><p>may have as little as 100 data points. But the data must</p><p>still be high quality and fairly clean, which are key topics</p><p>covered in Chapter 2.</p><p>When looking at this phase, it is also worth evaluating the “tango” between</p><p>employees and machines. Keep in mind that this is often missed—and it can</p><p>have adverse consequences on an AI project. As we’ve seen in this book, AI is</p><p>great at processing huge amounts of data with little error at great speed. The</p><p>technology is also excellent with predictions and detecting anomalies. But</p><p>there are tasks that humans do much better, such as being creative, engaging</p><p>in abstraction, and understanding concepts.</p><p>Note the following example of this from Erik Schluntz, who is the co-founder</p><p>and CTO at Cobalt Robotics:</p><p>Our security robots are excellent at detecting unusual</p><p>events in workplace and campus settings, like spotting</p><p>a person in a dark office with AI-powered thermal-</p><p>imaging. But one of our human operators then steps</p><p>7 https://hbr.org/2019/02/how-to-choose-your-first-ai-project</p><p>Chapter 8 | Implementation ofAI</p><p>https://hbr.org/2019/02/how-to-choose-your-first-ai-project</p><p>149</p><p>in and makes the call of how to respond. Even with all</p><p>of AI’s potential, it’s still not the best mission-critical</p><p>option when pitted against constantly changing</p><p>environmental variables and human unpredictability.</p><p>Consider the gravity of AI making a mistake in different</p><p>situations—failing to detect a malicious intruder is</p><p>much worse than accidentally sounding a false alarm</p><p>to one of our operators.8</p><p>Next, make sure you are clear-cut about the KPIs and measure them diligently.</p><p>For example, if you are developing a custom chatbot for customer service,</p><p>you might want to measure against metrics like the resolution rate and</p><p>customer satisfaction.</p><p>And finally, you will need to do an IT assessment. If you have mostly legacy</p><p>systems, then it could be more difficult and expensive to implement AI, even</p><p>if vendors have APIs and integrations. This means you will need to temper</p><p>your expectations.</p><p>Despite all this, the investments can truly move the needle, even for old-line</p><p>companies. To see an example of this, consider Symrise, whose roots go back</p><p>more than 200 years in Germany. As of this writing, the company is a global</p><p>producer of flavors and fragrances, with over 30,000 products.</p><p>A few years ago, Symrise embarked on a major initiative, with the help of IBM,</p><p>to leverage AI to create new perfumes. The company not only had to retool</p><p>its existing IT infrastructure but also had to spend considerable time fine-</p><p>tuning the models. But a big help was that it already had an extensive dataset,</p><p>which allowed for more precision. Note that even a slight deviation in the</p><p>mixture of a compound can make a perfume fail.</p><p>According to Symrise’s president of Scent and Care, Achim Daub:</p><p>Now our perfumers can work with an AI apprentice</p><p>by their side, that can analyze thousands of formulas</p><p>and historical data to identify patterns and predict</p><p>novel combinations, helping to make them more</p><p>productive, and accelerate the design process by</p><p>guiding them toward formulas that have never been</p><p>seen before.9</p><p>8 This is based on the author’s interview, in April 2019, with Erik Schluntz, who is the</p><p>co-founder and CTO at Cobalt Robotics.</p><p>9 www.symrise.com/newsroom/article/breaking-new-fragrance-ground-</p><p>with-artificial-intelligence-ai-ibm-research-and-symrise-are-workin/</p><p>Artificial Intelligence Basics</p><p>http://www.symrise.com/newsroom/article/breaking-new-fragrance-ground-with-artificial-intelligence-ai-ibm-research-and-symrise-are-workin/</p><p>http://www.symrise.com/newsroom/article/breaking-new-fragrance-ground-with-artificial-intelligence-ai-ibm-research-and-symrise-are-workin/</p><p>150</p><p>Forming theTeam</p><p>How large should the initial team be for an AI project? Perhaps a good guide</p><p>is to use Jeff Bezos’ “two pizza rule.”10 In other words, is this enough to feed</p><p>the people who are participating?</p><p>Oh, and there should be no rush to build the team. Everyone must be highly</p><p>focused on success and understand the importance of the project. If there is</p><p>little to show from the AI project, the prospects for future initiatives could be</p><p>in jeopardy.</p><p>The team will need a leader who generally has a business or operational</p><p>background but also has some technical skills. Such a person should be able to</p><p>identify the business case for the AI project but also communicate the vision</p><p>to multiple stakeholders in the company, such as the IT department and</p><p>senior management.</p><p>In terms of the technical people, there will probably not be a need for a PhD</p><p>in AI.While such people are brilliant, they are often focused primarily on</p><p>innovations in the field, such as by refining models or creating new ones.</p><p>These skillsets are usually not essential for an AI pilot.</p><p>Rather, look for those people who have a background in software engineering</p><p>or data science. However, as noted earlier in the chapter, these people may</p><p>not have a strong background in AI.Because of this, there may be a need to</p><p>have them spend a few months of training on learning the core principles of</p><p>machine learning and deep learning. There should also be a focus on</p><p>understanding how to use AI platforms, such as TensorFlow.</p><p>Given the challenges, it may be a good idea to seek the help of consultants,</p><p>who can help identify the AI opportunities but also provide advice on data</p><p>preparation and the development of the models.</p><p>Since an AI pilot will be experimental, the team should have people who are</p><p>willing to take risks and are open minded. If not, progress could be extremely</p><p>difficult.</p><p>The Right Tools andPlatforms</p><p>There are many tools for helping create AI models, and most of them are</p><p>open source. Even though it’s good to test them out, it is still advisable to first</p><p>conduct your IT assessment. By doing this, you should be in a better position</p><p>to evaluate the AI Tools.</p><p>10 www.geekwire.com/2018/amazon-tops-600k-worldwide-employees-</p><p>1st-time-13-jump-year-ago/</p><p>Chapter 8 | Implementation ofAI</p><p>http://www.geekwire.com/2018/amazon-tops-600k-worldwide-employees-1st-time-13-jump-year-ago/</p><p>http://www.geekwire.com/2018/amazon-tops-600k-worldwide-employees-1st-time-13-jump-year-ago/</p><p>151</p><p>Something else: You may realize that your company is already using multiple</p><p>AI Tools and platforms! This may cause issues with integration and the</p><p>management of the process with AI projects. In light of this, a company should</p><p>develop a strategy for the tools. Think of it as your AI Tools stack.</p><p>OK then, let’s take a look at some of the more common languages, platforms,</p><p>and tools for AI.</p><p>Python Language</p><p>Guido van Rossum, who got his master’s degree in mathematics and computer</p><p>science from the University of Amsterdam in 1982, would go on to work at</p><p>various research institutes in Europe like the Corporation for National</p><p>Research Initiatives (CNRI). But it was in the late 1980s that he would create</p><p>his own computer language, called Python. The name actually came from the</p><p>popular British comedy series Monty Python.</p><p>So the language was kind of offbeat—but this made it so powerful. Python</p><p>would soon become the standard for AI development.</p><p>Part of this was due to the simplicity. With just a few scripts of code, you can</p><p>create sophisticated models, say with functions like filter, map, and reduce.</p><p>But of course, the language allows for much sophisticated coding as well.</p><p>Van Rossum developed Python with a clear philosophy:11</p><p>• Beautiful is better than ugly.</p><p>• Explicit is better than implicit.</p><p>• Simple is better than complex.</p><p>• Complex is better than complicated.</p><p>• Flat is better than nested.</p><p>• Sparse is better than dense.</p><p>These are just some of the principles.</p><p>What’s more, Python had the advantage of growing in the academic community,</p><p>which had access to the Internet</p><p>that helped accelerate the distribution. But</p><p>it also made it possible for the emergence of a global ecosystem with thousands</p><p>of different AI packages and libraries. Here are just some:</p><p>11 www.python.org/dev/peps/pep-0020/</p><p>Artificial Intelligence Basics</p><p>http://www.python.org/dev/peps/pep-0020/</p><p>152</p><p>• NumPy: This allows for scientific computing applications.</p><p>At the heart of this is the ability to create a sophisticated</p><p>array of objects at high performance. This is critical for</p><p>high-end data processing in AI models.</p><p>• Matplotlib: With this, you can plot datasets. Often</p><p>Matplotlib is used in conjunction with NumPy/Pandas</p><p>(Pandas refers to “Python Data Analysis Library”). This</p><p>library makes it relatively easy to create data structures</p><p>for developing AI models.</p><p>• SimpleAI: This is an implementation of the AI algorithms</p><p>from the book Artif icial Intelligence: A Modern Approach, by</p><p>Stuart Russel and Peter Norvig. The library not only has</p><p>rich functionality but also provides helpful resources to</p><p>navigate the process.</p><p>• PyBrain: This is a modular machine learning library that</p><p>makes it possible to create sophisticated models—neural</p><p>networks and reinforcement learning systems—without</p><p>much coding.</p><p>• Scikit-Learn: Launched in 2007, this library has a deep</p><p>source of capabilities, allowing for regression, clustering,</p><p>and classification of data.</p><p>Another benefit for Python is that there are many resources for learning.</p><p>A quick search on YouTube will show thousands of free courses.</p><p>Now there are other solid languages you can use for AI like C++, C#, and</p><p>Java. While they are generally more powerful than Python, they are also</p><p>complex. Besides, when it comes to building models, there is often little need</p><p>to create full-fledged applications. And finally, there are Python libraries built</p><p>for high-speed AI machines—with GPUs—like CUDA Python.</p><p>AI Frameworks</p><p>There are a myriad of AI frameworks, which provide end-to-end systems to</p><p>build models, train them, and deploy them. By far the most popular is</p><p>TensorFlow, which is backed by Google. The company started development</p><p>of this framework in 2011, through its Google Brain division. The goal was to</p><p>find a way to create neural networks faster so as to embed the technology</p><p>across many Google applications</p><p>By 2015, Google decided to open source TensorFlow, primarily because the</p><p>company wanted to accelerate the progress of AI.And no doubt, this is what</p><p>happened. By open sourcing TensorFlow, Google made its technology an</p><p>industry standard for development. The software has been downloaded over</p><p>Chapter 8 | Implementation ofAI</p><p>153</p><p>41 million times, and there are more than 1,800 contributors. In fact,</p><p>TensorFlow Lite (which is for embedded systems) is running on more than</p><p>2 billion mobile devices.12</p><p>The ubiquity of the platform has resulted in a large ecosystem. This means</p><p>there are many add-ons like TensorFlow Federated (for decentralized data),</p><p>TensorFlow Privacy, TensorFlow Probability, TensorFlow Agents (for</p><p>reinforcement learning), and Mesh TensorFlow (for massive datasets).</p><p>To use TensorFlow, you have the option of a variety of languages to create</p><p>your models, such as Swift, JavaScript, and R.Although, for the most part, the</p><p>most common one is Python.</p><p>In terms of the basic structure, TensorFlow takes in input data as a</p><p>multidimensional array, which is also known as a tensor. There is a flow to it,</p><p>represented by a chart, as the data courses through the system.</p><p>When you enter commands into TensorFlow, they are processed using a</p><p>sophisticated C++ kernel. This allows for much higher performance, which</p><p>can be essential as some models can be massive.</p><p>TensorFlow can be used for just about anything when it comes to AI.Here are</p><p>some of the models that it has powered:</p><p>• Researchers from NERSC (National Energy Research</p><p>Scientific Computing Center) at the Lawrence Berkeley</p><p>National Laboratory created a deep learning system to</p><p>better predict extreme weather. It was the first such</p><p>model that broke the expo (1 billion billion calculations)</p><p>computing barrier. Because of this, the researchers won</p><p>the Gordon Bell Prize.13</p><p>• Airbnb used TensorFlow to build a model that categorized</p><p>millions of listing photos, which increased the guest</p><p>experience and led to higher conversions.14</p><p>• Google used TensorFlow to analyze data from NASA’s</p><p>Kepler space telescope. The result? By training a neural</p><p>network, the model discovered two exoplanets. Google</p><p>also made available the code to the public.15</p><p>Google has been working on TensorFlow 2.0, and a key focus is to make the</p><p>API process simpler. There is also something called Datasets, which helps to</p><p>streamline the preparation of data for AI models.</p><p>12 https://medium.com/tensorflow/recap-of-the-2019-tensorflow-dev-</p><p>summit-1b5ede42da8d</p><p>13 www.youtube.com/watch?v=p45kQklIsd4&feature=youtu.be</p><p>14 www.youtube.com/watch?v=tPb2u9kwh2w&feature=youtu.be</p><p>15 https://ai.googleblog.com/2018/03/open-sourcing-hunt-for-exoplanets.</p><p>html</p><p>Artificial Intelligence Basics</p><p>https://medium.com/tensorflow/recap-of-the-2019-tensorflow-dev-summit-1b5ede42da8d</p><p>https://medium.com/tensorflow/recap-of-the-2019-tensorflow-dev-summit-1b5ede42da8d</p><p>http://www.youtube.com/watch?v=p45kQklIsd4&feature=youtu.be</p><p>http://www.youtube.com/watch?v=tPb2u9kwh2w&feature=youtu.be</p><p>https://ai.googleblog.com/2018/03/open-sourcing-hunt-for-exoplanets.html</p><p>https://ai.googleblog.com/2018/03/open-sourcing-hunt-for-exoplanets.html</p><p>154</p><p>Then what are some of the other AI frameworks? Let’s take a look:</p><p>• PyTorch: Facebook is the developer of this platform, which</p><p>was released in 2016. Like TensorFlow, the main language</p><p>to program the system is Python. While PyTorch is still in</p><p>the early phases, it is already considered the runner-up to</p><p>TensorFlow in terms of usage. So what is different with</p><p>this platform? PyTorch has a more intuitive interface. The</p><p>platform also allows for dynamic computation of graphs.</p><p>This means you can easily make changes to your models</p><p>in runtime, which helps speed up development. PyTorch</p><p>also makes it possible for having different types of back-</p><p>end CPUs and GPUs.</p><p>• Keras: Even though TensorFlow and PyTorch are for</p><p>experienced AI experts, Keras is for beginners. With a</p><p>small amount of code—in Python—you can create neural</p><p>networks. In the documentation, it notes: “Keras is an</p><p>API designed for human beings, not machines. It puts user</p><p>experience front and center. Keras follows best practices</p><p>for reducing cognitive load: it offers consistent and simple</p><p>APIs, it minimizes the number of user actions required for</p><p>common use cases, and it provides clear and actionable</p><p>feedback upon user error.”16 There is a “Getting Started”</p><p>guide that takes only 30 seconds! Yet the simplicity does</p><p>not mean that it is not powerful. The fact is that you can</p><p>create sophisticated models with Keras. For example,</p><p>TensorFlow has integrated Keras on its own platform.</p><p>Even for those who are pros at AI, the system can be quite</p><p>useful for doing initial experimentations with models.</p><p>With AI development, there is another common tool: Jupyter Notebook. It’s</p><p>not a platform or development tool. Instead, Jupyter Notebook is a web app</p><p>that makes it easy to code in Python and R to create visualizations and import</p><p>AI systems. You can also easily share your work with other people, similar to</p><p>what GitHub does.</p><p>During the past few years, there has also emerged a new category of AI Tools</p><p>called automated machine learning or autoML. These systems help to deal</p><p>with processes like data prep and feature selection. For the most part, the</p><p>goal is to provide help for those organizations that do not have experienced</p><p>data scientists and AI engineers. This is all about the fast-growing trend of the</p><p>“citizen data scientist”—that is, a person who does not have a strong technical</p><p>background who can still create useful models.</p><p>16 https://keras.io/</p><p>Chapter 8 | Implementation ofAI</p><p>https://keras.io/</p><p>155</p><p>Some of the players in the</p><p>autoML space include H2O.ai, DataRobot, and</p><p>SaaS. The systems are intuitive and use drag-and-drop ease with the</p><p>development of models. As should be no surprise, mega tech operators like</p><p>Facebook and Google have created autoML systems for their own teams. In</p><p>the case of Facebook, it has Asimo, which helps manage the training and</p><p>testing of 300,000 models every month.17</p><p>For a use case of autoML, take a look at Lenovo Brazil. The company was</p><p>having difficulty creating machine learning models to help predict and manage</p><p>the supply chain. It had two people who coded 1,500 lines of R code each</p><p>week—but this was not enough. The fact is that it would not be cost-effective</p><p>to hire more data scientists.</p><p>Hence the company implemented DataRobot. By automating various</p><p>processes, Lenovo Brazil was able to create models with more variables,</p><p>which led to better results. Within a few months, the number of users of</p><p>DataRobot went from two to ten.</p><p>Table 8-1 shows some other results.18</p><p>Pretty good, right? Absolutely. But there are still come caveats. With Lenovo</p><p>Brazil, the company had the benefit of skilled data scientists, who understood</p><p>the nuances of creating models.</p><p>However, if you use an autoML tool without such expertise, you could easily</p><p>run into serious trouble. There’s a good chance that you may create models</p><p>that have faulty assumptions or data. If anything, the results may ultimately</p><p>prove far worse than not using AI! Because of this, DataRobot actually requires</p><p>that a new customer have a dedicated field engineer and data scientist work</p><p>with the company for the first year.19</p><p>Now there are also low-code platforms that have proven to be useful in</p><p>accelerating the development of AI projects. One of the leaders in the space</p><p>is Appian, which has the bold guarantee of “Idea to app in eight weeks.”</p><p>17 www.aimlmarketplace.com/technology/machine-learning/the-rise-of-</p><p>automated-machine-learning</p><p>18 https://3gp10c1vpy442j63me73gy3s-wpengine.netdna-ssl.com/wp-content/</p><p>uploads/2018/08/Lenovo-Case-Study.pdf</p><p>19 www.wsj.com/articles/yes-you-too-can-be-an-ai-expert-11554168513</p><p>Table 8-1. The results of implementing an autoML system</p><p>Tasks Before After</p><p>Model creation 4 weeks 3 days</p><p>Production models 2 days 5 minutes</p><p>Accuracy of predictions</p><p>technology. But there should also be a focus on data</p><p>quality. If not, the results will likely be off the mark.</p><p>The second path is to do an AI project, which is based on your company’s</p><p>own data. To be successful, there must be a strong team that has a blend of</p><p>technical, business, and domain expertise. There will also likely be a need for</p><p>some AI training. This is the case even for those with backgrounds in data</p><p>science and engineering.</p><p>From here, there should be no rush in the steps of the project: assessing the</p><p>IT environment, setting up a clear business objective, cleaning the data,</p><p>selecting the right tools and platforms, creating the AI model, and deploying</p><p>the system. With early projects, there will inevitably be challenges so it’s</p><p>critical to be flexible. But the effort should be well worth it.</p><p>Key Takeaways</p><p>• Even the best companies have difficulties with</p><p>implementing AI. Because of this, there must be great</p><p>care, diligence, and planning. It’s also important to realize</p><p>that failure is common.</p><p>• There are two main ways to use AI in a company: through</p><p>a vendor’s software application or an in-house model.</p><p>The latter is much more difficult and requires a major</p><p>commitment from the organization.</p><p>• When using off-the-shelf AI applications, there is still</p><p>much work to be done. For example, if the employees</p><p>are not correctly inputting the data, then the results will</p><p>likely be off.</p><p>• Education is critical with an AI implementation, even for</p><p>experienced engineers. There are excellent online</p><p>training resources to help out with this.</p><p>• Be mindful of the risks of AI implementations, such as</p><p>bias, security, and privacy.</p><p>• Some of the key parts of the AI implementation process</p><p>include the following: identify a problem to solve; put</p><p>together a strong team; select the right tools and</p><p>platforms; create the AI model; and deploy and monitor</p><p>the AI model.</p><p>Chapter 8 | Implementation ofAI</p><p>159</p><p>• When developing a model, look at how the technology</p><p>relates to people. The fact is that people can be much</p><p>better at certain tasks.</p><p>• Forming the team is not easy, so do not rush the process.</p><p>Have a leader who has a good business or operational</p><p>background, with a mix of technical skills.</p><p>• It’s good to experiment with the various AI Tools.</p><p>However, before doing this, make sure you do an IT</p><p>assessment.</p><p>• Some of the popular AI Tools include TensorFlow,</p><p>PyTorch, Python, Keras, and the Jupyter Notebook.</p><p>• Automated machine learning or autoML tools help to</p><p>deal with processes like data prep and feature selection</p><p>for AI models. The focus is on those who do not have</p><p>technical skills.</p><p>• Deployment of the AI model is more than just scaling. It’s</p><p>also critical to have the system easy to use, so as to allow</p><p>for much more adoption.</p><p>Artificial Intelligence Basics</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_9</p><p>C H A P T E R</p><p>9</p><p>The Future ofAI</p><p>The Pros and Cons</p><p>At the Web Summit conference in late 2017, the legendary physicist Stephen</p><p>Hawking offered his opinion about the future of AI.On the one hand, he was</p><p>hopeful that the technology could outpace human intelligence. This would</p><p>likely mean that many horrible diseases will be cured and perhaps there will</p><p>be ways to deal with environmental problems, including climate change.</p><p>But there was the dark side as well. Hawking talked about how the technology</p><p>had the potential to be the “worst event in the history of our civilization.”1</p><p>Just some of the problems include mass unemployment and even killer robots.</p><p>Because of this, he urged for ways to control AI.</p><p>Hawking’s ideas are certainly not on the fringe. Prominent tech entrepreneurs</p><p>like Elon Musk and Bill Gates also have expressed deep worries about AI.</p><p>Yet there are many who are decidedly optimistic, if not exuberant. Masayoshi</p><p>Son, who is the CEO of SoftBank and the manager of the $100 billion Vision</p><p>venture fund, is one of them. In an interview with CNBC, he proclaimed that</p><p>within 30 years, we’ll have flying cars, people will be living much longer, and</p><p>we’ll have cured many diseases.2 He also noted that the main focus of his fund</p><p>is on AI.</p><p>1 www.cnbc.com/2017/11/06/stephen-hawking-ai-could-be-worst-event-in-</p><p>civilization.html</p><p>2 www.cnbc.com/2019/03/08/softbank-ceo-ai-will-completely-change-the-way-</p><p>humans-live-within-30-years.html</p><p>http://www.cnbc.com/2017/11/06/stephen-hawking-ai-could-be-worst-event-in-civilization.html</p><p>http://www.cnbc.com/2017/11/06/stephen-hawking-ai-could-be-worst-event-in-civilization.html</p><p>http://www.cnbc.com/2019/03/08/softbank-ceo-ai-will-completely-change-the-way-humans-live-within-30-years.html</p><p>http://www.cnbc.com/2019/03/08/softbank-ceo-ai-will-completely-change-the-way-humans-live-within-30-years.html</p><p>162</p><p>OK then, who is right? Will the future be dystopian or utopian? Or will it be</p><p>somewhere in the middle? Well, predicting new technologies is exceedingly</p><p>difficult, almost impossible. Here are some examples of forecasts that have</p><p>been wide off the mark:</p><p>• Thomas Edison declared that AC (alternating current)</p><p>would fail.3</p><p>• In his book The Road Ahead (published in late 1995), Bill</p><p>Gates did not mention the Internet.</p><p>• In 2007, Jim Balsillie, the co-CEO of Research in Motion</p><p>(the creator of the BlackBerry device), said that the</p><p>iPhone would get little traction.4</p><p>• In the iconic science fiction movie Blade Runner—</p><p>released in 1982 and was set in 2019—there were many</p><p>predictions that were wrong like phone booths with</p><p>video phones and androids (or “replicants”) that were</p><p>nearly indistinguishable from humans.</p><p>Despite all this, there is one thing that is certain: In the coming years, we’ll see</p><p>lots of innovation and change from AI.This seems inevitable, especially since</p><p>there continues to be huge amounts invested in the industry.</p><p>So then, let’s take a look at some of the areas that are likely to have an</p><p>outsized impact on society.</p><p>Autonomous Cars</p><p>When it comes to AI, one of the most far-reaching areas is autonomous cars.</p><p>Interestingly enough, this category is not really new. Yes, it’s been a hallmark</p><p>of lots of science fiction stories for many decades! But for some time, there</p><p>have been many real-life examples of innovation, like the following:</p><p>• Stanford Cart: Its development started in the early 1960s,</p><p>and the original goal was to create a remote-controlled</p><p>vehicle for moon missions. But the researchers eventually</p><p>changed their focus and developed a basic autonomous</p><p>vehicle, which used cameras and AI for navigation. While</p><p>it was a standout achievement for the era, it was not</p><p>practical as it required more than 10 minutes to plan for</p><p>any move!</p><p>3 www.msn.com/en-us/news/technology/the-best-and-worst-technology-predictions-</p><p>of-all-time/ss-BBIMwm3#image=5</p><p>4 www.recode.net/2017/1/9/14215942/iphone-steve-jobs-apple-ballmer-</p><p>nokia-anniversary</p><p>Chapter 9 | The Future ofAI</p><p>http://www.msn.com/en-us/news/technology/the-best-and-worst-technology-predictions-of-all-time/ss-BBIMwm3#image=5</p><p>http://www.msn.com/en-us/news/technology/the-best-and-worst-technology-predictions-of-all-time/ss-BBIMwm3#image=5</p><p>http://www.recode.net/2017/1/9/14215942/iphone-steve-jobs-apple-ballmer-nokia-anniversary</p><p>http://www.recode.net/2017/1/9/14215942/iphone-steve-jobs-apple-ballmer-nokia-anniversary</p><p>163</p><p>• Ernst Dickmanns: A brilliant German aerospace engineer,</p><p>he would turn his attention to the idea of converting</p><p>a Mercedes van into an autonomous vehicle…in the</p><p>mid-1980s. He wired together cameras, sensors,</p><p>and computers. He also was creative in how he used</p><p>software, such as by only focusing the graphics processing</p><p>on important visual details to save on power. By doing all</p><p>this, he was able to develop a system that would control</p><p>a car’s steering, gas pedal, and brakes. He tested the</p><p>Mercedes on a Paris highway—in 1994—and it went over</p><p>600 miles, with a speed up to 81 MPH.5 Nevertheless, the</p><p>research funding was pulled because it was far from clear</p><p>if</p><p>there could be commercialization in a timely manner.</p><p>It also did not help that AI was entering another winter.</p><p>But the inflection point for autonomous cars came in 2004. The main catalyst</p><p>was the Iraq War, which was taking a horrible toll on American soldiers. For</p><p>DARPA, the belief was that autonomous vehicles could be a solution.</p><p>But the agency faced many tough challenges. This is why it set up a contest,</p><p>dubbed the DARPA Grand Challenge, in 2004, which had a $1 million grand</p><p>prize to encourage wider innovation. The event involved a 150-mile race in</p><p>the Mojave Desert, and unfortunately, it was not encouraging as the cars</p><p>performed miserably. None of them finished the race!</p><p>But this only spurred even more innovation. By the next year, five cars finished</p><p>the race. Then in 2007, the cars were so advanced that they were able to take</p><p>actions like U-turns and merging.</p><p>Through this process, DARPA was able to allow for the creation of the key</p><p>components for autonomous vehicles:</p><p>• Sensors: These include radar and ultrasonic systems that</p><p>can detect vehicles and other obstacles, such as curbs.</p><p>• Video Cameras: These can detect road signs, traffic lights,</p><p>and pedestrians.</p><p>• Lidar (Light Detection and Ranging): This device—which is</p><p>usually at the top of an autonomous car—shoots laser</p><p>beams to measure the surroundings. The data is then</p><p>integrated into existing maps.</p><p>• Computer: This helps with the control of the car, including</p><p>the steering, acceleration, and braking. The system</p><p>leverages AI to learn but also has built-in rules for avoiding</p><p>objects, obeying the laws, and so on.</p><p>5 www.politico.eu/article/delf-driving-car-born-1986-ernst-dickmanns-</p><p>mercedes/</p><p>Artificial Intelligence Basics</p><p>http://www.politico.eu/article/delf-driving-car-born-1986-ernst-dickmanns-mercedes/</p><p>http://www.politico.eu/article/delf-driving-car-born-1986-ernst-dickmanns-mercedes/</p><p>164</p><p>Now when it comes to autonomous cars, there is lots of confusion of what</p><p>“autonomous” really means. Is it when a car drives itself completely alone—</p><p>or must there be a human driver?</p><p>To understand the nuances, there are five levels of autonomy:</p><p>• Level 0: This is where a human controls all the systems.</p><p>• Level 1: With this, computers control limited functions</p><p>like cruise control or braking—but only one at a time.</p><p>• Level 2: This type of car can automate two functions.</p><p>• Level 3: This is where a car automates all the safety functions.</p><p>But the driver can intervene if something goes wrong.</p><p>• Level 4: The car can generally drive itself. But there are</p><p>cases in which a human must participate.</p><p>• Level 5: This is the Holy Grail, in which the car is completely</p><p>autonomous.</p><p>The auto industry is one of the biggest markets, and AI is likely to unleash</p><p>wrenching changes. Consider that transportation is the second largest</p><p>household expenditure, behind housing, and twice as large as healthcare.</p><p>Something else to keep in mind: The typical car is used only about 5% of the</p><p>time as it is usually parked somewhere.6</p><p>In light ofthe enormous opportunity for improvement, it should be no surprise</p><p>that the autonomous car industry has seen massive amounts of investment. This</p><p>has not only been about venture capitalists investing in a myriad of startups but</p><p>also innovation from traditional automakers like Ford, GM, and BMW.</p><p>Then when might we see this industry become mainstream? The estimates</p><p>vary widely. But according to a study from Allied Market Research, the market</p><p>is forecasted to hit $556.67 billion by 2026, which would represent a compound</p><p>annual growth rate of 39.47%.7</p><p>But there is still much to work out. “At best, we are still years away from a</p><p>car that doesn’t require a steering wheel,” said Scott Painter, who is the CEO</p><p>and founder of Fair. “Cars will still need to be insured, repaired, and maintained,</p><p>even if you came back from the future in a Delorean and brought the manual</p><p>for how to make these cars fully autonomous. We make 100 million cars-per-</p><p>year, of which 16 million-a-year are in the U.S.And, supposing you wanted the</p><p>whole supply to have these artificial intelligence features, it would still take 20</p><p>years until we had more cars on the road including all the different levels of</p><p>A.I. versus the number of cars that didn’t have those technologies.”8</p><p>6 www.sec.gov/Archives/edgar/data/1759509/000119312519077391/d633517ds1a.htm</p><p>7 www.alliedmarketresearch.com/autonomous-vehicle-market</p><p>8 From the author’s interview, in May 2019, with Scott Painter, who is the CEO and founder</p><p>of Fair.</p><p>Chapter 9 | The Future ofAI</p><p>http://www.sec.gov/Archives/edgar/data/1759509/000119312519077391/d633517ds1a.htm</p><p>http://www.alliedmarketresearch.com/autonomous-vehicle-market</p><p>165</p><p>But there are many other factors to keep in mind. After all, the fact remains that</p><p>driving is complex, especially in urban and suburban areas. What if a traffic sign</p><p>is changed or even manipulated? How about if an autonomous car must deal</p><p>with a dilemma like having to decide to crash into an oncoming car or plunging</p><p>into a curb, which may have pedestrians? All these are extremely difficult.</p><p>Evening seemingly simple tasks can be tough to pull off. John Krafcik, who is</p><p>the CEO of Google’s Waymo, points out that parking lots are a prime</p><p>example.9 They require finding available spots, avoiding other cars and</p><p>pedestrians (that can be unpredictable), and moving into the space.</p><p>But technology is just one of the challenges with autonomous vehicles. Here</p><p>are some others to consider:</p><p>• Infrastructure: Our cities and towns are built for traditional</p><p>cars. But by mixing autonomous vehicles, there will</p><p>probably be many logistical issues. How does a car</p><p>anticipate the actions of human drivers? Actually, there</p><p>may be a need to install sensors alongside roads. Or</p><p>another option is to have separate roads for autonomous</p><p>vehicles. Governments also will probably need to change</p><p>driver’s ed, providing guidance on how to interact with</p><p>autonomous vehicles while on the road.</p><p>• Regulation: This is a big wild card. For the most part, this</p><p>may be the biggest impediment as governments tend to</p><p>work slowly and are resistant to change. The United</p><p>States is also a highly litigious country—which may be</p><p>another factor that could curb development.</p><p>• Adoption: Autonomous vehicles will probably not be cheap,</p><p>as systems like Lidar are costly. This will certainly be a</p><p>limiting factor. But at the same time, there are indications</p><p>of skepticism from the general public. According to a</p><p>survey from AAA, about 71% of the respondents said</p><p>they are afraid of riding in an autonomous vehicle.10</p><p>Given all this, the initial phase of autonomous vehicles will probably be for</p><p>controlled situations, say for trucking, mining, or shuttles. A case of this is</p><p>Suncor Energy, which uses autonomous trucks for excavating various sites in</p><p>Canada.</p><p>Ride-sharing networks—like Uber and Lyft—may be another starting point.</p><p>These services are fairly structured and understandable to the public.</p><p>9 www.businessinsider.com/waymo-ceo-john-krafcik-explains-big-challenge-</p><p>for-self-driving-cars-2019-4</p><p>10 https://newsroom.aaa.com/2019/03/americans-fear-self-driving-cars-survey/</p><p>Artificial Intelligence Basics</p><p>http://www.businessinsider.com/waymo-ceo-john-krafcik-explains-big-challenge-for-self-driving-cars-2019-4</p><p>http://www.businessinsider.com/waymo-ceo-john-krafcik-explains-big-challenge-for-self-driving-cars-2019-4</p><p>https://newsroom.aaa.com/2019/03/americans-fear-self-driving-cars-survey/</p><p>166</p><p>Keep in mind that Waymo has been testing a self-driving taxi service in</p><p>Phoenix (this is similar to a ride-sharing system like Uber, but the cars have</p><p>autonomous systems). Here’s how a blog post from the company explains it:</p><p>We’ll start by giving riders access to our app. They can use it to call our</p><p>self-driving vehicles 24 hours a day, 7 days a week. They can ride across</p><p>several cities in the Metro Phoenix area, including Chandler, Tempe,</p><p>Mesa, and Gilbert. Whether it’s for a fun night out or just</p><p>to get a break</p><p>from driving, our riders get the same clean vehicles every time and our</p><p>Waymo driver with over 10 million miles of experience on public roads.</p><p>Riders will see price estimates before they accept the trip based on</p><p>factors like the time and distance to their destination.11</p><p>Waymo has found that a key is education because the riders have lots of</p><p>questions. To deal with this, the company has built in a chat system in the app</p><p>to contact a support person. The dashboard of the car also has a screen that</p><p>provides details of the ride.</p><p>According to the blog post, “Feedback from riders will continue to be vital</p><p>every step of the way.”12</p><p>US vs. China</p><p>The rapid ascent of China has been astonishing. Within a few years, the</p><p>economy may be larger than the United States, and a key part of the growth</p><p>will be AI. The Chinese government has set forth the ambitious goal of</p><p>spending $150 billion on this technology through 2030.13 In the meantime,</p><p>there will continue to be major investments from companies like Baidu,</p><p>Alibaba, and Tencent.</p><p>Even though China is often considered to not be as creative or innovative as</p><p>Silicon Valley—often tagged as “copycats”—this perception may prove to be</p><p>a myth. A study from the Allen Institute for Artificial Intelligence highlights</p><p>that China is expected to outrank the United States in the most cited technical</p><p>papers on AI.14</p><p>The country has some other advantages, which AI expert and venture</p><p>capitalist Kai-Fu Lee has pointed out in his provocative book, AI Superpowers:</p><p>China, Silicon Valley, and the New World Order15:</p><p>11 https://medium.com/waymo/riding-with-waymo-one-today-9ac8164c5c0e</p><p>12 Ibid.</p><p>13 www.diamandis.com/blog/rise-of-ai-in-china</p><p>14 www.theverge.com/2019/3/14/18265230/china-is-about-to-overtake-america-</p><p>in-ai-research</p><p>15 New York: Houghton Mifflin Harcourt, 2018.</p><p>Chapter 9 | The Future ofAI</p><p>https://medium.com/waymo/riding-with-waymo-one-today-9ac8164c5c0e</p><p>http://www.diamandis.com/blog/rise-of-ai-in-china</p><p>http://www.theverge.com/2019/3/14/18265230/china-is-about-to-overtake-america-in-ai-research</p><p>http://www.theverge.com/2019/3/14/18265230/china-is-about-to-overtake-america-in-ai-research</p><p>167</p><p>• Enthusiasm: Back in the 1950s, Russia’s launch of Sputnik</p><p>sparked interest in people in the United States to become</p><p>engineers for the space program. Something similar has</p><p>actually happened in China. When the country’s top Go</p><p>player, Ke Jie, lost to the AlphaGo AI system, this was a</p><p>wake-up call. The result is that this has inspired many</p><p>young people to pursue a career in AI.</p><p>• Data: With a population of over 1.3 billion, China is rich</p><p>with data (there are more than 700 million Internet</p><p>users). But the country’s authoritarian government is</p><p>also critical as privacy is not considered particularly</p><p>important, which means there is much more leeway</p><p>when developing AI models. For example, in a paper</p><p>published in Nature Medicine, the Chinese researchers</p><p>had access to data on 600,000 patients to conduct a</p><p>healthcare study.16 While still in the early stages, it</p><p>showed that an AI model was able to effectively diagnose</p><p>childhood conditions like the flu and meningitis.</p><p>• Infrastructure: As a part of the Chinese government’s</p><p>investment plans, there has been a focus on creating</p><p>next-generation cities that allow for autonomous cars</p><p>and other AI systems. There has also been an aggressive</p><p>rollout of 5G networks.</p><p>As for the United States, the government has been much more tentative with</p><p>AI.President Trump has signed an executive order—called the “American AI</p><p>Initiative”—to encourage development of the technology, but the terms are</p><p>vague and it is far from clear how much money will be committed to it.</p><p>Technological Unemployment</p><p>The concept of technological unemployment, which gained notoriety from</p><p>famed economist John Maynard Keynes during the Great Depression, explains</p><p>how innovations can lead to long-term job loss. However, evidence of this has</p><p>been elusive. Notwithstanding the fact that automation has severely impacted</p><p>industries like manufacturing, there is often a transition of the workforce as</p><p>people adapt.</p><p>But could the AI revolution be different? It very well could. For example,</p><p>California Governor Gavin Newsom fears that his state could see massive</p><p>unemployment in areas like trucking and warehousing—and soon.17</p><p>16 www.nature.com/articles/s41591-018-0335-9</p><p>17 www.mercurynews.com/2019/03/18/were-not-prepared-for-the-promise-of-</p><p>artificial-intelligence-experts-warn/</p><p>Artificial Intelligence Basics</p><p>http://www.nature.com/articles/s41591-018-0335-9</p><p>http://www.mercurynews.com/2019/03/18/were-not-prepared-for-the-promise-of-artificial-intelligence-experts-warn/</p><p>http://www.mercurynews.com/2019/03/18/were-not-prepared-for-the-promise-of-artificial-intelligence-experts-warn/</p><p>168</p><p>Here’s another example: Harvest CROO Robotics has built a robot, called</p><p>Harv, that can pick strawberries and other plants without causing bruises.</p><p>Granted, it is still in the experimental phase, but the system is quickly</p><p>improving. The expectation is that one robot will do the work of 30 people.18</p><p>And of course, there will be no wages to pay or labor liability exposure.</p><p>But AI may mean more than replacing low-skilled jobs. There are already signs</p><p>that the technology could have a major impact on white-collar professions.</p><p>Let’s face it, there is even more incentive to automate these jobs because they</p><p>fetch higher compensation.</p><p>Just one category that could face AI job loss is the legal field, as a variety of</p><p>startups are gunning for the market like Lawgood, NexLP, and RAVN ACE.The</p><p>solutions are focused on automating areas such as legal research and contract</p><p>review.19 Even though the systems are far from perfect, they can certainly</p><p>process much more volume than people—and can also get smarter as they</p><p>are used more and more.</p><p>True, the overall job market is dynamic, and there will be new types of careers</p><p>that will be created. There will also likely be AI innovations that are assistive</p><p>for employees—making their job easier to do. For example, software startup</p><p>Measure Square has been able to use sophisticated algorithms to convert</p><p>paper-based floorplans into digitally interactive floorplans. Because of this, it</p><p>has been easier to get projects started and completed on time.</p><p>However, in light of the potential transformative impact of AI, it does seem</p><p>reasonable that there will be an adverse impact on a broad range of industries.</p><p>Perhaps a foreshadowing of this is what happened with job losses from</p><p>manufacturing in the 1960s to 1990s. According to the Pew Research Center,</p><p>there has been virtually no real wage growth in the last 40 years.20 During this</p><p>period, the United States has also experienced a widening gap in wealth.</p><p>Berkeley economist Gabriel Zucman estimates that 0.1% of the population</p><p>controls nearly 20% of the wealth.21</p><p>18 www.washingtonpost.com/news/national/wp/2019/02/17/feature/inside-the-</p><p>race-to-replace-farmworkers-with-robots/</p><p>19 www.cnbc.com/2017/02/17/lawyers-could-be-replaced-by-artificial-</p><p>intelligence.html</p><p>20 www.pewresearch.org/fact-tank/2018/08/07/for-most-us-workers-real-</p><p>wages-have-barely-budged-for-decades/</p><p>21 http://fortune.com/2019/02/08/growing-wealth-inequality-us-study/</p><p>Chapter 9 | The Future ofAI</p><p>https://www.washingtonpost.com/news/national/wp/2019/02/17/feature/inside-the-race-to-replace-farmworkers-with-robots/</p><p>https://www.washingtonpost.com/news/national/wp/2019/02/17/feature/inside-the-race-to-replace-farmworkers-with-robots/</p><p>https://www.cnbc.com/2017/02/17/lawyers-could-be-replaced-by-artificial-intelligence.html</p><p>https://www.cnbc.com/2017/02/17/lawyers-could-be-replaced-by-artificial-intelligence.html</p><p>http://www.pewresearch.org/fact-tank/2018/08/07/for-most-us-workers-real-wages-have-barely-budged-for-decades/</p><p>http://www.pewresearch.org/fact-tank/2018/08/07/for-most-us-workers-real-wages-have-barely-budged-for-decades/</p><p>http://fortune.com/2019/02/08/growing-wealth-inequality-us-study/</p><p>169</p><p>Yet there are actions that can be taken. First of all, governments can look to</p><p>provide education and transition assistance. With the pace of change in</p><p>today’s world, there will need to be ongoing renewal of skills for most people.</p><p>IBM CEO Ginni Rometty has noted that AI will change all jobs within the next</p><p>5–10 years. By the way, her company has seen a 30% reduction of headcount</p><p>in the HR department because of automation.22</p><p>Next, there are some people who advocate basic income, which provides a</p><p>minimum amount of compensation to everyone. This would certainly soften</p><p>some of the inequality, but it also has drawbacks. People definitely get pride</p><p>and satisfaction from their careers. So what might a person’s morale be if he</p><p>or she cannot find a job? It could have a profound impact.</p><p>Finally, there is even talk of some type of AI tax. This would essentially claw</p><p>back the large gains from those companies that benefit from the technology.</p><p>Although, given their power, it probably would be tough to pass this type of</p><p>legislation.</p><p>The Weaponization ofAI</p><p>The Air Force Research Lab is working on prototypes for something called</p><p>Skyborg. It’s right out of Star Wars. Think of Skyborg as R2-D2 that serves as an</p><p>AI wingman for a fighter jet, helping to identify targets and threats.23 The AI</p><p>robot may also be able to take control if the pilot is incapacitated or distracted.</p><p>The Air Force is even looking at using the technology to operate drones.</p><p>Cool, huh? Certainly. But there is a major issue: By using AI, might humans</p><p>ultimately be taken out of the loop when making life-and-death decisions on</p><p>the battlefield? Could this ultimately lead to more bloodshed? Perhaps the</p><p>machines will make the wrong decisions—causing even more problems?</p><p>Many AI researchers and entrepreneurs are concerned. To this end, more</p><p>than 2,400 have signed a statement that calls for a ban of so-called robot</p><p>killers.24</p><p>Even the United Nations is exploring some type of ban. But the United States,</p><p>along with Australia, Israel, the United Kingdom, and Russia, have resisted this</p><p>move.25 As a result, there may be a true AI arms race emerging.</p><p>22 www.cnbc.com/2019/04/03/ibm-ai-can-predict-with-95-percent-accuracy-</p><p>which-employees-will-quit.html</p><p>23 www.popularmechanics.com/military/aviation/a26871027/air-force-ai-</p><p>fighter-plane-skyborg/</p><p>24 www.theguardian.com/science/2018/jul/18/thousands-of-scientists-pledge-</p><p>not-to-help-build-killer-ai-robots</p><p>25 www.theguardian.com/science/2019/mar/29/uk-us-russia-opposing-killer-</p><p>robot-ban-un-ai</p><p>Artificial Intelligence Basics</p><p>http://www.cnbc.com/2019/04/03/ibm-ai-can-predict-with-95-percent-accuracy-which-employees-will-quit.html</p><p>http://www.cnbc.com/2019/04/03/ibm-ai-can-predict-with-95-percent-accuracy-which-employees-will-quit.html</p><p>http://www.popularmechanics.com/military/aviation/a26871027/air-force-ai-fighter-plane-skyborg/</p><p>http://www.popularmechanics.com/military/aviation/a26871027/air-force-ai-fighter-plane-skyborg/</p><p>http://www.theguardian.com/science/2018/jul/18/thousands-of-scientists-pledge-not-to-help-build-killer-ai-robots</p><p>http://www.theguardian.com/science/2018/jul/18/thousands-of-scientists-pledge-not-to-help-build-killer-ai-robots</p><p>http://www.theguardian.com/science/2019/mar/29/uk-us-russia-opposing-killer-robot-ban-un-ai</p><p>http://www.theguardian.com/science/2019/mar/29/uk-us-russia-opposing-killer-robot-ban-un-ai</p><p>170</p><p>According to a paper from the RAND Corporation, there is even the potential</p><p>that the technology could lead to nuclear war, say by the year 2040. How?</p><p>The authors note that AI may make it easier to target submarines and mobile</p><p>missile systems. According to the report:</p><p>Nations may be tempted to pursue first-strike</p><p>capabilities as a means of gaining bargaining leverage</p><p>over their rivals even if they have no intention of</p><p>carrying out an attack, researchers say. This undermines</p><p>strategic stability because even if the state possessing</p><p>these capabilities has no intention of using them, the</p><p>adversary cannot be sure of that.26</p><p>But in the near term, AI will probably have the most impact on information</p><p>warfare, which could still be highly destructive. We got a glimpse of this when</p><p>the Russian government interfered with the 2016 presidential election. The</p><p>approach was fairly low-tech as it used social media troll farms to disseminate</p><p>fake news—but the consequences were significant.</p><p>But as AI gets more powerful and becomes more affordable, we’ll likely see it</p><p>supercharge these kinds of campaigns. For example, deepfake systems can</p><p>easily create life-like photos and videos of people that could be used to quickly</p><p>spread messages.</p><p>Drug Discovery</p><p>The advances in drug discovery have been almost miraculous as we now have</p><p>cures for such intractable diseases like hepatitis C and have continued to</p><p>make strides with a myriad of cancers. But of course, there is certainly much</p><p>that needs to be done. The fact is that drug companies are having more</p><p>troubles coming up with treatments. Here’s just one example: In March 2019,</p><p>Biogen announced that one of its drugs for Alzheimer’s, which was in Phase III</p><p>trials, failed to show meaningful results. On the news, the company’s shares</p><p>plunged by 29%, wiping out $18 billion of market value.27</p><p>Consider that traditional drug development often involves much trial and</p><p>error, which can be time consuming. Then might there be a better way?</p><p>Increasingly, researchers are looking to AI for help. We are seeing a variety of</p><p>startups spring up that are focusing on the opportunity.</p><p>26 www.rand.org/news/press/2018/04/24.html</p><p>27 www.wsj.com/articles/biogen-shares-drop-28-after-ending-</p><p>alzheimers-phase-3-trials-11553170765</p><p>Chapter 9 | The Future ofAI</p><p>http://www.rand.org/news/press/2018/04/24.html</p><p>http://www.wsj.com/articles/biogen-shares-drop-28-after-ending-alzheimers-phase-3-trials-11553170765</p><p>http://www.wsj.com/articles/biogen-shares-drop-28-after-ending-alzheimers-phase-3-trials-11553170765</p><p>171</p><p>One is Insitro. The company, which got its start in 2019, had little trouble</p><p>raising a staggering $100 million in its Series A round. Some of the investors</p><p>included Alexandria Venture Investments, Bezos Expeditions (which is the</p><p>investment firm of Amazon.com’s Jeff Bezos), Mubadala Investment Company,</p><p>Two Sigma Ventures, and Verily.</p><p>Even though the team is relatively small—with about 30 employees—they all</p><p>are brilliant researchers who span areas like data science, deep learning,</p><p>software engineering, bioengineering, and chemistry. The CEO and founder,</p><p>Daphne Koller, has the rare blend of experience in advanced computer science</p><p>and health sciences, having led Google’s healthcare business, Calico.</p><p>As a testament to Insitro’s prowess, the company has already struck a partnership</p><p>with mega drug operator Gilead. It involves potential payments of over $1 billion</p><p>for research on nonalcoholic steatohepatitis (NASH), which is a serious liver</p><p>disease.28 A key is that Gilead has been able to assemble a large amount of data,</p><p>which can train the models. This will be done using cells outside of a person’s</p><p>body—that is, with an invitro system. Gilead has some urgency for looking at</p><p>alternative approaches since one of its NASH treatments, selonsertib, failed in</p><p>its clinical trials (it was for those who had the disease in the later stages).</p><p>The promise of AI is that it will speed up drug discovery because deep learning</p><p>should be able to identify complex patterns. But the technology could also turn</p><p>out to be helpful in developing personalized treatments—such as geared to a</p><p>person’s genetic make-up—which is likely to be critical for curing certain diseases.</p><p>Regardless, it is probably best to temper expectations. There will be major</p><p>hurdles to deal with as the healthcare industry will need to undergo changes</p><p>because there will be increased education for AI. This will take time, and</p><p>there will likely be resistance.</p><p>Next, deep learning is generally a “black box” when it comes to understanding</p><p>how the algorithms really</p><p>to proceed on the basis of the conjecture that every aspect</p><p>of learning or any other feature of intelligence can in principle be so</p><p>precisely described that a machine can be made to simulate it. An</p><p>attempt will be made to find how to make machines use language, form</p><p>abstractions and concepts, solve kinds of problems now reserved for</p><p>humans, and improve themselves. We think that a significant advance</p><p>can be made in one or more of these problems if a carefully selected</p><p>group of scientists work on it together for a summer.5</p><p>At the conference, Allen Newell, Cliff Shaw, and Herbert Simon demoed a</p><p>computer program called the Logic Theorist, which they developed at the</p><p>Research and Development (RAND) Corporation. The main inspiration came</p><p>from Simon (who would win the Nobel Prize in Economics in 1978). When</p><p>he saw how computers printed out words on a map for air defense systems,</p><p>he realized that these machines could be more than just about processing</p><p>numbers. It could also help with images, characters, and symbols—all of which</p><p>could lead to a thinking machine.</p><p>Regarding Logic Theorist, the focus was on solving various math theorems</p><p>from Principia Mathematica. One of the solutions from the software turned</p><p>out to be more elegant—and the co-author of the book, Bertrand Russell,</p><p>was delighted.</p><p>5 www-formal.stanford.edu/jmc/history/dartmouth/dartmouth.html</p><p>Chapter 1 | AI Foundations</p><p>https://www-formal.stanford.edu/jmc/history/dartmouth/dartmouth.html/</p><p>7</p><p>Creating the Logic Theorist was no easy feat. Newell, Shaw, and Simon used</p><p>an IBM 701, which used machine language. So they created a high-level</p><p>language, called IPL (Information Processing Language), that sped up the</p><p>programming. For several years, it was the language of choice for AI.</p><p>The IBM 701 also did not have enough memory for the Logic Theorist. This</p><p>led to another innovation: list processing. It allowed for dynamically allocating</p><p>and deallocating memory as the program ran.</p><p>Bottom line: The Logic Theorist is considered the first AI program ever</p><p>developed.</p><p>Despite this, it did not garner much interest! The Dartmouth conference was</p><p>mostly a disappointment. Even the phrase “artificial intelligence” was criticized.</p><p>Researchers tried to come up with alternatives, such as “complex information</p><p>processing.” But they were not catchy like AI was—and the term stuck.</p><p>As for McCarthy, he continued on his mission to push innovation in</p><p>AI.Consider the following:</p><p>• During the late 1950s, he developed the Lisp</p><p>programming language, which was often used for AI</p><p>projects because of the ease of using nonnumerical</p><p>data. He also created programming concepts like</p><p>recursion, dynamic typing, and garbage collection. Lisp</p><p>continues to be used today, such as with robotics and</p><p>business applications. While McCarthy was developing</p><p>the language, he also co-founded the MIT Artificial</p><p>Intelligence Laboratory.</p><p>• In 1961, he formulated the concept of time-sharing of</p><p>computers, which had a transformative impact on the</p><p>industry. This also led to the development of the Internet</p><p>and cloud computing.</p><p>• A few years later, he founded Stanford’s Artificial</p><p>Intelligence Laboratory.</p><p>• In 1969, he wrote a paper called “Computer-Controlled</p><p>Cars,” in which he described how a person could enter</p><p>directions with a keyboard and a television camera would</p><p>navigate the vehicle.</p><p>• He won the Turing Award in 1971. This prize is considered</p><p>the Nobel Prize for Computer Science.</p><p>Artificial Intelligence Basics</p><p>8</p><p>In a speech in 2006, McCarthy noted that he was too optimistic about the</p><p>progress of strong AI. According to him, “we humans are not very good at</p><p>identifying the heuristics we ourselves use.”6</p><p>Golden Age ofAI</p><p>From 1956 to 1974, the AI field was one of the hottest spots in the tech world.</p><p>A major catalyst was the rapid development in computer technologies. They</p><p>went from being massive systems—based on vacuum tubes—to smaller systems</p><p>run on integrated circuits that were much quicker and had more storage capacity.</p><p>The federal government was also investing heavily in new technologies. Part</p><p>of this was due to the ambitious goals of the Apollo space program and the</p><p>heavy demands of the Cold War.</p><p>As for AI, the main funding source was the Advanced Research Projects</p><p>Agency (ARPA), which was launched in the late 1950s after the shock of</p><p>Russia’s Sputnik. The spending on projects usually came with few requirements.</p><p>The goal was to inspire breakthrough innovation. One of the leaders of ARPA,</p><p>J.C. R.Licklider, had a motto of “fund people, not projects.” For the most</p><p>part, the majority of the funding was from Stanford, MIT, Lincoln Laboratories,</p><p>and Carnegie Mellon University.</p><p>Other than IBM, the private sector had little involvement in AI development.</p><p>Keep in mind that—by the mid-1950s—IBM would pull back and focus on the</p><p>commercialization of its computers. There was actually fear from customers</p><p>that this technology would lead to significant job losses. So IBM did not want</p><p>to be blamed.</p><p>In other words, much of the innovation in AI spun out from academia. For</p><p>example, in 1959, Newell, Shaw, and Simon continued to push the boundaries</p><p>in the AI field with the development of a program called “General Problem</p><p>Solver.” As the name implied, it was about solving math problems, such as the</p><p>Tower of Hanoi.</p><p>But there were many other programs that attempted to achieve some level of</p><p>strong AI. Examples included the following:</p><p>• SAINT or Symbolic Automatic INTegrator (1961): This</p><p>program, created by MIT researcher James Slagle, helped</p><p>to solve freshman calculus problems. It would be updated</p><p>into other programs, called SIN and MACSYMA, that did</p><p>much more advanced math. SAINT was actually the first</p><p>example of an expert system, a category of AI we’ll cover</p><p>later in this chapter.</p><p>6 www.technologyreview.com/s/425913/computing-pioneer-dies/</p><p>Chapter 1 | AI Foundations</p><p>http://www.technologyreview.com/s/425913/computing-pioneer-dies/</p><p>9</p><p>• ANALOGY (1963): This program was the creation of MIT</p><p>professor Thomas Evans. The application demonstrated</p><p>that a computer could solve analogy problems of an IQ</p><p>test.</p><p>• STUDENT (1964): Under the supervision of Minsky at</p><p>MIT, Daniel Bobrow created this AI application for his</p><p>PhD thesis. The system used Natural Language Processing</p><p>(NLP) to solve algebra problems for high school students.</p><p>• ELIZA (1965): MIT professor Joseph Weizenbaum</p><p>designed this program, which instantly became a big hit.</p><p>It even got buzz in the mainstream press. It was named</p><p>after Eliza (based on George Bernard Shaw’s play</p><p>Pygmalion) and served as a psychoanalyst. A user could</p><p>type in questions, and ELIZA would provide counsel (this</p><p>was the first example of a chatbot). Some people who</p><p>used it thought the program was a real person, which</p><p>deeply concerned Weizenbaum since the underlying</p><p>technology was fairly basic. You can find examples of</p><p>ELIZA on the web, such as at http://psych.fullerton.</p><p>edu/mbirnbaum/psych101/Eliza.htm.</p><p>• Computer Vision (1966): In a legendary story, MIT’s Marvin</p><p>Minsky said to a student, Gerald Jay Sussman, to spend</p><p>the summer linking a camera to a computer and getting</p><p>the computer to describe what it saw. He did just that</p><p>and built a system that detected basic patterns. It was the</p><p>first use of computer vision.</p><p>• Mac Hack (1968): MIT professor Richard D.Greenblatt</p><p>created this program that played chess. It was the first to</p><p>play in real tournaments and got a C-rating.</p><p>• Hearsay I (Late 1960s): Professor Raj Reddy developed</p><p>a continuous speech recognition system. Some of his</p><p>students would then go on to create Dragon Systems,</p><p>which became a major tech company.</p><p>During this period, there was a proliferation of AI academic papers and books.</p><p>Some of the topics included Bayesian methods, machine learning, and vision.</p><p>But there were generally two major theories about AI.One was led by Minsky,</p><p>who said that there needed to be symbolic systems. This meant that AI should</p><p>be based on</p><p>work. This could prove difficult in getting regulatory</p><p>approval for new drugs as the FDA focuses on causal relationships.</p><p>Finally, the human body is highly sophisticated, and we still are learning about</p><p>how it works. And besides, as we have seen with innovations like the decoding</p><p>of the Human Genome, it usually takes considerable time to understand new</p><p>approaches.</p><p>As a sign of the complexities, consider the situation of IBM’s Watson. Even</p><p>though the company has some of the most talented AI researchers and has</p><p>spent billions on the technology, it recently announced that it would no longer</p><p>sell Watson for drug discovery purposes.29</p><p>28 www.fiercebiotech.com/biotech/stealthy-insitro-opens-up-starting-</p><p>gilead-deal-worth-up-to-1-05b</p><p>29 https://khn.org/morning-breakout/ups-and-downs-of-artificial-</p><p>intelligence-ibm-stops-sales-development-of-watson-for-drug-discovery-</p><p>hospitals-learn-from-ehrs/</p><p>Artificial Intelligence Basics</p><p>http://www.fiercebiotech.com/biotech/stealthy-insitro-opens-up-starting-gilead-deal-worth-up-to-1-05b</p><p>http://www.fiercebiotech.com/biotech/stealthy-insitro-opens-up-starting-gilead-deal-worth-up-to-1-05b</p><p>https://khn.org/morning-breakout/ups-and-downs-of-artificial-intelligence-ibm-stops-sales-development-of-watson-for-drug-discovery-hospitals-learn-from-ehrs/</p><p>https://khn.org/morning-breakout/ups-and-downs-of-artificial-intelligence-ibm-stops-sales-development-of-watson-for-drug-discovery-hospitals-learn-from-ehrs/</p><p>https://khn.org/morning-breakout/ups-and-downs-of-artificial-intelligence-ibm-stops-sales-development-of-watson-for-drug-discovery-hospitals-learn-from-ehrs/</p><p>172</p><p>Government</p><p>An article from Bloomberg.com in April 2019 caused a big stir. It described a</p><p>behind-the-scenes look at how Amazon.com manages its Alexa speaker AI</p><p>system.30 While much of it is based on algorithms, there are also thousands of</p><p>people who analyze voice clips in order to help make the results better. Often</p><p>the focus is on dealing with the nuances of slang and regional dialects, which</p><p>have been difficult for deep learning algorithms.</p><p>But of course, it’s natural for people to wonder: Is my smart speaker really</p><p>listening to me? Are my conversations private?</p><p>Amazon.com was quick to point out that it has strict rules and requirements.</p><p>But even this ginned up even more concern! According to the Bloomberg.</p><p>com post, the AI reviewers would sometimes hear clips that involved</p><p>potentially criminal activity, such as sexual assault. But Amazon apparently has</p><p>a policy to not interfere.</p><p>As AI becomes more pervasive, we’ll have more of these kinds of stories; and</p><p>for the most part, there will not be clear-cut answers. Some people may</p><p>ultimately decide not to buy AI products. Yet this will probably be a small</p><p>group. Hey, even with the myriad of privacy issues with Facebook, there has</p><p>not been a decline in the user growth.</p><p>More likely, governments will start to wade in with AI issues. A group of</p><p>congresspersons have sponsored a bill, called the Algorithmic Accountability</p><p>Act, which aims to mandate that companies audit their AI systems (it would</p><p>be for larger companies, with revenues over $50 million and more than 1</p><p>million users).31 The law, if enacted, would be enforced by the Federal Trade</p><p>Commission.</p><p>There are also legislative moves from states and cities. In 2019, NewYork</p><p>City passed its own law to require more transparency with AI.32 There are</p><p>also efforts in Washington state, Illinois, and Massachusetts.</p><p>With all this activity, some companies are getting proactive, such as by</p><p>adopting their own ethics boards. Just look at Microsoft. The company’s ethics</p><p>board, called Aether (AI and Ethics in Engineering and Research), decided to</p><p>not allow the use of its facial recognition system for traffic stops in California.33</p><p>30 www.bloomberg.com/news/articles/2019-04-10/is-anyone-listening-to-</p><p>you-on-alexa-a-global-team-reviews-audio</p><p>31 www.theverge.com/2019/4/10/18304960/congress-algorithmic-</p><p>accountability-act-wyden-clarke-booker-bill-introduced-house-senate</p><p>32 www.wsj.com/articles/our-software-is-biased-like-we-are-can-</p><p>new-laws-change-that-11553313609?mod=hp_lead_pos8</p><p>33 www.geekwire.com/2019/policing-ai-task-industry-government-customers/</p><p>Chapter 9 | The Future ofAI</p><p>http://www.bloomberg.com/news/articles/2019-04-10/is-anyone-listening-to-you-on-alexa-a-global-team-reviews-audio</p><p>http://www.bloomberg.com/news/articles/2019-04-10/is-anyone-listening-to-you-on-alexa-a-global-team-reviews-audio</p><p>http://www.theverge.com/2019/4/10/18304960/congress-algorithmic-accountability-act-wyden-clarke-booker-bill-introduced-house-senate</p><p>http://www.theverge.com/2019/4/10/18304960/congress-algorithmic-accountability-act-wyden-clarke-booker-bill-introduced-house-senate</p><p>http://www.wsj.com/articles/our-software-is-biased-like-we-are-can-new-laws-change-that-11553313609?mod=hp_lead_pos8</p><p>http://www.wsj.com/articles/our-software-is-biased-like-we-are-can-new-laws-change-that-11553313609?mod=hp_lead_pos8</p><p>http://www.geekwire.com/2019/policing-ai-task-industry-government-customers/</p><p>173</p><p>In the meantime, we may see AI activism as well, in which people organize to</p><p>protest the use of certain applications. Again, Amazon.com has been the</p><p>target of this, with its Rekognition software that uses facial recognition to</p><p>help law enforcement identify suspects. The ACLU has raised concerns of</p><p>accuracy of the system, especially regarding women and minorities. In one of</p><p>its experiments, it found that Rekognition identified 28 members of the</p><p>Congress as having prior criminal records!34 As for Amazon.com, it has</p><p>disputed the claims.</p><p>Rekognition is only one among various AI applications in law enforcement</p><p>that are leading to controversy. Perhaps the most notable example is COMPAS</p><p>(Correctional Offender Management Profiling for Alternative Sanctions),</p><p>which uses analytics to gauge the probability of someone who may commit a</p><p>crime. The system is often used for sentencing. But the big issue is: Might this</p><p>violate a person’s constitutional right to due process since there is the real</p><p>risk that the AI will be incorrect or discriminatory? Actually, for now, there</p><p>are few good answers. But given the importance AI algorithms will play in our</p><p>justice system, it seems like a good bet that the Supreme Court will be making</p><p>new law.</p><p>AGI (Artificial General Intelligence)</p><p>In Chapter 1, we learned about the difference between strong and weak</p><p>AI.And for the most part, we are in the weak AI phase, in which the technology</p><p>is used for narrow categories.</p><p>As for strong AI, it’s about the ultimate: the ability for a machine to rival a</p><p>human. This is also known as Artificial General Intelligence or AGI.Achieving</p><p>this is likely many years away, perhaps something we may not see until the</p><p>next century or ever.</p><p>But of course, there are some brilliant researchers who believe that AGI will</p><p>come soon. One is Ray Kurzweil, who is an inventor, futurist, bestselling</p><p>author, and director of Engineering at Google. When it comes to AI, he has</p><p>left his imprint on the industry, such as with innovations in areas like text-to-</p><p>speech systems.</p><p>Kurzweil believes that AGI will happen—in which the Turing Test will be</p><p>cracked—in 2019, and then by 2045, there will be the Singularity. This is</p><p>where we’ll have a world of hybrid people: part human, part machine.</p><p>Kind of crazy? Perhaps so. But Kurzweil does have many high-profile followers.</p><p>34 www.businessinsider.com/ai-experts-call-on-amazon-not-to-sell-rekognition-</p><p>software-to-police-2019-4</p><p>Artificial Intelligence Basics</p><p>http://www.businessinsider.com/ai-experts-call-on-amazon-not-to-sell-rekognition-software-to-police-2019-4</p><p>http://www.businessinsider.com/ai-experts-call-on-amazon-not-to-sell-rekognition-software-to-police-2019-4</p><p>174</p><p>But there is much heavy lifting to be done to get to AGI.Even with the great</p><p>strides with deep learning, it still generally requires large amounts of data and</p><p>significant computing power.</p><p>AGI will instead need new approaches, such as the</p><p>traditional computer logic or preprogramming—that is, the use</p><p>of approaches like If-Then-Else statements.</p><p>Artificial Intelligence Basics</p><p>http://psych.fullerton.edu/mbirnbaum/psych101/Eliza.htm</p><p>http://psych.fullerton.edu/mbirnbaum/psych101/Eliza.htm</p><p>10</p><p>Next, there was Frank Rosenblatt, who believed that AI needed to use</p><p>systems similar to the brain like neural networks (this field was also known as</p><p>connectionism). But instead of calling the inner workings neurons, he referred</p><p>to them as perceptrons. A system would be able to learn as it ingested data</p><p>over time.</p><p>In 1957, Rosenblatt created the first computer program for this, called the</p><p>Mark 1 Perceptron. It included cameras to help to differentiate between two</p><p>images (they had 20 × 20 pixels). The Mark 1 Perceptron would use data that</p><p>had random weightings and then go through the following process:</p><p>1. Take in an input and come up with the perceptron output.</p><p>2. If there is not a match, then</p><p>a. If the output should have been 0 but was 1, then the weight for</p><p>1 will be decreased.</p><p>b. If the output should have been 1 but was 0, then the</p><p>weight for 1 will be increased.</p><p>3. Repeat steps #1 and #2 until the results are accurate.</p><p>This was definitely pathbreaking for AI. The New York Times even had a</p><p>write-up for Rosenblatt, extolling “The Navy revealed the embryo of an</p><p>electronic computer today that it expects will be able to walk, talk, see, write,</p><p>reproduce itself and be conscious of its existence.”7</p><p>But there were still nagging issues with the perceptron. One was that the</p><p>neural network had only one layer (primarily because of the lack of computation</p><p>power at the time). Next, brain research was still in the nascent stages and</p><p>did not offer much in terms of understanding cognitive ability.</p><p>Minsky would co-write a book, along with Seymour Papert, called Perceptrons</p><p>(1969). The authors were relentless in attacking Rosenblatt’s approach, and it</p><p>quickly faded away. Note that in the early 1950s Minsky developed a crude</p><p>neural net machine, such as by using hundreds of vacuum tubes and spare</p><p>parts from a B-24 bomber. But he saw that the technology was nowhere at a</p><p>point to be workable.</p><p>Rosenblatt tried to fight back, but it was too late. The AI community quickly</p><p>turned sour on neural networks. Rosenblatt would then die a couple years</p><p>later in a boating accident. He was 43 years old.</p><p>Yet by the 1980s, his ideas would be revived—which would lead to a revolution</p><p>in AI, primarily with the development of deep learning.</p><p>7 www.nytimes.com/1958/07/08/archives/new-navy-device-learns-by-doing-</p><p>psychologist-shows-embryo-of.html</p><p>Chapter 1 | AI Foundations</p><p>http://www.nytimes.com/1958/07/08/archives/new-navy-device-learns-by-doing-psychologist-shows-embryo-of.html</p><p>http://www.nytimes.com/1958/07/08/archives/new-navy-device-learns-by-doing-psychologist-shows-embryo-of.html</p><p>11</p><p>For the most part, the Golden Age of AI was freewheeling and exciting.</p><p>Some of the brightest academics in the world were trying to create machines</p><p>that could truly think. But the optimism often went to the extremes. In</p><p>1965, Simon said that within 20 years, a machine could do anything a human</p><p>could. Then in 1970, in an interview with Life magazine, he said this would</p><p>happen in only 3–8 years (by the way, he was an advisor on the 2001: A</p><p>Space Odyssey movie).</p><p>Unfortunately, the next phase of AI would be much darker. There were more</p><p>academics who were becoming skeptical. Perhaps the most vocal was Hubert</p><p>Dreyfus, a philosopher. In books such as What Computers Still Can’t Do: A</p><p>Critique of Artif icial Reason,8 he set forth his ideas that computers were not</p><p>similar to the human brain and that AI would woefully fall short of the lofty</p><p>expectations.</p><p>AI Winter</p><p>During the early 1970s, the enthusiasm for AI started to wane. It would</p><p>become known as the “AI winter,” which would last through 1980 or so (the</p><p>term came from “nuclear winter,” an extinction event where the sun is blocked</p><p>and temperatures plunge across the world).</p><p>Even though there were many strides made with AI, they still were mostly</p><p>academic and involved in controlled environments. At the time, the computer</p><p>systems were still limited. For example, a DEC PDP-11/45—which was</p><p>common for AI research—had the ability to expand its memory to only 128K.</p><p>The Lisp language also was not ideal for computer systems. Rather, in the</p><p>corporate world, the focus was primarily on FORTRAN.</p><p>Next, there were still many complex aspects when understanding intelligence</p><p>and reasoning. Just one is disambiguation. This is the situation when a word</p><p>has more than one meaning. This adds to the difficulty for an AI program since</p><p>it will also need to understand the context.</p><p>Finally, the economic environment in the 1970s was far from robust. There</p><p>were persistent inflation, slow growth, and supply disruptions, such as with</p><p>the oil crisis.</p><p>Given all this, it should be no surprise that the US government was getting</p><p>more stringent with funding. After all, for a Pentagon planner, how useful is a</p><p>program that can play chess, solve a theorem, or recognize some basic images?</p><p>Not much, unfortunately.</p><p>8 MIT Press, 1972.</p><p>Artificial Intelligence Basics</p><p>12</p><p>A notable case is the Speech Understanding Research program at Carnegie</p><p>Mellon University. For the Defense Advanced Research Projects Agency</p><p>(DARPA), it thought this speech recognition system could be used for fighter</p><p>pilots to make voice commands. But it proved to be unworkable. One of the</p><p>programs, which was called Harpy, could understand 1,011 words—which is</p><p>what a typical 3-year-old knows.</p><p>The officials at DARPA actually thought that it had been hoodwinked and</p><p>eliminated the $3 million annual budget for the program.</p><p>But the biggest hit to AI came via a report—which came out in 1973—from</p><p>Professor Sir James Lighthill. Funded by the UK Parliament, it was a full-on</p><p>repudiation of the “grandiose objectives” of strong AI. A major issue he noted</p><p>was “combinatorial explosion,” which was the problem where the models got</p><p>too complicated and were difficult to adjust.</p><p>The report concluded: “In no part of the field have the discoveries made so</p><p>far produced the major impact that was then promised.”9 He was so pessimistic</p><p>that he did not believe computers would be able to recognize images or beat</p><p>a chess grand master.</p><p>The report also led to a public debate that was televised on the BCC (you can</p><p>find the videos on YouTube). It was Lighthill against Donald Michie, Richard</p><p>Gregory, and John McCarthy.</p><p>Even though Lighthill had valid points—and evaluated large amounts of</p><p>research—he did not see the power of weak AI. But it did not seem to matter</p><p>as the winter took hold.</p><p>Things got so bad that many researchers changed their career paths. And as</p><p>for those who still studied AI, they often referred to their work with other</p><p>terms—like machine learning, pattern recognition, and informatics!</p><p>The Rise andFall ofExpert Systems</p><p>Even during the AI winter, there continued to be major innovations. One was</p><p>backpropagation, which is essential for assigning weights for neural networks.</p><p>Then there was the development of the recurrent neural network (RNN).</p><p>This allows for connections to move through the input and output layers.</p><p>But in the 1980s and 1990s, there also was the emergence of expert systems.</p><p>A key driver was the explosive growth of PCs and minicomputers.</p><p>9 The 1973 “Artificial Intelligence: A General Survey” by Professor Sir James Lighthill of</p><p>Cambridge University, www.bbc.com/timelines/zq376fr.</p><p>Chapter 1 | AI Foundations</p><p>http://www.bbc.com/timelines/zq376fr</p><p>13</p><p>Expert systems were based on the concepts of Minsky’s symbolic logic,</p><p>involving complex pathways. These were often developed by domain experts</p><p>in particular fields like medicine, finance, and auto manufacturing.</p><p>Figure 1-2 shows the key parts of an expert system.</p><p>While there are expert systems that go back to the mid-1960s, they did not</p><p>gain commercial use until the 1980s.</p><p>An example was XCON (eXpert</p><p>CONfigurer), which John McDermott developed at Carnegie Mellon</p><p>University. The system allowed for optimizing the selection of computer</p><p>components and initially had about 2,500 rules. Think of it as the first</p><p>recommendation engine. From the launch in 1980, it turned out to be a big</p><p>cost saver for DEC for its line of VAX computers (about $40 million by 1986).</p><p>When companies saw the success of XCON, there was a boom in expert</p><p>systems—turning into a billion-dollar industry. The Japanese government also</p><p>saw the opportunity and invested hundreds of millions to bolster its home</p><p>market. However, the results were mostly a disappointment. Much of the</p><p>innovation was in the United States.</p><p>Consider that IBM used an expert system for its Deep Blue computer. In</p><p>1996, it would beat grand chess master Garry Kasparov, in one of six matches.</p><p>Deep Blue, which IBM had been developing since 1985, processed 200 million</p><p>positions per second.</p><p>But there were issues with expert systems. They were often narrow and</p><p>difficult to apply across other categories. Furthermore, as the expert systems</p><p>got larger, it became more challenging to manage them and feed data. The</p><p>Figure 1-2. Key parts of an expert system</p><p>Artificial Intelligence Basics</p><p>14</p><p>result was that there were more errors in the outcomes. Next, testing the</p><p>systems often proved to be a complex process. Let’s face it, there were times</p><p>when the experts would disagree on fundamental matters. Finally, expert</p><p>systems did not learn over time. Instead, there had to be constant updates to</p><p>the underlying logic models, which added greatly to the costs and complexities.</p><p>By the late 1980s, expert systems started to lose favor in the business world,</p><p>and many startups merged or went bust. Actually, this helped cause another</p><p>AI winter, which would last until about 1993. PCs were rapidly eating into</p><p>higher-end hardware markets, which meant a steep reduction in Lisp-based</p><p>machines.</p><p>Government funding for AI, such as from DARPA, also dried up. Then again,</p><p>the Cold War was rapidly coming to a quiet end with the fall of the Soviet</p><p>Union.</p><p>Neural Networks andDeep Learning</p><p>As a teen in the 1950s, Geoffrey Hinton wanted to be a professor and to</p><p>study AI. He came from a family of noted academics (his great-great-</p><p>grandfather was George Boole). His mom would often say, “Be an academic</p><p>or be a failure.”10</p><p>Even during the first AI winter, Hinton was passionate about AI and was</p><p>convinced that Rosenblatt’s neural network approach was the right path. So</p><p>in 1972, he received his PhD on the topic from the University of Edinburgh.</p><p>But during this period, many people thought that Hinton was wasting his time</p><p>and talents. AI was essentially considered a fringe area. It wasn’t even thought</p><p>of as a science.</p><p>But this only encouraged Hinton more. He relished his position as an outsider</p><p>and knew that his ideas would win out in the end.</p><p>Hinton realized that the biggest hindrance to AI was computer power. But he</p><p>also saw that time was on his side. Moore’s Law predicted that the number of</p><p>components on a chip would double about every 18 months.</p><p>In the meantime, Hinton worked tirelessly on developing the core theories of</p><p>neural networks—something that eventually became known as deep learning.</p><p>In 1986, he wrote—along with David Rumelhart and Ronald J.Williams—a</p><p>pathbreaking paper, called “Learning Representations by Back-propagating</p><p>Errors.” It set forth key processes for using backpropagation in neural</p><p>networks. The result was that there would be significant improvement in</p><p>accuracy, such as with predictions and visual recognition.</p><p>10 https://torontolife.com/tech/ai-superstars-google-facebook-</p><p>apple-studied-guy/</p><p>Chapter 1 | AI Foundations</p><p>https://torontolife.com/tech/ai-superstars-google-facebook-apple-studied-guy/</p><p>https://torontolife.com/tech/ai-superstars-google-facebook-apple-studied-guy/</p><p>15</p><p>Of course, this did not happen in isolation. Hinton’s pioneering work was</p><p>based on the achievements of other researchers who also were believers in</p><p>neural networks. And his own research spurred a flurry of other major</p><p>achievements:</p><p>• 1980: Kunihiko Fukushima created Neocognitron, which</p><p>was a system to recognize patterns that became the basis</p><p>of convolutional neural networks. These were based on</p><p>the visual cortex of animals.</p><p>• 1982: John Hopfield developed “Hopfield Networks.”</p><p>This was essentially a recurrent neural network.</p><p>• 1989: Yann LeCun merged convolutional networks with</p><p>backpropagation. This approach would find use cases</p><p>with analyzing handwritten checks.</p><p>• 1989: Christopher Watkins’ PhD thesis, “Learning from</p><p>Delayed Rewards,” described Q-Learning. This was a</p><p>major advance in helping with reinforcement learning.</p><p>• 1998: Yann LeCun published “Gradient-Based Learning</p><p>Applied to Document Recognition,” which used descent</p><p>algorithms to improve neural networks.</p><p>Technological Drivers ofModern AI</p><p>Besides advances in new conceptual approaches, theories, and models, AI had</p><p>some other important drivers. Here’s a look at the main ones:</p><p>• Explosive Growth in Datasets: The internet has been a</p><p>major factor for AI because it has allowed for the creation</p><p>of massive datasets. In the next chapter, we’ll take a look</p><p>at how data has transformed this technology.</p><p>• Infrastructure: Perhaps the most consequential company</p><p>for AI during the past 15 years or so has been Google. To</p><p>keep up with the indexing of the Web—which was</p><p>growing at a staggering rate—the company had to come</p><p>up with creative approaches to build scalable systems.</p><p>The result has been innovation in commodity server</p><p>clusters, virtualization, and open source software. Google</p><p>was also one of the early adopters of deep learning, with</p><p>the launch of the “Google Brain” project in 2011. Oh,</p><p>and a few years later the company hired Hinton.</p><p>Artificial Intelligence Basics</p><p>16</p><p>• GPUs (Graphics Processing Units): This chip technology,</p><p>which was pioneered by NVIDIA, was originally for high-</p><p>speed graphics in games. But the architecture of GPUs</p><p>would eventually be ideal for AI as well. Note that most</p><p>deep learning research is done with these chips. The</p><p>reason is that—with parallel processing—the speed is</p><p>multiples higher than traditional CPUs. This means that</p><p>computing a model may take a day or two vs. weeks or</p><p>even months.</p><p>All these factors reinforced themselves—adding fuel to the growth</p><p>of AI.What’s more, these factors are likely to remain vibrant for many</p><p>years to come.</p><p>Structure ofAI</p><p>In this chapter, we’ve covered many concepts. Now it can be tough to understand</p><p>the organization of AI.For instance, it is common to see terms like machine</p><p>learning and deep learning get confused. But it is essential to understand the</p><p>distinctions, which we will cover in detail in the rest of this book.</p><p>But on a high-level view of things, Figure1-3 shows how the main elements of</p><p>AI relate to each other. At the top is AI, which covers a wide variety of</p><p>theories and technologies. You can then break this down into two main</p><p>categories: machine learning and deep learning.</p><p>Figure 1-3. This is a high-level look at the main components of the AI world</p><p>Chapter 1 | AI Foundations</p><p>17</p><p>Conclusion</p><p>There’s nothing new that AI is a buzzword today. The term has seen various</p><p>stomach-churning boom-bust cycles.</p><p>Maybe it will once again go out of favor? Perhaps. But this time around, there</p><p>are true innovations with AI that are transforming businesses. Mega tech</p><p>companies like Google, Microsoft, and Facebook consider the category to be</p><p>a major priority. All in all, it seems like a good bet that AI will continue to</p><p>grow and change our world.</p><p>Key Takeaways</p><p>• Technology often takes longer to evolve than originally</p><p>understood.</p><p>• AI is not just about computer science and mathematics.</p><p>There have been key contributions from fields like</p><p>economics, neuroscience, psychology, linguistics,</p><p>electrical engineering, mathematics, and philosophy.</p><p>• There are two main types</p><p>of AI: weak and strong. Strong</p><p>is where machines become self-aware, whereas weak is</p><p>for systems that focus on specific tasks. Currently, AI is</p><p>at the weak stage.</p><p>• The Turing Test is a common way to test if a machine can</p><p>think. It is based on whether someone really thinks a</p><p>system is intelligent.</p><p>• Some of the key drivers for AI include new theories from</p><p>researchers like Hinton, the explosive growth in data,</p><p>new technology infrastructure, and GPUs.</p><p>Artificial Intelligence Basics</p><p>© Tom Taulli 2019</p><p>T. Taulli, Artif icial Intelligence Basics,</p><p>https://doi.org/10.1007/978-1-4842-5028-0_2</p><p>C H A P T E R</p><p>2</p><p>Data</p><p>The Fuel for AI</p><p>Pinterest is one of the hottest startups in Silicon Valley, allowing users to pin</p><p>their favorite items to create engaging boards. The site has 250 million MAUs</p><p>(monthly active users) and posted $756 million in revenue in 2018.1</p><p>A popular activity for Pinterest is to plan for weddings. The bride-to-be will</p><p>have pins for gowns, venues, honeymoon spots, cakes, invitations, and so on.</p><p>This also means that Pinterest has the advantage of collecting huge amounts</p><p>of valuable data. Part of this helps provide for targeted ads. Yet there are also</p><p>opportunities for email campaigns. In one case, Pinterest sent one that said:</p><p>You’re getting married! And because we love wedding planning—espe-</p><p>cially all the lovely stationery—we invite you to browse our best boards</p><p>curated by graphic designers, photographers and fellow brides-to-be, all</p><p>Pinners with a keen eye and marriage on the mind.2</p><p>The problem: Plenty of the recipients of the email were already married or</p><p>not expecting to marry anytime soon.</p><p>1 www.cnbc.com/2019/03/22/pinterest-releases-s-1-for-ipo.html</p><p>2 www.businessinsider.com/pinterest-accidental-marriage-emails-2014-9</p><p>http://www.cnbc.com/2019/03/22/pinterest-releases-s-1-for-ipo.html</p><p>http://www.businessinsider.com/pinterest-accidental-marriage-emails-2014-9</p><p>20</p><p>Pinterest did act quickly and put out this apology:</p><p>Every week, we email collections of category-specific pins and boards to</p><p>pinners we hope will be interested in them. Unfortunately, one of these</p><p>recent emails suggested that pinners were actually getting married,</p><p>rather than just potentially interested in wedding-related content. We’re</p><p>sorry we came off like an overbearing mother who is always asking when</p><p>you’ll find a nice boy or girl.</p><p>It’s an important lesson. Even some of the most tech-savvy companies</p><p>blow it.</p><p>For example, there are some cases where the data may be spot-on but the</p><p>outcome could still be an epic failure. Consider the case with Target. The</p><p>company leveraged its massive data to send personalized offers to expectant</p><p>mothers. This was based on those customers who made certain types of</p><p>purchases, such as for unscented lotions. Target’s system would create a</p><p>pregnancy score that even provided estimates of due dates.</p><p>Well, the father of one of the customers saw the email and was furious, saying</p><p>his daughter was not pregnant.3</p><p>But she was—and yes, she had been hiding this fact from her father.</p><p>There’s no doubt that data is extremely powerful and critical for AI.But you</p><p>need to be thoughtful and understand the risks. In this chapter, we’ll take a</p><p>look at some of the things you need to know.</p><p>Data Basics</p><p>It’s good to have an understanding of the jargon of data.</p><p>First of all, a bit (which is short for “binary digit”) is the smallest form of data</p><p>in a computer. Think of it as the atom. A bit can either be 0 or 1, which is</p><p>binary. It is also generally used to measure the amount of data that is being</p><p>transferred (say within a network or the Internet).</p><p>A byte, on the other hand, is mostly for storage. Of course, the numbers of</p><p>bytes can get large very fast. Let’s see how in Table2-1.</p><p>3 www.businessinsider.com/the-incredible-story-of-how-target-</p><p>exposed-a-teen-girls-pregnancy-2012-2</p><p>Chapter 2 | Data</p><p>http://www.businessinsider.com/the-incredible-story-of-how-target-exposed-a-teen-girls-pregnancy-2012-2</p><p>http://www.businessinsider.com/the-incredible-story-of-how-target-exposed-a-teen-girls-pregnancy-2012-2</p><p>21</p><p>Data can also come from many different sources. Here is just a sampling:</p><p>• Web/social (Facebook, Twitter, Instagram, YouTube)</p><p>• Biometric data (fitness trackers, genetics tests)</p><p>• Point of sale systems (from brick-and-mortar stores and</p><p>e-commerce sites)</p><p>• Internet of Things or IoT (ID tags and smart devices)</p><p>• Cloud systems (business applications like Salesforce.com)</p><p>• Corporate databases and spreadsheets</p><p>Types ofData</p><p>There are four ways to organize data. First, there is structured data, which is</p><p>usually stored in a relational database or spreadsheet. Some examples include</p><p>the following:</p><p>• Financial information</p><p>• Social Security numbers</p><p>• Addresses</p><p>• Product information</p><p>• Point of sale data</p><p>• Phone numbers</p><p>For the most part, structured data is easier to work with. This data often</p><p>comes from CRM (Customer Relationship Management) and ERP (Enterprise</p><p>Resource Planning) systems—and usually has lower volumes. It also tends to</p><p>Table 2-1. Types of data levels</p><p>Unit Value Use Case</p><p>Megabyte 1,000 kilobytes A small book</p><p>Gigabyte 1,000 megabytes About 230 songs</p><p>Terabyte 1,000 gigabytes 500 hours of movies</p><p>Petabyte 1,000 terabytes Five years of the Earth Observing System (EOS)</p><p>Exabyte 1,000 petabytes The entire Library of Congress 3,000 times over</p><p>Zettabyte 1,000 exabytes 36,000 years of HD-TV video</p><p>Yottabytes 1,000 zettabytes This would require a data center the size of Delaware</p><p>and Rhode Island combined</p><p>Artificial Intelligence Basics</p><p>22</p><p>be more straightforward, say in terms of analysis. There are various BI</p><p>(Business Intelligence) programs that can help derive insights from structured</p><p>data. However, this type of data accounts for about 20% of an AI project.</p><p>The majority will instead come from unstructured data, which is information</p><p>that has no predefined formatting. You’ll have to do this yourself, which can</p><p>be tedious and time consuming. But there are tools like next-generation</p><p>databases—such as those based on NoSQL—that can help with the process.</p><p>AI systems are also effective in terms of managing and structuring the data, as</p><p>the algorithms can recognize patterns.</p><p>Here are examples of unstructured data:</p><p>• Images</p><p>• Videos</p><p>• Audio files</p><p>• Text files</p><p>• Social network information like tweets and posts</p><p>• Satellite images</p><p>Now there is some data that is a hybrid of structured and unstructured</p><p>sources—called semi-structured data. The information has some internal tags</p><p>that help with categorization.</p><p>Examples of semi-structured data include XML (Extensible Markup Language),</p><p>which is based on various rules to identify elements of a document, and JSON</p><p>( JavaScript Object Notation), which is a way to transfer information on the</p><p>Web through APIs (Application Programming Interfaces).</p><p>But semi-structured data represents only about 5% to 10% of all data.</p><p>Finally, there is time-series data, which can be both for structured, unstructured,</p><p>and semi-structured data. This type of information is for interactions, say for</p><p>tracking the “customer journey.” This would be collecting information when a</p><p>user goes to the web site, uses an app, or even walks into a store.</p><p>Yet this kind of data is often messy and difficult to understand. Part of this is</p><p>due to understanding the intent of the users, which can vary widely. There is</p><p>also huge volumes of interactional data, which can involve trillions of data</p><p>points. Oh, and the metrics for success may not be clear. Why is a user doing</p><p>something on the site?</p><p>But AI is likely to be critical for such issues. Although, for the most part, the</p><p>analysis of time-series data is still in the early stages.</p><p>Chapter 2 | Data</p><p>23</p><p>Big Data</p><p>With the ubiquity of Internet access, mobile devices, and wearables, there has</p><p>been the unleashing of a torrent of data. Every second, Google processes</p><p>over 40,000 searches or 3.5 billion a day. On a minute-by-minute basis,</p><p>Snapchat users share 527,760</p><p>photos, and YouTube users watch more than</p><p>4.1 million videos. Then there are the old-fashioned systems, like emails, that</p><p>continue to see significant growth. Every minute, there are 156 million</p><p>messages sent.4</p><p>But there is something else to consider: Companies and machines also</p><p>generate huge sums of data. According to research from Statista, the number</p><p>of sensors will reach 12.86 billion by 2020.5</p><p>In light of all this, it seems like a good bet that the volumes of data will</p><p>continue to increase at a rapid clip. In a report from International Data</p><p>Corporation (IDC) called “Data Age 2025,” the amount of data created is</p><p>expected to hit a staggering 163 zettabytes by 2025.6 This is about ten times</p><p>the amount in 2017.</p><p>To deal with all this, there has emerged a category of technology called Big</p><p>Data. This is how Oracle explains the importance of this trend:</p><p>Today, big data has become capital. Think of some of the world’s biggest</p><p>tech companies. A large part of the value they offer comes from their</p><p>data, which they’re constantly analyzing to produce more efficiency and</p><p>develop new products.7</p><p>So yes, Big Data will remain a critical part of many AI projects.</p><p>Then what exactly is Big Data? What’s a good definition? Actually, there isn’t</p><p>one, even though there are many companies that focus on this market! But</p><p>Big Data does have the following characteristics, which are called the three Vs</p><p>(Gartner analyst Doug Laney came up with this structure back in 20018):</p><p>volume, variety, and velocity.</p><p>4 www.forbes.com/sites/bernardmarr/2018/05/21/how-much-data-do-we-</p><p>create-every-day-the-mind-blowing-stats-everyone-should-</p><p>read/#788c13c660ba</p><p>5 w w w . f o r b e s . c o m / s i t e s / l o u i s c o l u m b u s / 2 0 1 8 / 0 6 / 0 6 / 1 0 -</p><p>charts-that-will-challenge-your-perspective-of-iots-growth/#4e9fac23ecce</p><p>6 h t t p s : / / b l o g . s e a g a t e . c o m / b u s i n e s s / e n o r m o u s - g r o w t h - i n -</p><p>data-is-coming-how-to-prepare-for-it-and-prosper-from-it/</p><p>7 www.oracle.com/big-data/guide/what-is-big-data.html</p><p>8 https://blogs.gartner.com/doug-laney/files/2012/01/ad949-3D-Data-</p><p>Management-Controlling-Data-Volume-Velocity-and-Variety.pdf</p><p>Artificial Intelligence Basics</p><p>http://www.forbes.com/sites/bernardmarr/2018/05/21/how-much-data-do-we-create-every-day-the-mind-blowing-stats-everyone-should-read/#788c13c660ba</p><p>http://www.forbes.com/sites/bernardmarr/2018/05/21/how-much-data-do-we-create-every-day-the-mind-blowing-stats-everyone-should-read/#788c13c660ba</p><p>http://www.forbes.com/sites/bernardmarr/2018/05/21/how-much-data-do-we-create-every-day-the-mind-blowing-stats-everyone-should-read/#788c13c660ba</p><p>http://www.forbes.com/sites/louiscolumbus/2018/06/06/10-charts-that-will-challenge-your-perspective-of-iots-growth/#4e9fac23ecce</p><p>http://www.forbes.com/sites/louiscolumbus/2018/06/06/10-charts-that-will-challenge-your-perspective-of-iots-growth/#4e9fac23ecce</p><p>https://blog.seagate.com/business/enormous-growth-in-data-is-coming-how-to-prepare-for-it-and-prosper-from-it/</p><p>https://blog.seagate.com/business/enormous-growth-in-data-is-coming-how-to-prepare-for-it-and-prosper-from-it/</p><p>http://www.oracle.com/big-data/guide/what-is-big-data.html</p><p>https://blogs.gartner.com/doug-laney/files/2012/01/ad949-3D-Data-Management-Controlling-Data-Volume-Velocity-and-Variety.pdf</p><p>https://blogs.gartner.com/doug-laney/files/2012/01/ad949-3D-Data-Management-Controlling-Data-Volume-Velocity-and-Variety.pdf</p><p>24</p><p>Volume</p><p>This is the scale of the data, which is often unstructured. There is no hard-</p><p>and-fast rule on a threshold, but it is usually tens of terabytes.</p><p>Volume is often a major challenge when it comes to Big Data. But cloud</p><p>computing and next-generation databases have been a big help—in terms of</p><p>capacity and lower costs.</p><p>Variety</p><p>This describes the diversity of the data, say a combination of structured, semi-</p><p>structured, and unstructured data (explained above). It also shows the</p><p>different sources of the data and uses. No doubt, the high growth in</p><p>unstructured data has been a key to the variety of Big Data.</p><p>Managing this can quickly become a major challenge. Yet machine learning is</p><p>often something that can help streamline the process.</p><p>Velocity</p><p>This shows the speed at which data is being created. As seen earlier in this</p><p>chapter, services like YouTube and Snapchat have extreme levels of velocity</p><p>(this is often referred to as a “firehouse” of data). This requires heavy</p><p>investments in next-generation technologies and data centers. The data is</p><p>also often processed in memory not with disk-based systems.</p><p>Because of these issues, velocity is often considered the most difficult when</p><p>it comes to the three Vs. Let’s face it, in today’s digital world, people want</p><p>their data as fast as possible. If it is too slow, people will get frustrated and go</p><p>somewhere else.</p><p>Over the years, though, as Big Data has evolved, there have been more Vs</p><p>added. Currently, there are over ten.</p><p>But here are some of the common ones:</p><p>• Veracity: This is about data that is deemed accurate. In</p><p>this chapter, we’ll look at some of the techniques to</p><p>evaluate veracity.</p><p>• Value: This shows the usefulness of the data. Often this is</p><p>about having a trusted source.</p><p>Chapter 2 | Data</p><p>25</p><p>• Variability: This means that data will usually change over</p><p>time. For example, this is the case with social media</p><p>content that can morph based on overall sentiment</p><p>regarding new developments and breaking news.</p><p>• Visualization: This is using visuals—like graphs—to better</p><p>understand the data.</p><p>As you can see, managing Big Data has many moving parts, which leads to</p><p>complexity. This helps to explain why many companies still use only a tiny</p><p>fraction of their data.</p><p>Databases andOther Tools</p><p>There are a myriad of tools that help with data. At the core of this is the</p><p>database. As should be no surprise, there has been an evolution of this critical</p><p>technology over the decades. But even older technologies like relational</p><p>databases are still very much in use today. When it comes to mission-critical</p><p>data, companies are reluctant to make changes—even if there are clear</p><p>benefits.</p><p>To understand this market, let’s rewind back to 1970, when IBM computer</p><p>scientist Edgar Codd published “A Relational Model of Data for Large Shared</p><p>Data Banks.” It was pathbreaking as it introduced the structure of relational</p><p>databases. Up until this point, databases were fairly complex and rigid—</p><p>structured as hierarchies. This made it time consuming to search and find</p><p>relationships in the data.</p><p>As for Codd’s relational database approach, it was built for more modern</p><p>machines. The SQL script language was easy to use allowing for CRUD</p><p>(Create, Read, Update, and Delete) operations. Tables also had connections</p><p>with primary and foreign keys, which made important connections like the</p><p>following:</p><p>• One-to-One: One row in a table is linked to only one row</p><p>in another table. Example: A driver’s license number,</p><p>which is unique, is associated with one employee.</p><p>• One-to-Many: This is where one row in a table is linked to</p><p>other tables. Example: A customer has multiple purchase</p><p>orders.</p><p>• Many-to-Many: Rows from one table are associated with</p><p>rows of another. Example: Various reports have various</p><p>authors.</p><p>With these types of structures, a relational database could streamline the</p><p>process of creating sophisticated reports. It truly was revolutionary.</p><p>Artificial Intelligence Basics</p><p>26</p><p>But despite the advantages, IBM was not interested in the technology and</p><p>continued to focus on its proprietary systems. The company thought that the</p><p>relational databases were too slow and brittle for enterprise customers.</p><p>But there was someone who had a different opinion on the matter: Larry</p><p>Ellison. He read Codd’s paper and knew it would be a game changer. To prove</p><p>this, he would go on to co-found Oracle in 1977 with a focus on building</p><p>relational databases—which would quickly become a massive market. Codd’s</p><p>paper was essentially a product roadmap for his entrepreneurial</p>
  • gabarito
  • Artigo 1 -
  • Inteligência Artificial na Engenharia
  • Design Thinking
  • Modelo relatório
  • TERMO DE ABERTURA - GRUPO2 IA
  • Análise de Dados e Machine Learning
  • Métodos de Machine Learning
  • IA_para_o_Bem_de_Todos
  • MachineLearning - Part2
  • PROVA 1 - TROCADORES DE CALOR 2018 (corrigida)
  • REDES NEURAIS (3536) Analise as afirmações a seguir: I - “Inicializar pesos para os parâmetros que queremos treinar” é um dos passos do algoritmo...
  • REDES NEURAIS (3536) Análises as afirmações a seguir: I - Memória associativa é uma das características das redes de Hopfiled; II - As redes de H...
  • qual das seguintes caracteristicas e fundamental para o funcionamento de um neuronio artificial em uma rede neuralCapacidade de ajustar os pesos ...
  • Analise as afirmações a seguir: I - “Inicializar pesos para os parâmetros que queremos treinar” é um dos passos do algoritmo backpropagation; II - ...
  • A aprendizagem de máquina oferece diversas abordagens para treinar modelos, dependendo da disponibilidade e do tipo de dados disponíveis. Uma dessa...
  • s sistemas de coordenadas são utilizados para descrever a posição de um determinado objeto ou feição na superfície terrestre, sendo assim, consider...
  • Assinale a alternativa correta.(A) fibrina / colágeno / renina(B) tromboxano A2/colágeno / fibrase(C) fibrinogênio / fibrina / trombina(D) fib...
  • Qual é a melhor opção para o controle da dor?(A) Paracetamol.(B) Dipirona odica.(C) Ibuprofeno.(D) Diclofenaco.(E) Naproxeno.
  • Assinale a alternativa que apresenta uma consequência possível como resultado da combinação desses dois medicamentos.(A) Aumento da pressão arter...
  • Com base no exposto, assinale a alternativa que apresenta o tratamento indicado para os odontomas.(A) Excisão local simples.(B) Enucleação segui...
  • Com base nessas informações, a hipótese diagnóstica dessa lesão é de(A) adenocaremoma.(B) ameloblastoma.(C) tumor odontogênico adenomatoide.(D...
  • Com base nas informações mencionadas, assinale alternativa a que apresenta diagnóstico dessa situação clínica.A) Síndrome do Carcinoma Nevoide Ba...
  • O assoalho da boca compõe o chamado diafragma da boca, com músculos associados acima e abaixo, bem como o espaço delimitado por eles. Na margem pos...
  • Forçar escrita em Maiusculo ou minusculo
  • modelo16

Perguntas dessa disciplina

Grátis

What is the article about?A brief history of Artificial IntelligenceThe definition of Artificial IntelligenceApplications of Artificial Intellig...

Grátis

What is the purpose of Law No. 11.776/2008? A law that establishes the structuring of the Career and Position Plan of the Brazilian Intelligence A...
What is the article about? The article is about the history of artificial intelligence.The article is about the development of artificial intelli...
How did the idea of applying artificial intelligence to social analysis arise? I - The idea of applying artificial intelligence to social analysis...
Boa parte do histórico acerca do Aprendizado de Máquina (Machine Learning) e do Aprendizado Profundo (Deep Learning) se mistura com o histórico de ...
artificial-intelligence-basics-a-non-technical-introduction - Inteligência Artificial (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Neely Ledner

Last Updated:

Views: 5389

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.