Back to homeDigital Culture · High School Year 3 · Physics-Math · Change subject
Start for free
Prep 3 Tech · Digital Culture
Computer systems · Emerging technologies

Artificial intelligence and big data

Your cell phone suggests a bus route that avoids the traffic on Periférico, and your email filter sends a "prize" message straight to spam. Nobody wrote all of those decisions out one by one: the system learned them from millions of examples. How does a computer learn, how do we know whether it learned well, and what risks come with depending on our data? This is the foundation of artificial intelligence and data science, a career-oriented field that you will learn to recognize and analyze critically.

From rules to data: machine learning

Comparison between traditional programming (rules written by a person produce the output) and machine learning (example data produces a model that generates predictions). Traditional programming rules (person) output Machine learning example data model prediction

Traditional programming works when the rules are clear: calculating the 16% VAT (IVA) on a purchase. Machine learning works when the rules are impossible to write by hand: recognizing a face or a voice.

Neural networks

An artificial neural network is a chain of layers of "neurons." Each neuron receives numbers, multiplies them by adjustable weights, adds them up, and passes the result to the next layer. During training the weights are adjusted so that the outputs get closer and closer to the correct answers: that is what it means for the network to "learn."

Simple neural network with an input layer of three nodes, a hidden layer of four nodes, and one output, connected by lines that represent the weights. inputs hidden layer output
Practice★☆☆Not started
Explain in your own words the difference between traditional programming (rules written by a person) and machine learning (rules learned from examples), and give an…

Explain in your own words the difference between traditional programming (rules written by a person) and machine learning (rules learned from examples), and give an application where each approach is more suitable.

Solve
Practice★☆☆Not started
Explain what a 'model' is in machine learning (the patterns and parameters learned from data) and the difference between training it and using it (inference). Why does…

Explain what a 'model' is in machine learning (the patterns and parameters learned from data) and the difference between training it and using it (inference). Why does training require much more computing power than using it?

Solve
Practice★☆☆Not started
Explain with a simple analogy what an artificial neural network is: layers of 'neurons' that combine inputs with adjustable weights. What is adjusted during training and…

Explain with a simple analogy what an artificial neural network is: layers of 'neurons' that combine inputs with adjustable weights. What is adjusted during training and what does it mean for the network to 'learn'?

Solve
Practice★☆☆Not started
Order these three terms from most general to most specific: deep learning, artificial intelligence, machine learning. Explain the inclusion relationship between them…

Order these three terms from most general to most specific: deep learning, artificial intelligence, machine learning. Explain the inclusion relationship between them with an example of each level.

Solve

The chain of a machine learning system

A machine learning system is not just "the model": it is a chain of blocks. For example, an app that recommends bus routes in Guadalajara.

Chain of a machine learning system: data collection, preparation and cleaning, training, evaluation, and use of the model (inference). collectdata prepareand clean train evaluate use(infer)
  • Collect: trips, schedules, GPS data from the buses, traffic.

  • Prepare and clean: remove errors, fill in gaps, convert everything to numbers.

  • Train: the model adjusts its parameters with that prepared data.

  • Evaluate: it is measured with data it has not seen.

  • Use: the model receives new data and predicts.

If the training block is missing, the system has clean data but has not learned anything from it: inside that block the model's parameters are adjusted, and it needs to receive the data already prepared (with its labels, if it is supervised).

Feature engineering

The input variables (also called features) are the data the model receives in order to predict. Feature engineering is the work of selecting which ones are useful, building new ones from the ones available, and transforming them into a form the model can use. It often matters more than the algorithm chosen because the model can only learn from what you show it: with variables unrelated to what you want to predict, not even the most sophisticated algorithm gets it right; with good variables, even a simple one works well.

Practice★☆☆Not started
The figure shows the pipeline of a machine learning system that recommends bus routes, but one of its blocks is covered. Indicate which block is missing, what happens…

The figure shows the pipeline of a machine learning system that recommends bus routes, but one of its blocks is covered. Indicate which block is missing, what happens inside it, and what data it needs to receive from the previous block.

data historical trips, traffic, timetables ? model learned patterns prediction route and time estimated actual results feed into new data
Solve
Practice★☆☆Not started
Name five everyday services that use machine learning today (maps and traffic, translators, video recommenders, voice assistants, spam filters) and state for each one…

Name five everyday services that use machine learning today (maps and traffic, translators, video recommenders, voice assistants, spam filters) and state for each one what input data the model uses.

Solve
Practice★★☆Not started
To predict a building's electricity consumption, propose at least six input variables (outdoor temperature, time of day, weekday or holiday, occupancy, previous day's…

