Ethical Data Science Course v1.0
Universitat de Barcelona, 2020
Jordi Vitrià
home search input delete warning arrow_forward open_in_new schedule
Exercise: Linear Regression with Synthetic Data Colab exercise, which explores linear regression with a toy dataset. [Colab Notebook](https://colab.research.google.com/github/google/eng-edu/blob/master/ml/cc/exercises/linear_regression_with_synthetic_data.ipynb?utm_source=mlcc&utm_campaign=colab-external&utm_medium=referral&utm_content=linear_regression_synthetic_tf2-colab&hl=en).
Question: Which of the following model's predictions have been affected by selection bias?
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
There is no selection bias in this model; participants who provided training data were a representative sampling of users and were chosen randomly. Instead, this model was affected by reporting bias. Ingestion of unhealthy foods was reported at a much lower frequency than true real-world occurrence.
Pregunta: Which of the following model's predictions have been affected by selection bias?
There is no selection bias in this model; participants who provided training data were a representative sampling of users and were chosen randomly. Instead, this model was affected by reporting bias. Ingestion of unhealthy foods was reported at a much lower frequency than true real-world occurrence.Hola que tal Open Modal anem bé!
def pow(x,y):
a = x
for i in range(2,y+1):
a = a * x
return a
- Seria correcte aquest algorisme?
- Quina complexitat
$O(\cdot)$ tindria (suposant que les multiplicacioms tenen $O(1)$)?
- Ethics of Data: Privacy, transparency, trust...
- Ethics of Algorithms: accountability, auditing, ...
- Ethics of Practices: consent, ...
Exercise: Linear Regression with Synthetic Data Colab exercise, which explores linear regression with a toy dataset. [Colab Notebook](https://colab.research.google.com/github/google/eng-edu/blob/master/ml/cc/exercises/linear_regression_with_synthetic_data.ipynb?utm_source=mlcc&utm_campaign=colab-external&utm_medium=referral&utm_content=linear_regression_synthetic_tf2-colab&hl=en).
Question: Which of the following model's predictions have been affected by selection bias?
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
- Engineers built a model to predict the likelihood of a person developing diabetes based on their daily food intake. The model was trained on 10,000 "food diaries" collected from a randomly chosen group of people worldwide representing a variety of different age groups, ethnic backgrounds, and genders. However, when the model was deployed, it had very poor accuracy. Engineers subsequently discovered that food diary participants were reluctant to admit the true volume of unhealthy foods they ate, and were more likely to document consumption of nutritious food than less healthy snacks.
There is no selection bias in this model; participants who provided training data were a representative sampling of users and were chosen randomly. Instead, this model was affected by reporting bias. Ingestion of unhealthy foods was reported at a much lower frequency than true real-world occurrence.
Pregunta: Which of the following model's predictions have been affected by selection bias?
There is no selection bias in this model; participants who provided training data were a representative sampling of users and were chosen randomly. Instead, this model was affected by reporting bias. Ingestion of unhealthy foods was reported at a much lower frequency than true real-world occurrence.Una possible implementació de l'exponenciació,
def pow(x,y):
a = x
for i in range(2,y+1):
a = a * x
return a
- Seria correcte aquest algorisme?
- Quina complexitat
$O(\cdot)$ tindria (suposant que les multiplicacioms tenen $O(1)$)?
This is example page of the API doc style created Aras Pranckevičius at Unity for Morgan McGuire's Markdeep and now part of the official Markdeep distro. It uses content that could be an imaginary documentation page. Here would be some introduction text.
La recursió
-
ha d'haver-hi un o més casos base: són condicions de les dades que es resolen directament, sense que calgui una nova crida al programa
-
a cada crida recursiva ens apropem a un dels casos base: ja sigui perquè es decrementa una variable, perquè es redueix una llista...
D'una manera simplificada podríem dir que els algorismes recursius segueixen el patró:
def recursiu(x):
if x=cas_final:
return VALOR
else:
return CRIDA_RECURSIVA(x reduïda)+Calculs
!!! Error: Compte amb la recusió. No feu mai més de 100 crides recursives d'un programa!
$$f(x) = 23$$
From the root folder, run "thing" with the target name, e.g.: thing Yes
- On Mac, Linux or Windows PowerShell, you'll want to use
./thinginstead of justthing. - Target and option names are case sensitive!
- Several things to do can be specified:
thing Yes No FileNotFound
Additional options can be passed via -sNAME=VALUE arguments. Most common ones are CONFIG
(used to indicate debug or release thing) and PLATFORM (used to indicate 32 vs 64 bit thing).
| Thing Name | Description | Notes |
|---|---|---|
| Yes | Yup! | |
| No | Nope :( | |
| FileNotFound | Doesn't find files | Pass -sFIND_FILE=maybe to maybe find them |
Regular styling like bold, italics, strikethrough, inline code, the stuff.
- A
- Bullet
- List
And:
- A
- Numbered
- List!
Symbol substitutions: a 45-degree turn; som x -> y arrows; some whoa ==> fancy <==> arrows.
Is this a definition list? : Looks like one to me Is that right? : Possibly!
And a code listing:
# Substitueix la comanda pass pel teu codi
def era1(n):
import math
pass
Markdeep diagrams:
******************************************* Here's a text to the right of the diagram,
- +-----------------+ .-. * ain't that fancy. Pretty fancy indeed, I
- |\ | .-+ | * must say! Markdeep diagrams are generally
- | \ A-B *---+- .--+ '--. * enclosed into a rectangle full made of
* - | \ | | Cloud! | * symbols; and are "drawn" using ASCII-art
- +---+-------------+ '-------------' * style, with
- | + / \ * oetc. ******************************************* Suh-weet!
Another random diagram, just because:
- +-+-+-+-*-o *
- / / ^ / *
- / v / / *
- +-+-+-+ *
!!! Note Hey I'm a note. Don't mind me, I'm just sitting here.
!!! WARNING I'm a warning, perhaps. Something might happen!
And other admonitions:
!!! Error: Never Pass nullptr to a Shader
Invoking a shader with a null argument can seg fault.
This is a multi-line admonition.
Seriously, don't call shaders like that.
The table of contents that Markdeep produces is stuffed on the right side, if the browser window is wide enough. Otherwise it is hidden.
[Previous Page](deep2.html)
[Next Page](deep2.html)