AI review and prediction

CatégorieClasse
StatutPréparé

Using AI during assessment and term

Fundamentals

Big Data

AI

What is AI

Artificial intelligence refers to a set of techniques and computer systems capable of imitating certain functions of human intelligence.

These systems use algorithms, that is, sequences of mathematical instructions, to analyze data and gradually adapt.

Yes, absolutely. We can rephrase it as follows:

Like any application, artificial intelligence, in order to work, needs:

What makes it particular is that AI can learn from data and adapt its responses. But in itself, it remains a computer application.

Machine Learning (ML) and Deep Learning (DL) are subcategories of artificial intelligence — specific techniques used in AI software programs.

What is Machine learning

Machine Learning (or "apprentissage automatique" in French) is an artificial intelligence technique that allows a program to learn from data, without being manually programmed for each situation.

What it needs to learn:

What is Deep learning

Deep Learning (DL) is an advanced form of Machine Learning that uses deep artificial neural networks, inspired by the human brain.

Création des logiciels de ML ou DL

We use libraries that allow us to create a program using a Machine Learning or Deep Learning technique.

These are software tools (code libraries) that make it possible to create machine learning or deep learning programs.

LibraryTypeUsage
Scikit-learnMachine LearningFor simple models: regression, decision trees, k-means…
TensorFlowDeep Learning (and ML)To build neural networks, GPU training, etc.
PyTorchDeep Learning (and ML)Same as TensorFlow, often preferred for research
KerasDeep Learning InterfaceBuilt on TensorFlow, easier to use
XGBoostMachine LearningSpecialized in very powerful tree-based models

Historical

Alan Turing (1912–1954)

John McCarthy (1927–2011)

Marvin Minsky, Allen Newell, and Herbert Simon

Linear regression and prediction

Machine Learning Technique

Linear regression is a simple and powerful form of Machine Learning.

It is used to predict numerical values based on explanatory variables.

Excel Exercise

Understand how a machine can predict a value from past examples.

Answer Key

Enter the data

Température (°C),Nombre de locations
23.720337598183118,127.24604997951064
27.879734159310487,131.97702059248803
25.069084401791095,148.04296824883153
23.622079574922424,103.56674112862447
20.591369983472617,103.41443509037755
26.147352826666403,128.86492563307365
20.939680281567313,120.02619355142114
32.29432501955199,176.1652127967628
34.09156901252573,172.00731931959783
19.58603797064444,101.71181504924394
29.793125952066614,140.08777228403193
23.22237299382261,96.30390028687377
24.201114027348307,117.52644864348001
33.139915957316525,167.26306947762242
11.775901454947174,71.18241408201308
12.178232492538518,72.91496095053671
10.505459936008142,48.65403150596119
30.81549613869845,151.0544531877389
29.453918773746263,136.7840642180604
31.750303706170477,144.55133915906265
34.4654585558191,155.26459087284536
29.97896410541809,169.40257447940834
21.5369840563233,102.58839846409995
29.513229407161386,143.18540401969506
12.956860646723332,52.256349633117395
25.998025533188095,137.76503122425956
13.58383218522616,51.78018245055129
33.616722926239596,165.95621182905828
23.04620804375179,106.27637460682219
20.36654849976309,105.70176747740808

Clean the data

Create the chart

Add the trendline

Read the equation

Use the equation to predict

Prediction using the regression formula

Explanation

It is an equation that links two variables by finding the best “straight line” that comes closest to all the points.

The method called “least squares” finds the line that minimizes the distance between:

Steps:

  1. It analyzes all the points in your table.
  1. It calculates a line that comes closest to all the points.
  1. It adjusts the slope (coefficient) and the intercept (constant) to minimize the errors.
  1. It also calculates R², which indicates how well the line fits the data (0 to 1).

R2

R², or the coefficient of determination, is a statistical indicator that measures how well a regression model explains the data.

R² ValueInterpretation
1The model perfectly explains the data
0.9The model explains 90% of the variation
0.5The model is moderately reliable
0The model explains nothing at all
< 0The model is worse than a random model (rare but possible)

Concrete example

If we have:

And R² = 0.90

This means that 90% of the variations in the number of rentals are related to temperature.

The model is therefore very good.

Exhibition review

Game : https://mi.hepl.ch/sites/io/ressources.html