To predict a building's electricity consumption, propose at least six input variables (outdoor temperature, time of day, weekday or holiday, occupancy, previous day's history, solar radiation) and justify each one. Explain what feature engineering is and why it often has a greater impact than the chosen algorithm.

Solve

Types of learning: supervised, unsupervised, and reinforcement

Diagram of the three types of machine learning: supervised with labeled data (spam and not spam), unsupervised with points that cluster without labels, and reinforcement, where an agent acts on an environment and receives a reward. supervised spam not spam with label unsupervised groups without label reinforcement agent environment action reward

Examples of labeled datasets: photo → cat/dog, email → spam/not spam, sensor reading → healthy/faulty. The labels are usually assigned by people (sometimes thousands of them, in poorly paid jobs), and that costs time and money: it is one of the biggest costs of supervised learning.

Classification and regression

Within supervised learning, predicting a category (fracture or not?) is classification; predicting a number (how much will an apartment cost?) is regression.

Practice★☆☆Not started
In supervised learning, what is the label of a data point? Give three examples of labelled datasets (photo → cat/dog, email → spam/not spam, sensor → healthy/faulty) and…

In supervised learning, what is the label of a data point? Give three examples of labelled datasets (photo → cat/dog, email → spam/not spam, sensor → healthy/faulty) and explain who usually produces the labels and what cost it entails.

Solve
Practice★★☆Not started
Explain the difference between supervised, unsupervised, and reinforcement learning, and classify these applications: a spam filter trained with labelled emails,…

Explain the difference between supervised, unsupervised, and reinforcement learning, and classify these applications: a spam filter trained with labelled emails, customer segmentation by buying habits without labels, and a robot learning to walk by trial and error.

Solve
Practice★★☆Not started
Distinguish between a classification problem (predicting a category) and a regression problem (predicting a number). Classify these tasks: estimating the price of a…

Distinguish between a classification problem (predicting a category) and a regression problem (predicting a number). Classify these tasks: estimating the price of a house, deciding whether an X-ray shows a fracture, predicting tomorrow's temperature, and grouping news articles by topic.

Solve

Evaluating a model: overfitting and the confusion matrix

It is detected by comparing errors: a very low error on training and a much higher one on testing is the sign of overfitting.

Cross-validation

With little data, a single split can give a "lucky" estimate (the test turned out easy) or an "unlucky" one (it turned out hard). In cross-validation the data is divided into several parts and the part used for testing is rotated; the final error is the average. That way the estimate depends less on chance.

Confusion matrix

Two-by-two confusion matrix that sets reality against the model's prediction: true negatives and true positives (correct) and false positives and false negatives (errors). confusion matrix model prediction negative positive reality negative positive true negative false positive false negative true positive green: correct · pink: error

Imbalanced datasets

Practice★★☆Not started
A system learns with $80\,\%$ of the data and is evaluated with the remaining $20\,\%$. Explain what the training set and test set are, what overfitting is, and how it…

A system learns with $80\,\%$ of the data and is evaluated with the remaining $20\,\%$. Explain what the training set and test set are, what overfitting is, and how it is detected by comparing errors in both sets.

Solve
Practice★★☆Not started
Explain what cross-validation is (dividing the data into several parts and rotating which one is used for testing) and what problem it solves when data is scarce: why…

Explain what cross-validation is (dividing the data into several parts and rotating which one is used for testing) and what problem it solves when data is scarce: why can a single train/test split yield a 'lucky' or 'unlucky' estimate of the true error?

Solve
Practice★★☆Not started
A fault classifier evaluated on $200$ machines yields the confusion matrix shown in the figure. a) Calculate the precision ($\frac{VP}{VP + FP}$) and recall or…

A fault classifier evaluated on $200$ machines yields the confusion matrix shown in the figure. a) Calculate the precision ($\frac{VP}{VP + FP}$) and recall or sensitivity ($\frac{VP}{VP + FN}$). b) Explain which error is more serious in maintenance (a false negative: an undetected fault) and how you would change the model threshold to reduce it at the expense of more false alarms.

predicts healthy predicts faulty actually healthy actually faulty 140 true negatives 18 false positives 6 false negatives 36 true positives
Solve
Practice★★☆Not started
In bank fraud detection, only one in a thousand transactions is fraudulent. Explain what an imbalanced dataset is, why a model that classifies everything as 'legitimate'…

In bank fraud detection, only one in a thousand transactions is fraudulent. Explain what an imbalanced dataset is, why a model that classifies everything as 'legitimate' achieves $99.9\,\%$ accuracy and is completely useless, and what metrics and techniques are used instead (recall, oversampling the minority class, class weighting).

