What is AI?

Processing with AI

When computing meets stats...

Artificial Intelligence is a mix between mathematics, logic and statistics from one part and human sciences and neurosciences from another one. Before diving into the world of AI, let's take some time to talk about Computer Science and Statistics. Indeed, AI is mainly a mix between these two domains and most concepts you will see in this course will be easier to understand if we have a look at them separately.

Computer Science

Computer Science is a research domain about computers, algorithms and information.

As the name implies, Computer science is the "science of computers", it's a research domain about everything related to computers, from creating more powerful electronic components, the creation of computer programs to the creation and optimization of algorithms.
An algorithm is a serie of instructions that can be followed to solve a problem, acquire a result or perform a task.

For example, a kitchen recipe is an algorithm! By following each step ("Take 200g of flour", "Mix the ingredients together", "Bake them at 180°C for 20 min") you can make a delicious cake.

Mathematicians used algorithm long before the apparition of the firsts computers, you might know Euclid's algorithm for example.

On a computer, the instructions might be: "Add these two numbers", "Check if this value is above 10", "Wait for user to click on the mouse", etc. An algorithm could be a sorting algorithm, a pathfinder, or a Machine Learning algorithm (more on that later).

As a computer does not directly understand human languages (english, french, etc.), algorithms on a computer are created using a programming language, a language spoken by both developpers and computers.

Coding means writting instructions for a computer using a programming language.

A lot of these programming languages exist and they are choosen depending on the tasks we are trying to accomplish, some of them will be used to create websites, some to develop mobile apps and others to program robots (you probably already know the name of some of them, Python to write computer programs, Javascript to create websites, etc.)

In the early days of Computer Science, that was how "intelligence" was implemented, by writting instructions for a computer to "teach" it how to make certain tasks.

For example, an accounting application might includes how to fill an invoice based on the laws of a given country. Someone with an expertise of the field would have defined rules and code them into a computer program. (i.e. "In France, to go from gross to net price, add 20% or 5.5% depending on the product.")

During this course, you will be working with statistics based algorithms. As you will discover in the following chapters, Artificial Intelligence is mostly computers doing stats.

Statistics

You probably already have a general idea about what statistics are, but let's have a recap and make sure we are on the same page:

Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data.

Wikipedia

Statistics aim to study a phenomenom through the use of data, by taking a sample of the population we want to analyse (for example, you can make a survey to predict voting intentions).

To solve a problem, statisticians will start by gathering data, assess if they are representative enough then draw conclusions from them. Most of the time, statistics are used to infer a new result from the known data, sometimes they can be used to predict how something will behave in the future. One of the tools used for that are models, an (ideal) mathematical representation of how multiple variables are linked together.

A linear regression
On this graph, the red line is a graphical representation of a model made from data about the score obtained on a test. The score of the person taking the test seems to be proportionnal to their age.

On the graph above, the model seems to work pretty well with people from 5 to 60 years old. But it is very important that you do no try to use it outside of this range. This model, a linear regression, is only an extrapolation made from the available data, it is not a magical tool.

As a reminder, in statistics, a simple linear regression is the determination of a line that best approximates a point cloud in the plane. It is used in particular in data analysis to evaluate the relevance of a linear relationship between two statistical variables, and to estimate the strength (coefficients) of such a relationship.

Hence, you can only create model on the data that you have, this is the single most important thing to remember when doing inference (in statistics but also in AI!).

... it creates:

Artificial Intelligence

Artificial Intelligence is, stricly speaking, a field whose goal is to replicate intelligent behavior artificially. This definition might seem obvious but by keeping it in mind you can easily see that a lot of things fall into this definition.

Short digression for 🇫🇷 French readers: while in French "intelligence" is often perceived as a general word to describe the cognitive abilities of someone, in English think more of it as a noun, as you would say "une intelligence".

Let's use Google Maps as an example: Would you say that this app is using AI?
It does fall into the previous definition as it is able to give you the best road depending on several factors (your transportation method, the current traffic, etc.) That's pretty clever! But would you say a sentence like: "I'm using Artificial Intelligence to find the best road to go to Ecully?"