Solve

Big data: volume, velocity, variety, and their cost

The three Vs of big data: an enormous database (volume), a clock and a stream of data packets arriving nonstop (velocity), and text, image, and sensor as different formats (variety). volume billions of rows velocity data every second variety text, image, sensor

In an urban transportation app: volume = millions of recorded trips; velocity = the GPS position of each bus every few seconds; variety = GPS, payment cards, user reports in text and photos.

Practice★☆☆Not started
Define 'big data' and explain the three classic 'Vs' (volume, velocity, and variety) with an example of each in the context of an urban transport application.

Define 'big data' and explain the three classic 'Vs' (volume, velocity, and variety) with an example of each in the context of an urban transport application.

Solve
Practice★★☆Not started
A municipality installs traffic sensors at $200$ intersections that send a reading every $5$ seconds. a) Estimate the number of readings generated per day and per year.…

A municipality installs traffic sensors at $200$ intersections that send a reading every $5$ seconds. a) Estimate the number of readings generated per day and per year. b) Explain what storage and processing problems they pose and why conventional single-server databases might fall short.

Solve

Environmental footprint: from kWh to CO₂

Training and using a large model consumes electricity in data centers. How much CO₂ does that mean? To find out you need an emission factor.

In addition, the life cycle of an AI system has three phases that weigh on its footprint: manufacturing the hardware (servers, chips) and building the data center, training the model (one large one-time expense), and using the model (inference: a small expense per query, repeated millions of times).

Practice★★★Not started
A tech company decides to train its own 70-billion-parameter language model from scratch in a data center connected to a grid with an emission factor of 0.26 kg CO₂/kWh.…

A tech company decides to train its own 70-billion-parameter language model from scratch in a data center connected to a grid with an emission factor of 0.26 kg CO₂/kWh. The training process requires 1.5 GWh of electrical energy. Once deployed, the service is estimated to handle 20 million queries per day, consuming an additional 0.5 GWh per month during the inference phase.

  1. a) Analyse the three lifecycle phases of this AI system that contribute to its environmental footprint and justify why, over one year of operation, the impact of daily inference can significantly exceed that of the initial training.
  2. b) Calculate the mass of CO₂ (in metric tons) emitted solely during the training phase and compare it with the emissions generated by the first full year of inference.
  3. c) Design three technical engineering measures (at the level of model architecture, weight reuse, and infrastructure selection) that drastically reduce energy consumption without unacceptably degrading the quality of the responses.
Solve

Data, bias, and power: looking at AI with a critical eye

AI and data science are fields with many career opportunities, but a model is only as fair as the data it learns from.

Privacy, data colonialism, and attention

  • Privacy: removing names does not anonymize: combining zip code, date of birth, and sex can re-identify a person when databases are cross-referenced (linkage attack). Health data is especially sensitive.

  • Data colonialism: companies from a few countries extract the data of millions of users in other countries, process it, and capture the value, while the people who generate it have almost no control or benefit.

  • Commodification of attention: many platforms make money from your screen time; their recommenders are optimized to keep you hooked, not necessarily to benefit you.

Practice★★★Not started
A technology company trains a machine learning model to screen resumes of applicants for engineering positions. To avoid discriminatory bias based on socioeconomic…

A technology company trains a machine learning model to screen resumes of applicants for engineering positions. To avoid discriminatory bias based on socioeconomic background, the team excludes the postal code, neighborhood of residence, and nationality from the data. However, during the testing phase, it is detected that candidates from low-income districts are rejected at a rate 73.5 % higher than those from high-income districts with equivalent academic profiles.

  1. a) Technically justify how the model could have inferred socioeconomic background despite having removed direct geographic variables, proposing at least two common variables on a resume that act as proxy variables (proxies).
  2. b) Analyze the ethical and legal implications of this outcome in accordance with European artificial intelligence regulations (risk classification and principle of non-discrimination).
  3. c) Design a pre-deployment algorithmic audit that includes a quantitative fairness metric (fairness) and a mitigation technique to correct the bias.
Solve
Practice★★★Not started
At a conference on digitalization, the following thesis is put forward: "Data is the new oil: it is extracted massively, refined in computing centers and, just like…

At a conference on digitalization, the following thesis is put forward: "Data is the new oil: it is extracted massively, refined in computing centers and, just like crude oil deposits, constitutes a finite natural resource whose exclusive possession guarantees market monopoly."

  1. a) Technically refute this statement by analyzing at least two essential differences between data and a raw material such as oil, paying attention to concepts such as non-rivalry of use, marginal cost of copying, and the dependence on temporal context for its value.
  2. b) Justify in which single aspect of the artificial intelligence value chain the "refining" analogy remains valid.
  3. c) Assess which fundamental rights of citizens (contained in regulations such as the GDPR) prevent treating personal data as an extractive resource of free appropriation by large corporations.
Solve
Practice★★★Not started
A municipality wants a model to 'predict which neighborhoods will have higher crime rates next year'. Critically analyze its feasibility: what historical data exists…

A municipality wants a model to 'predict which neighborhoods will have higher crime rates next year'. Critically analyze its feasibility: what historical data exists (reported incidents: they measure police activity, not actual unrest), what self-fulfilling prophecy it can create (more policing → more reports → more policing), and what alternative use of the data would be more honest and useful.

Solve
Practice★★★Not started
Design at a conceptual level a predictive maintenance system for a city's fleet of boilers: what sensors and data you would collect, what labels supervised learning…

Design at a conceptual level a predictive maintenance system for a city's fleet of boilers: what sensors and data you would collect, what labels supervised learning would require, how you would validate the model, and what decision the system would take upon predicting an imminent breakdown.

Solve
Practice★★★Not started
An online audiovisual content platform has developed a new recommendation algorithm and wants to evaluate whether to replace the current one using an A/B test. The team…

An online audiovisual content platform has developed a new recommendation algorithm and wants to evaluate whether to replace the current one using an A/B test. The team fears that the new model will increase immediate views through sensationalist content (clickbait), but reduce long-term loyalty.

  1. a) Design the experiment by defining user allocation to the two groups, the recommended time duration, and two key quantitative metrics: a primary immediate-impact metric and a secondary or guardrail metric (guardrail metric) to monitor long-term retention.
  2. b) Identify and justify two potential sources of bias or contamination that could invalidate the test results (for example, related to shared account behavior or the novelty effect) and explain how to mitigate them in the experimental design.
  3. c) Following the test, the experimental group records a 14.8 % increase in daily minutes per user, but a 5.2 % drop in weekly active users after one month. Interpret these data and justify what technical and strategic decision the platform should make.
Solve
Practice★★★Not started
The management of a university hospital plans to transfer its database of oncology patients to a company to train a diagnostic neural network. To comply with the law,…

The management of a university hospital plans to transfer its database of oncology patients to a company to train a diagnostic neural network. To comply with the law, the IT team proposes "only removing the first name, surnames, and health card number from each row, while keeping the postal code, full date of birth, sex, admission date, and ICD-10 diagnostic code".

  1. a) Demonstrate why this measure does not constitute true anonymisation, describing how an attacker could re-identify specific patients via a linkage attack using accessible public databases (such as the electoral roll).
  2. b) Distinguish with technical rigour between the concepts of "pseudonymisation" and "anonymisation" according to the GDPR, determining in which of the two states the dataset proposed by the hospital would remain.
  3. c) Design a robust technical alternative to protect patient privacy without destroying the utility of the dataset for training, justifying the use of at least two advanced techniques (such as k-anonymity, aggregation, or differential privacy).
Solve
Practice★★★Not started
In a hospital, two artificial intelligence systems are being evaluated to support emergency triage and stroke detection from neuroimaging: System Alpha: Deep neural…

In a hospital, two artificial intelligence systems are being evaluated to support emergency triage and stroke detection from neuroimaging:

  • System Alpha: Deep neural network with an overall accuracy rate of 97.4 %, but whose internal decision-making process is an uninterpretable mathematical black box.

  • System Beta: Decision tree based on structured clinical rules with an accuracy rate of 89.6 %, fully transparent and auditable step-by-step by specialists.

  1. a) Justify the ethical and deontological dilemma faced by medical staff when choosing one of the systems: is it acceptable to use a model with a lower accuracy rate if it allows understanding the clinical causes of each diagnosis?
  2. b) Analyse the demands posed by the patient and health legislation regarding the right to an understandable explanation and the assignment of liability in the event of a misdiagnosis.
  3. c) Design a technological compromise proposal that combines the high performance of System Alpha with the interpretability guarantees of System Beta, justifying the inclusion of post hoc explainability methods (such as attribution heatmaps) and a mandatory human oversight protocol (human-in-the-loop).
Solve

Back to the beginning: your cell phone suggests routes and your email filters spam because models trained on data learned the patterns; they are useful if they are evaluated properly with test data and if the data does not reproduce biases or violate your privacy.

Summary

See all the exercises in this section