Indeed, Artificial Intelligence is a term that tends to be applied to a lot of things yet to be fully understood. And as soon as people start to understand their working principles another word is used. For example, on social networks we tend to talk about the "Youtube algorithm", while a few years ago we would have said something like: "YouTube is using AI to give the best recommandations".

Finally, as a business school student, you also know how trends can influence the way a company talk about their projects. AI is still a buzzword and a lot of startups tend to use the term in their communication to benefit from the hype. Indeed, according to a recent study, 40% of European "AI startups" are not using AI in their product.

A scoobydoo meme about AI

Machine Learning

Machine Learning, is a subfield of Artificial Intelligence, whose goal is to create algorithms so that a computer will "learn" how to replicate intelligence. While it is possible to create intelligent behaviour by implementing a set of rules (aka. Symbolic AI), Machine Learning will create models from the automated analysis of data.

Machine Learning is at the intersection of Computer Science and Statistics: it uses computers to automatically do complex statistical calcultations.

These models are much more complex and powerful than the simple linear regression we have seen before, but the same rules apply. You need a representative and accurate dataset to have a reliable model.

One of the tool used in Machine Learning that you might have heard of is Neural Networks, it is a type of model that structurally ressembles to a brain. The idea is to create small building blocks, called neurons, that are linked together to form multiple layers of a network. Deep learning algorithms are made of multi-layered neural networks with at least one hidden layer, but we will come back to it later.

Deep Learning is a subfield of Machine Learning, itself a subfield of AI.

Remember that neural networks models are still based on maths and statistics, we are not creating a Frankeinstein! These models are just doing basic additions, comparisons and arithmetics. The "Neural Networks" image is only a nice graphical representation!

Don't get fooled by pictures like this:

An exagerated representation of a neural network

In this course, we will mainly focus on Machine Learning, one of the subfields of Artificial Intelligence. Even if some Artificial Intelligence is not Machine Learning, most modern discoveries, applications and tools about AI are part of Machine Learning. We believe that if you understand what is Machine Learning you will be able to understand what will come in the next 15 years or even more in the AI field. This technical knowledge on the algorithmic part of AI will be put in relation with all the ethical and philosophical considerations which emerge from it, and that must be understood if one wants to use these technologies.

AI nowadays

One of the major things that changed since 2011 is the use of Graphics Processing Unit. A GPU is a type of micro-controller that was originally developed to do calculations for rendering images (mainly video games or movies), because of the way they do maths, they are much faster than traditional CPU when training or using Machine Learning models. Training a model and rendering a video are very similar computations, they are both mainly using matrices. Therefore, it makes sense to use GPU instead of CPU.

Complex models and processing power are great but without data, Machine Learning can't do anything! Another thing that changed recently, is that you can find a lot of datasets, on websites like Kaggle, Google Dataset Search, or even by scraping the huge public database that is the Internet!

Moreover, companies like Facebook or Google decided to release for free and open-source their Machine Learning libraries. Facebook with PyTorch, Google with TensorFlow. Nowadays, you will find a lot of tutorials that tell you how to train a Deep Learning model in less than 10 lines of code by using TensorFlow. Thus making these AI more accessible, while offering these companies the possibility to beta-test their models en masse.

Finally, we are currently living the rise of consumer ready, and no code models. You have most likely already heard of chat-GPT or midjourney, two models being built on deep learning techniques and trained on massive amounts of data. ChatGPT has become increasingly popular due to its ability to generate human-like responses and hold conversations with users, while MidJourney has gained attention for its advanced natural language processing capabilities that allow it to understand complex queries and generate highly relevant responses and images. In addition, no-code AI tools are becoming more and more readily available, making access to complex models very easy. We can expect these tools to become more and more widespread, especially in the corporate world, or in the fields of health, education and customer service.
At the same time, on the business side, the ML Ops profession is becoming more and more integrated within the development teams. This has a positive impact on companies' use of AI by improving the scalability, reliability, and efficiency of their AI systems. While making their model more and more anchored and connected to the uses of the company and its customers.

Sum up


Let's learn more about datasets in the next chapter. The first step in Machine Learning!