SlideShare ist ein Scribd-Unternehmen logo
1 von 35
How good is your prediction?
Quantifying uncertainty in Machine Learning predictions
PyData London 2019 (12th- 14th July)
Maria Navarro
Outline
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Motivating example
How good is your prediction?
Problem To find out whether a car is a total lo
To do it we have:
1. A set of historical observations ๐‘ฅ1; ๐‘ฆ1 , โ‹ฏ , ๐‘ฅ ๐‘; ๐‘ฆ ๐‘ , where:
โ€ข ๐‘ฅ๐‘– describes the accident by age of the driver, model of the car, etc.
โ€ข ๐‘ฆ๐‘– is a label which identifies whether the car is reparable or not
2. A machine learning algorithm (h ๐‘ฅ = ๐‘ฆ)
PROBLEM: To find out whether a car is a total loss or not
Motivating example
How good is your prediction, REALLY?
A new accident, ๐‘ฅ ๐‘+1, occurs. We run our model, and we obtain the following results:
1. The car is classified as total loss
2. The probability of total loss according to our model is 0.85
3. The model is roughly 91% accurate in training, test and validation sets, so we expect same
behaviour in production data
4. The model has an AUC of 0.88 in training, so again that is what we expect in production data
What do these measurements mean?
Do we have any guarantee about accident ๐‘ฅ ๐‘+1?
Are we confident about the prediction?
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Introduction to conformal predictions
Why Conformal Predictions (CP) ?
1. There are several ad hoc ways to obtain some confidence around your predictions (resampling
methods, assume normality, etc.)
2. Conformal predictions assumes very little about the outcome you are trying to predict. It only
assume exchangeability.
3. It can be used with any machine learning algorithm.
4. It provides error bounds at a confidence level that we can select.
5. Probabilities are well-calibrated.
6. It is easy to implement.
7. The framework has been proven:
V. Vovk, A. Gammerman, G. Shafer
Algorithmic learning in a random walk, Springer 2005.
Introduction to conformal predictions
General idea
โ€ข Let ๐‘ be a probability distribution.
โ€ข f z โ†’ โ„ some function.
โ€ข We draw 5 samples from the distribution ๐‘ and apply ๐‘“ ๐‘ง :
๏ƒ˜ ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘–, with ๐‘– = 1, โ€ฆ , 5
๏ƒ˜ For simplicity, we assume ๐›ผ1 โ‰ค ๐›ผ2 โ‰ค ๐›ผ3 โ‰ค ๐›ผ4 โ‰ค ๐›ผ5
โ€ข We estimate the cumulative distribution function (CDF) for the scores:
0 0.2 0.4 0.6 0.8 1
๐›ผ1 ๐›ผ2 ๐›ผ3 ๐›ผ4 ๐›ผ5
โ€ข We draw a new sample from z โˆˆ ๐‘. We assume exchangeability and compute ๐‘“ ๐‘ง = ๐›ผ.
โ€ข We can estimate its probability: ๐‘ƒ ๐›ผ โ‰ค ๐›ผ4 = 0.6 and ๐‘ƒ ๐›ผ โ‰ค ๐›ผ2 = 0.2
Introduction to conformal predictions
Relation to our problem
โ€ข Let ๐‘ง๐‘– = ๐‘ฅ๐‘–; ๐‘ฆ๐‘– with ๐‘– = 1, โ€ฆ , ๐‘ be a sample of the probability distribution, ๐‘ = ๐‘‹, ๐‘Œ , where:
๏ƒ˜ ๐‘ฅ๐‘– is our observables and ๐‘ฆ๐‘– the target we want to predict
โ€ข We define ๐‘“ ๐‘ง๐‘– = ๐‘ฆ๐‘– โˆ’ โ„Ž ๐‘ฅ๐‘– , where:
๏ƒ˜ โ„Ž ๐‘ฅ๐‘– is a regression model train on ๐‘ง๐‘– with ๐‘– = 5, โ€ฆ , ๐‘
โ€ข We apply ๐‘“ ๐‘ง to the 5 remaining samples
๏ƒ˜ ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘–, with ๐‘– = 1, โ€ฆ , 5
๏ƒ˜ We can compute the exact values 0.10 โ‰ค 0.13 โ‰ค 0.28 โ‰ค 0.30 โ‰ค 0.38
โ€ข We estimate the cumulative distribution function (CDF) for the scores:
0 0.2 0.4 0.6 0.8 1
0.10 0.13 0.28 0.30 0.38
โ€ข We draw a new sample from z โˆˆ ๐‘. We assume exchangeability and compute ๐‘“ ๐‘ง = ๐‘ฆ โˆ’ โ„Ž ๐‘ฅ = ๐‘ฆ โˆ’ 2 .
โ€ข We can estimate its probability:
๏ƒ˜ ๐‘ƒ ๐‘ฆ โˆ’ 2 โ‰ค 0.30 = 0.6 and ๐‘ƒ ๐‘ฆ โˆ’ 2 โ‰ค 0.28 = 0.4
๏ƒ˜ ๐‘ƒ ๐‘ฆ โˆˆ 2 ยฑ 0.30 = 0.6 and ๐‘ƒ ๐‘ฆ โˆˆ 2 ยฑ 0.30 = 0.4
๏ƒ˜ ๐‘ฆ ๐œ– 1.7, 2.3 with probability 0.6
Introduction to conformal predictions
Inputs for conformal predictions
โ€ข A set of training examples ๐‘ง๐‘– = ๐‘ฅ๐‘–, ๐‘ฆ๐‘– with ๐‘– = 1, โ€ฆ , ๐‘ƒ
๏ƒ˜ They must be drawn from an exchangeable distribution (the order of observations is
irrelevant).
โ€ข A non-conformity function ๐‘“ ๐‘ง โ†’ โ„
๏ƒ˜ It measures the โ€œweirdnessโ€ of an example ๐‘ฅ๐‘–, ๐‘ฆ๐‘–
๏ƒ˜ It should give low scores to similar examples ๐‘ฅ๐‘–, ๐‘ฆ๐‘– and high scores to different ones
๐‘ฅ๐‘–, ยฌ๐‘ฆ๐‘–
๏ƒ˜ Common choice is take some function of the underlying model, but it can be anything: the
probability estimate for correct class, distance to neighbours with same class, probability from
the trees, absolute error of a regression model, etc.
โ€ข Set a significance level ๐›† โˆˆ (0,1), so 1 โˆ’ ๐œ€ confidence level
Introduction to conformal predictions
How does conformal predictions work?
โ€ข Divide training set into two disjoint sets: ๐‘๐‘ก with ๐‘๐‘ก = ๐‘š and ๐‘ ๐‘ with ๐‘ ๐‘ = ๐‘›, ๐‘š + ๐‘› = ๐‘
โ€ข Build the underlying model, โ„Ž, using ๐‘๐‘ก
โ€ข Apply ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘– to the elements of the set you did not use for training โ„Ž , and estimate its probability
distribution ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› ~ ๐‘„
โ€ข If a new example comes in ๐‘ฅ, โ„Ž ๐‘ฅ = ๐‘ฆ , then we will reject ๐‘ฆ
๏ƒ˜ We will reject ๐‘ฆ if ๐‘“ (๐‘ฅ, ๐‘ฆ) = ๐›ผ ๐‘ฆ does not belong to ๐‘„
โ€ข We compute the non-conformity degree which is called p-value as follows:
๐‘ ๐‘ฆ=
๐‘ง ๐‘— ๐œ– ๐‘ ๐‘โˆถ ๐›ผ ๐‘— โ‰ฅ ๐›ผ ๐‘ฆ
๐‘›+1
, ๐‘ ๐‘ฆ is the p-value
โ€ข Finally the prediction region:
ฮ“ ๐œ€
= ๐‘ฆ ๐œ– ๐‘Œ: ๐‘ ๐‘ฆ > ๐œ€
Is ๐’š a very non-conforming example?
Introduction to conformal predictions
Conformal prediction output
The prediction region ฮ“ ๐œ€
contains prediction ๐‘ฆ with probability 1 โˆ’ ๐œ€
๏ƒ˜ In classification :
๏ƒผ ๐›ผ ๐‘ฆ is know, but we need to compute ๐‘ ๐‘ฆ
๏ƒผ The result is a set of labels:
ฮ“ ๐œ€
= ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 1, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 3, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 5 s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€
= 1 โˆ’ ๐œ€
o If ฮ“ ๐œ€
= โˆ… , then always erroneous
o If ฮ“ ๐œ€
= ๐ถ (only one class), then always true (if it is the correct class)
o If ฮ“ ๐œ€
= ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 1, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 3, โ€ฆ , ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 5 (several classes), then always correct
๏ƒ˜ In regression is an interval:
๏ƒผ ๐‘ ๐‘ฆ is know, but we need to compute ๐›ผ ๐‘ฆ
๏ƒผ The result is an interval:
ฮ“ ๐œ€
= ๐‘Ž, ๐‘ where ๐‘Ž, ๐‘ โˆˆ โ„ and s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€
= 1 โˆ’ ๐œ€
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Conformal predictions in classification
Algorithm to compute conformal prediction regions in classification problems
Let ๐‘ = ๐‘‹, ๐‘Œ be the historical data set for our classification problem, where:
๏ƒ˜ ๐‘ = ๐‘, ๐‘‹ is the information about the problem and ๐‘Œ = ๐ถ1 , โ€ฆ , ๐ถ๐‘  set of labels.
๏ƒ˜ ๐‘ is exchangeable.
To obtain the prediction region:
1. Divide ๐‘ into two disjoint sets:
๏ƒผ ๐‘๐‘ก proper training set with ๐‘๐‘ก = ๐‘š
๏ƒผ ๐‘ ๐‘ calibration set with ๐‘ ๐‘ = ๐‘›
2. Fit a classifier, โ„Ž ๐‘‹ = ๐‘Œ, using ๐‘๐‘ก
3. Define a non-conformity function ๐‘“ ๐‘ง to measure the weirdness of your samples
4. Apply ๐‘“ ๐‘ง to each element in ๐‘ ๐‘ to obtain the calibration scores: ๐›ผ1, โ€ฆ , ๐›ผ ๐‘›
5. Set a significance level ๐œ€ ๐œ– 0, 1
Conformal predictions in classification
Algorithm to compute conformal predictions in classification problems
6. For a new sample ๐‘ฅ, ๐‘ฆ compute the scoring value for each label in ๐‘Œ:
โˆ€ ๐ถ๐‘– ๐œ– ๐‘Œ ๐‘“ ๐‘ฅ, ๐‘ฆ = ๐ถ๐‘– = ๐›ผ ๐ถ ๐‘–
7. For each label in ๐‘Œ compute the p-value as follows:
โˆ€ ๐ถ๐‘– ๐œ– ๐‘Œ ๐‘ ๐ถ ๐‘–
=
๐‘ง ๐‘— ๐œ– ๐‘ ๐‘โˆถ ๐›ผ ๐‘— โ‰ฅ๐›ผ ๐ถ ๐‘–
๐‘›+1
8. Finally build the prediction region as follows:
ฮ“ ๐œ€
= ๐ถ๐‘– ๐œ– ๐‘Œ: ๐‘ ๐ถ ๐‘–
> ๐œ€ , then
for the new prediction โ„Ž ๐‘ฅ = ๐‘ฆ, ๐‘ƒ ๐‘ฆ ๐œ– ฮ“ ๐œ€
= 1 โˆ’ ฮต
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Conformal predictions in regression
Algorithm to compute conformal prediction regions in regression problems
Let ๐‘ = ๐‘‹, ๐‘Œ be the historical data set for our classification problem, where:
๏ƒ˜ ๐‘ = ๐‘, ๐‘‹ is the information about the problem and ๐‘Œ a continuous target.
๏ƒ˜ ๐‘ is exchangeable.
To obtain the prediction region:
1. Divide ๐‘ into two disjoint sets:
๏ƒผ ๐‘๐‘ก proper training set with ๐‘๐‘ก = ๐‘š
๏ƒผ ๐‘ ๐‘ calibration set with ๐‘ ๐‘ = ๐‘›
2. Fit a regression model, โ„Ž ๐‘‹ = ๐‘Œ, using ๐‘๐‘ก
3. Define a non-conformity function ๐‘“ ๐‘ง to measure the weirdness of your samples
4. Apply ๐‘“ ๐‘ง to each element in ๐‘ ๐‘ to obtain the calibration scores: ๐›ผ1, โ€ฆ , ๐›ผ ๐‘›
5. Set a significance level ๐œ€ ๐œ– 0, 1
Conformal predictions in regression
Algorithm to compute conformal predictions in regression problems
6. Sort calibrations scores ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› in a descending order
7. Compute the index ๐‘  = ๐œ€ ๐‘› + 1
๏ƒ˜ This is the index of the (1 โˆ’ ฮต)-percentile of the non-conformity score ๐›ผ ๐‘ 
8. Finally the prediction region for a new sample:
ฮ“ ๐œ€
= โ„Ž ๐‘ฅ๐‘– ยฑ ๐›ผ ๐‘ , with ๐‘ƒ โ„Ž(๐‘ฅ๐‘–)๐œ– ฮ“ ๐œ€
= 1 โˆ’ ฮต
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Application
Classification with conformal predictors
โ€ข The dataset is imbalanced (Total Loss is the minority class)
โ€ข The model is XGBoost
โ€ข Model performance:
โ€ข A new accident happens the model says it is a Total Loss, but how confident we are?
โ€ข Due to business restrictions we have to minimize the number false positives in TL
PROBLEM: To find out whether a car is a total loss or not
Application
Classification with conformal predictors
โ€ข We take the test set, ๐‘๐‘ก๐‘’๐‘ ๐‘ก = (๐‘ฅ๐‘–, ๐‘ฆ๐‘–) with ๐‘– = 1, โ€ฆ , ๐‘€
โ€ข We define a non-conformity function:
๐‘“ ๐‘ง =
๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– + ๐‘๐‘Ž๐‘™๐‘–๐‘๐‘Ÿ๐‘Ž๐‘ก๐‘’๐‘‘ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘–
2
where:
๏ƒ˜ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– according to the model that ๐‘ฆ = ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘–
๏ƒ˜ ๐‘๐‘Ž๐‘™๐‘–๐‘๐‘Ÿ๐‘Ž๐‘ก๐‘’๐‘‘ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– recalibrated probability that ๐‘ฆ = ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘–
Application
Classification with conformal predictors
โ€ข Let us assume ๐‘€ = 9 and apply ๐‘“ ๐‘ง to each ๐‘ง๐‘– ๐œ– ๐‘๐‘ก๐‘’๐‘ ๐‘ก
โ€ข We order the scores, and use them to compute the p-value per label for the new accident:
TL = 0.85 p-value TL = 8/(9+1) = 0.8 > ๐œ€ = 0.05
Non-TL = 0.15 p-value non-TL = 2/(9+1) = 0.2 > ๐œ€ = 0.05
ฮ“ ๐œ€
= ๐‘‡๐ฟ, ๐‘›๐‘œ๐‘› โˆ’ ๐‘‡๐ฟ s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€
= 0.95
Application
Classification with conformal predictors
Application
Classification with conformal predictions
Application
Regression with conformal predictors
โ€ข The dataset is not correctly label there were some inconsistencies.
โ€ข The model is XGBoost.
โ€ข Model performance:
โ€ข The model output was the input to another model
PROBLEM: to compute/find out the price of a car
Application
Regression with conformal predictions
Application
Regression with conformal predictions
Application
Regression with conformal predictors
โ€ข We take the test set, ๐‘๐‘ก๐‘’๐‘ ๐‘ก = (๐‘ฅ๐‘–, ๐‘ฆ๐‘–) with ๐‘– = 1, โ€ฆ , ๐‘€
โ€ข We define a non-conformity function:
๐‘“ ๐‘ง = ๐‘ฆ โˆ’ โ„Ž(๐‘ฅ)
where:
๏ƒ˜ ๐‘ฆ is the true value, and โ„Ž(๐‘ฅ) the model prediction
โ€ข Let us assume ๐‘€ = 9 and apply ๐‘“ ๐‘ง to each ๐‘ง๐‘– ๐œ– ๐‘๐‘ก๐‘’๐‘ ๐‘ก
โ€ข We order in descending order
โ€ข We set ๐œ€ = 0.2, then the index of the score ๐‘  = 0.2 โˆ™ 9 + 1 = 2 ๐›ผ ๐‘ =2
โ€ข The fixed width conformal interval would be: โ„Ž(๐‘ฅ) ยฑ 189.52
Application
Regression with conformal predictions
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
Summary and conclusions
Take away
โ€ข Good model performance does not mean trustable predictions.
โ€ข Conformal predictions is a useful tool with different applications.
โ€ข It is easy to understand and to implement.
โ€ข Define a non-conformity function is not always easy.
โ€ข Confident areound predictions bring some
Motivating example
Introduction to conformal predictions
Conformal predictions in classification
Conformal predictions in regression
Application
Summary and conclusions
References
References
Some publications
References
Some interesting readings
1. V. Vovk, A. Gammerman, G. Shafer, Algorithm learning in a random walk, Springer, 2005.
2. H. Linusson, An introduction to conformal predictions, 2017.
3. V. Vovk, Cross-conformal predictors, Annals of Mathematics and Artificial Intelligence, 1-20, 2013.
4. U. Johannsson, H. Bostrom, T. Lofstrom, H. Linusson, Regression conformal predictors with
random forest, Machine Learning, 95, 155-176, 2014.
5. V. Balasubramanian, S-S. Ho, V. Vovk, Conformal predictions for reliable machine learning, Science
Direct Journal and Book, 2014.
How is your prediction? Quantifying uncertainty in Machine Learning
predictions
Questions

Weitere รคhnliche Inhalte

ร„hnlich wie Py data19 final

Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models ananth
ย 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxajondaree
ย 
Machine learning ( Part 1 )
Machine learning ( Part 1 )Machine learning ( Part 1 )
Machine learning ( Part 1 )Sunil OS
ย 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptxHadrian7
ย 
Estimating Causal Effects from Observations
Estimating Causal Effects from ObservationsEstimating Causal Effects from Observations
Estimating Causal Effects from ObservationsAntigoni-Maria Founta
ย 
MACHINE LEARNING.pptx
MACHINE LEARNING.pptxMACHINE LEARNING.pptx
MACHINE LEARNING.pptxSOURAVGHOSH623569
ย 
Domain adaptation: A Theoretical View
Domain adaptation: A Theoretical ViewDomain adaptation: A Theoretical View
Domain adaptation: A Theoretical ViewChia-Ching Lin
ย 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdfgadissaassefa
ย 
Machine Learning Application: Credit Scoring
Machine Learning Application: Credit ScoringMachine Learning Application: Credit Scoring
Machine Learning Application: Credit Scoringeurosigdoc acm
ย 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validationgmorishita
ย 
MLU_DTE_Lecture_2.pptx
MLU_DTE_Lecture_2.pptxMLU_DTE_Lecture_2.pptx
MLU_DTE_Lecture_2.pptxRahulChaudhry15
ย 
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithminventionjournals
ย 
Machine learning introduction lecture notes
Machine learning introduction lecture notesMachine learning introduction lecture notes
Machine learning introduction lecture notesUmeshJagga1
ย 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
ย 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
ย 
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...MM - KBAC: Using mixed models to adjust for population structure in a rare-va...
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...Golden Helix Inc
ย 
EMOD_Optimization_Presentation.pptx
EMOD_Optimization_Presentation.pptxEMOD_Optimization_Presentation.pptx
EMOD_Optimization_Presentation.pptxAliElMoselhy
ย 
Learning machine learning with Yellowbrick
Learning machine learning with YellowbrickLearning machine learning with Yellowbrick
Learning machine learning with YellowbrickRebecca Bilbro
ย 
Sarcia idoese08
Sarcia idoese08Sarcia idoese08
Sarcia idoese08asarcia
ย 

ร„hnlich wie Py data19 final (20)

ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
ย 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
ย 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptx
ย 
Machine learning ( Part 1 )
Machine learning ( Part 1 )Machine learning ( Part 1 )
Machine learning ( Part 1 )
ย 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
ย 
Estimating Causal Effects from Observations
Estimating Causal Effects from ObservationsEstimating Causal Effects from Observations
Estimating Causal Effects from Observations
ย 
MACHINE LEARNING.pptx
MACHINE LEARNING.pptxMACHINE LEARNING.pptx
MACHINE LEARNING.pptx
ย 
Domain adaptation: A Theoretical View
Domain adaptation: A Theoretical ViewDomain adaptation: A Theoretical View
Domain adaptation: A Theoretical View
ย 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdf
ย 
Machine Learning Application: Credit Scoring
Machine Learning Application: Credit ScoringMachine Learning Application: Credit Scoring
Machine Learning Application: Credit Scoring
ย 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
ย 
MLU_DTE_Lecture_2.pptx
MLU_DTE_Lecture_2.pptxMLU_DTE_Lecture_2.pptx
MLU_DTE_Lecture_2.pptx
ย 
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
ย 
Machine learning introduction lecture notes
Machine learning introduction lecture notesMachine learning introduction lecture notes
Machine learning introduction lecture notes
ย 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
ย 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
ย 
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...MM - KBAC: Using mixed models to adjust for population structure in a rare-va...
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...
ย 
EMOD_Optimization_Presentation.pptx
EMOD_Optimization_Presentation.pptxEMOD_Optimization_Presentation.pptx
EMOD_Optimization_Presentation.pptx
ย 
Learning machine learning with Yellowbrick
Learning machine learning with YellowbrickLearning machine learning with Yellowbrick
Learning machine learning with Yellowbrick
ย 
Sarcia idoese08
Sarcia idoese08Sarcia idoese08
Sarcia idoese08
ย 

Kรผrzlich hochgeladen

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
ย 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
ย 
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”soniya singh
ย 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
ย 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
ย 
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€fhwihughh
ย 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
ย 
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ208367051
ย 
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”DelhiRS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhijennyeacort
ย 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
ย 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
ย 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
ย 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]๐Ÿ“Š Markus Baersch
ย 
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”น
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”นไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”น
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”นyuu sss
ย 
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€F sss
ย 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
ย 
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
ย 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
ย 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
ย 

Kรผrzlich hochgeladen (20)

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
ย 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
ย 
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls in Defence Colony Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
ย 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
ย 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
ย 
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏ็บฝ็บฆๅคงๅญฆๆฏ•ไธš่ฏ(NYUๆฏ•ไธš่ฏไนฆ๏ผ‰ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ย 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
ย 
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ
ๅŽŸ็‰ˆ1:1ๅฎšๅˆถๅ—ๅๅญ—ๆ˜Ÿๅคงๅญฆๆฏ•ไธš่ฏ๏ผˆSCUๆฏ•ไธš่ฏ๏ผ‰#ๆ–‡ๅ‡ญๆˆ็ปฉๅ•#็œŸๅฎž็•™ไฟกๅญฆๅŽ†่ฎค่ฏๆฐธไน…ๅญ˜ๆกฃ
ย 
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”DelhiRS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)โ‡›9711147426๐Ÿ”Delhi
ย 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
ย 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
ย 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
ย 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
ย 
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”น
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”นไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”น
ไธ“ไธšไธ€ๆฏ”ไธ€็พŽๅ›ฝไฟ„ไบฅไฟ„ๅคงๅญฆๆฏ•ไธš่ฏๆˆ็ปฉๅ•pdf็”ตๅญ็‰ˆๅˆถไฝœไฟฎๆ”น
ย 
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ๅŠž็†ๅญฆไฝ่ฏไธญไฝ›็ฝ—้‡Œ่พพๅคงๅญฆๆฏ•ไธš่ฏ,UCFๆˆ็ปฉๅ•ๅŽŸ็‰ˆไธ€ๆฏ”ไธ€
ย 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
ย 
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service
9711147426โœจCall In girls Gurgaon Sector 31. SCO 25 escort service
ย 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
ย 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
ย 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
ย 

Py data19 final

  • 1. How good is your prediction? Quantifying uncertainty in Machine Learning predictions PyData London 2019 (12th- 14th July) Maria Navarro
  • 2. Outline Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 3. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 4. Motivating example How good is your prediction? Problem To find out whether a car is a total lo To do it we have: 1. A set of historical observations ๐‘ฅ1; ๐‘ฆ1 , โ‹ฏ , ๐‘ฅ ๐‘; ๐‘ฆ ๐‘ , where: โ€ข ๐‘ฅ๐‘– describes the accident by age of the driver, model of the car, etc. โ€ข ๐‘ฆ๐‘– is a label which identifies whether the car is reparable or not 2. A machine learning algorithm (h ๐‘ฅ = ๐‘ฆ) PROBLEM: To find out whether a car is a total loss or not
  • 5. Motivating example How good is your prediction, REALLY? A new accident, ๐‘ฅ ๐‘+1, occurs. We run our model, and we obtain the following results: 1. The car is classified as total loss 2. The probability of total loss according to our model is 0.85 3. The model is roughly 91% accurate in training, test and validation sets, so we expect same behaviour in production data 4. The model has an AUC of 0.88 in training, so again that is what we expect in production data What do these measurements mean? Do we have any guarantee about accident ๐‘ฅ ๐‘+1? Are we confident about the prediction?
  • 6. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 7. Introduction to conformal predictions Why Conformal Predictions (CP) ? 1. There are several ad hoc ways to obtain some confidence around your predictions (resampling methods, assume normality, etc.) 2. Conformal predictions assumes very little about the outcome you are trying to predict. It only assume exchangeability. 3. It can be used with any machine learning algorithm. 4. It provides error bounds at a confidence level that we can select. 5. Probabilities are well-calibrated. 6. It is easy to implement. 7. The framework has been proven: V. Vovk, A. Gammerman, G. Shafer Algorithmic learning in a random walk, Springer 2005.
  • 8. Introduction to conformal predictions General idea โ€ข Let ๐‘ be a probability distribution. โ€ข f z โ†’ โ„ some function. โ€ข We draw 5 samples from the distribution ๐‘ and apply ๐‘“ ๐‘ง : ๏ƒ˜ ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘–, with ๐‘– = 1, โ€ฆ , 5 ๏ƒ˜ For simplicity, we assume ๐›ผ1 โ‰ค ๐›ผ2 โ‰ค ๐›ผ3 โ‰ค ๐›ผ4 โ‰ค ๐›ผ5 โ€ข We estimate the cumulative distribution function (CDF) for the scores: 0 0.2 0.4 0.6 0.8 1 ๐›ผ1 ๐›ผ2 ๐›ผ3 ๐›ผ4 ๐›ผ5 โ€ข We draw a new sample from z โˆˆ ๐‘. We assume exchangeability and compute ๐‘“ ๐‘ง = ๐›ผ. โ€ข We can estimate its probability: ๐‘ƒ ๐›ผ โ‰ค ๐›ผ4 = 0.6 and ๐‘ƒ ๐›ผ โ‰ค ๐›ผ2 = 0.2
  • 9. Introduction to conformal predictions Relation to our problem โ€ข Let ๐‘ง๐‘– = ๐‘ฅ๐‘–; ๐‘ฆ๐‘– with ๐‘– = 1, โ€ฆ , ๐‘ be a sample of the probability distribution, ๐‘ = ๐‘‹, ๐‘Œ , where: ๏ƒ˜ ๐‘ฅ๐‘– is our observables and ๐‘ฆ๐‘– the target we want to predict โ€ข We define ๐‘“ ๐‘ง๐‘– = ๐‘ฆ๐‘– โˆ’ โ„Ž ๐‘ฅ๐‘– , where: ๏ƒ˜ โ„Ž ๐‘ฅ๐‘– is a regression model train on ๐‘ง๐‘– with ๐‘– = 5, โ€ฆ , ๐‘ โ€ข We apply ๐‘“ ๐‘ง to the 5 remaining samples ๏ƒ˜ ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘–, with ๐‘– = 1, โ€ฆ , 5 ๏ƒ˜ We can compute the exact values 0.10 โ‰ค 0.13 โ‰ค 0.28 โ‰ค 0.30 โ‰ค 0.38 โ€ข We estimate the cumulative distribution function (CDF) for the scores: 0 0.2 0.4 0.6 0.8 1 0.10 0.13 0.28 0.30 0.38 โ€ข We draw a new sample from z โˆˆ ๐‘. We assume exchangeability and compute ๐‘“ ๐‘ง = ๐‘ฆ โˆ’ โ„Ž ๐‘ฅ = ๐‘ฆ โˆ’ 2 . โ€ข We can estimate its probability: ๏ƒ˜ ๐‘ƒ ๐‘ฆ โˆ’ 2 โ‰ค 0.30 = 0.6 and ๐‘ƒ ๐‘ฆ โˆ’ 2 โ‰ค 0.28 = 0.4 ๏ƒ˜ ๐‘ƒ ๐‘ฆ โˆˆ 2 ยฑ 0.30 = 0.6 and ๐‘ƒ ๐‘ฆ โˆˆ 2 ยฑ 0.30 = 0.4 ๏ƒ˜ ๐‘ฆ ๐œ– 1.7, 2.3 with probability 0.6
  • 10. Introduction to conformal predictions Inputs for conformal predictions โ€ข A set of training examples ๐‘ง๐‘– = ๐‘ฅ๐‘–, ๐‘ฆ๐‘– with ๐‘– = 1, โ€ฆ , ๐‘ƒ ๏ƒ˜ They must be drawn from an exchangeable distribution (the order of observations is irrelevant). โ€ข A non-conformity function ๐‘“ ๐‘ง โ†’ โ„ ๏ƒ˜ It measures the โ€œweirdnessโ€ of an example ๐‘ฅ๐‘–, ๐‘ฆ๐‘– ๏ƒ˜ It should give low scores to similar examples ๐‘ฅ๐‘–, ๐‘ฆ๐‘– and high scores to different ones ๐‘ฅ๐‘–, ยฌ๐‘ฆ๐‘– ๏ƒ˜ Common choice is take some function of the underlying model, but it can be anything: the probability estimate for correct class, distance to neighbours with same class, probability from the trees, absolute error of a regression model, etc. โ€ข Set a significance level ๐›† โˆˆ (0,1), so 1 โˆ’ ๐œ€ confidence level
  • 11. Introduction to conformal predictions How does conformal predictions work? โ€ข Divide training set into two disjoint sets: ๐‘๐‘ก with ๐‘๐‘ก = ๐‘š and ๐‘ ๐‘ with ๐‘ ๐‘ = ๐‘›, ๐‘š + ๐‘› = ๐‘ โ€ข Build the underlying model, โ„Ž, using ๐‘๐‘ก โ€ข Apply ๐‘“ ๐‘ง๐‘– = ๐›ผ๐‘– to the elements of the set you did not use for training โ„Ž , and estimate its probability distribution ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› ~ ๐‘„ โ€ข If a new example comes in ๐‘ฅ, โ„Ž ๐‘ฅ = ๐‘ฆ , then we will reject ๐‘ฆ ๏ƒ˜ We will reject ๐‘ฆ if ๐‘“ (๐‘ฅ, ๐‘ฆ) = ๐›ผ ๐‘ฆ does not belong to ๐‘„ โ€ข We compute the non-conformity degree which is called p-value as follows: ๐‘ ๐‘ฆ= ๐‘ง ๐‘— ๐œ– ๐‘ ๐‘โˆถ ๐›ผ ๐‘— โ‰ฅ ๐›ผ ๐‘ฆ ๐‘›+1 , ๐‘ ๐‘ฆ is the p-value โ€ข Finally the prediction region: ฮ“ ๐œ€ = ๐‘ฆ ๐œ– ๐‘Œ: ๐‘ ๐‘ฆ > ๐œ€ Is ๐’š a very non-conforming example?
  • 12. Introduction to conformal predictions Conformal prediction output The prediction region ฮ“ ๐œ€ contains prediction ๐‘ฆ with probability 1 โˆ’ ๐œ€ ๏ƒ˜ In classification : ๏ƒผ ๐›ผ ๐‘ฆ is know, but we need to compute ๐‘ ๐‘ฆ ๏ƒผ The result is a set of labels: ฮ“ ๐œ€ = ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 1, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 3, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 5 s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€ = 1 โˆ’ ๐œ€ o If ฮ“ ๐œ€ = โˆ… , then always erroneous o If ฮ“ ๐œ€ = ๐ถ (only one class), then always true (if it is the correct class) o If ฮ“ ๐œ€ = ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 1, ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 3, โ€ฆ , ๐ถ๐‘™๐‘Ž๐‘ ๐‘ 5 (several classes), then always correct ๏ƒ˜ In regression is an interval: ๏ƒผ ๐‘ ๐‘ฆ is know, but we need to compute ๐›ผ ๐‘ฆ ๏ƒผ The result is an interval: ฮ“ ๐œ€ = ๐‘Ž, ๐‘ where ๐‘Ž, ๐‘ โˆˆ โ„ and s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€ = 1 โˆ’ ๐œ€
  • 13. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 14. Conformal predictions in classification Algorithm to compute conformal prediction regions in classification problems Let ๐‘ = ๐‘‹, ๐‘Œ be the historical data set for our classification problem, where: ๏ƒ˜ ๐‘ = ๐‘, ๐‘‹ is the information about the problem and ๐‘Œ = ๐ถ1 , โ€ฆ , ๐ถ๐‘  set of labels. ๏ƒ˜ ๐‘ is exchangeable. To obtain the prediction region: 1. Divide ๐‘ into two disjoint sets: ๏ƒผ ๐‘๐‘ก proper training set with ๐‘๐‘ก = ๐‘š ๏ƒผ ๐‘ ๐‘ calibration set with ๐‘ ๐‘ = ๐‘› 2. Fit a classifier, โ„Ž ๐‘‹ = ๐‘Œ, using ๐‘๐‘ก 3. Define a non-conformity function ๐‘“ ๐‘ง to measure the weirdness of your samples 4. Apply ๐‘“ ๐‘ง to each element in ๐‘ ๐‘ to obtain the calibration scores: ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› 5. Set a significance level ๐œ€ ๐œ– 0, 1
  • 15. Conformal predictions in classification Algorithm to compute conformal predictions in classification problems 6. For a new sample ๐‘ฅ, ๐‘ฆ compute the scoring value for each label in ๐‘Œ: โˆ€ ๐ถ๐‘– ๐œ– ๐‘Œ ๐‘“ ๐‘ฅ, ๐‘ฆ = ๐ถ๐‘– = ๐›ผ ๐ถ ๐‘– 7. For each label in ๐‘Œ compute the p-value as follows: โˆ€ ๐ถ๐‘– ๐œ– ๐‘Œ ๐‘ ๐ถ ๐‘– = ๐‘ง ๐‘— ๐œ– ๐‘ ๐‘โˆถ ๐›ผ ๐‘— โ‰ฅ๐›ผ ๐ถ ๐‘– ๐‘›+1 8. Finally build the prediction region as follows: ฮ“ ๐œ€ = ๐ถ๐‘– ๐œ– ๐‘Œ: ๐‘ ๐ถ ๐‘– > ๐œ€ , then for the new prediction โ„Ž ๐‘ฅ = ๐‘ฆ, ๐‘ƒ ๐‘ฆ ๐œ– ฮ“ ๐œ€ = 1 โˆ’ ฮต
  • 16. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 17. Conformal predictions in regression Algorithm to compute conformal prediction regions in regression problems Let ๐‘ = ๐‘‹, ๐‘Œ be the historical data set for our classification problem, where: ๏ƒ˜ ๐‘ = ๐‘, ๐‘‹ is the information about the problem and ๐‘Œ a continuous target. ๏ƒ˜ ๐‘ is exchangeable. To obtain the prediction region: 1. Divide ๐‘ into two disjoint sets: ๏ƒผ ๐‘๐‘ก proper training set with ๐‘๐‘ก = ๐‘š ๏ƒผ ๐‘ ๐‘ calibration set with ๐‘ ๐‘ = ๐‘› 2. Fit a regression model, โ„Ž ๐‘‹ = ๐‘Œ, using ๐‘๐‘ก 3. Define a non-conformity function ๐‘“ ๐‘ง to measure the weirdness of your samples 4. Apply ๐‘“ ๐‘ง to each element in ๐‘ ๐‘ to obtain the calibration scores: ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› 5. Set a significance level ๐œ€ ๐œ– 0, 1
  • 18. Conformal predictions in regression Algorithm to compute conformal predictions in regression problems 6. Sort calibrations scores ๐›ผ1, โ€ฆ , ๐›ผ ๐‘› in a descending order 7. Compute the index ๐‘  = ๐œ€ ๐‘› + 1 ๏ƒ˜ This is the index of the (1 โˆ’ ฮต)-percentile of the non-conformity score ๐›ผ ๐‘  8. Finally the prediction region for a new sample: ฮ“ ๐œ€ = โ„Ž ๐‘ฅ๐‘– ยฑ ๐›ผ ๐‘ , with ๐‘ƒ โ„Ž(๐‘ฅ๐‘–)๐œ– ฮ“ ๐œ€ = 1 โˆ’ ฮต
  • 19. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 20. Application Classification with conformal predictors โ€ข The dataset is imbalanced (Total Loss is the minority class) โ€ข The model is XGBoost โ€ข Model performance: โ€ข A new accident happens the model says it is a Total Loss, but how confident we are? โ€ข Due to business restrictions we have to minimize the number false positives in TL PROBLEM: To find out whether a car is a total loss or not
  • 21. Application Classification with conformal predictors โ€ข We take the test set, ๐‘๐‘ก๐‘’๐‘ ๐‘ก = (๐‘ฅ๐‘–, ๐‘ฆ๐‘–) with ๐‘– = 1, โ€ฆ , ๐‘€ โ€ข We define a non-conformity function: ๐‘“ ๐‘ง = ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– + ๐‘๐‘Ž๐‘™๐‘–๐‘๐‘Ÿ๐‘Ž๐‘ก๐‘’๐‘‘ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– 2 where: ๏ƒ˜ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– according to the model that ๐‘ฆ = ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– ๏ƒ˜ ๐‘๐‘Ž๐‘™๐‘–๐‘๐‘Ÿ๐‘Ž๐‘ก๐‘’๐‘‘ ๐‘๐‘Ÿ๐‘œ๐‘๐‘Ž๐‘๐‘–๐‘™๐‘–๐‘ก๐‘ฆ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘– recalibrated probability that ๐‘ฆ = ๐‘๐‘™๐‘Ž๐‘ ๐‘  ๐‘–
  • 22. Application Classification with conformal predictors โ€ข Let us assume ๐‘€ = 9 and apply ๐‘“ ๐‘ง to each ๐‘ง๐‘– ๐œ– ๐‘๐‘ก๐‘’๐‘ ๐‘ก โ€ข We order the scores, and use them to compute the p-value per label for the new accident: TL = 0.85 p-value TL = 8/(9+1) = 0.8 > ๐œ€ = 0.05 Non-TL = 0.15 p-value non-TL = 2/(9+1) = 0.2 > ๐œ€ = 0.05 ฮ“ ๐œ€ = ๐‘‡๐ฟ, ๐‘›๐‘œ๐‘› โˆ’ ๐‘‡๐ฟ s. t. ๐‘ƒ ๐‘ฆ โˆˆ ฮ“ ๐œ€ = 0.95
  • 25. Application Regression with conformal predictors โ€ข The dataset is not correctly label there were some inconsistencies. โ€ข The model is XGBoost. โ€ข Model performance: โ€ข The model output was the input to another model PROBLEM: to compute/find out the price of a car
  • 28. Application Regression with conformal predictors โ€ข We take the test set, ๐‘๐‘ก๐‘’๐‘ ๐‘ก = (๐‘ฅ๐‘–, ๐‘ฆ๐‘–) with ๐‘– = 1, โ€ฆ , ๐‘€ โ€ข We define a non-conformity function: ๐‘“ ๐‘ง = ๐‘ฆ โˆ’ โ„Ž(๐‘ฅ) where: ๏ƒ˜ ๐‘ฆ is the true value, and โ„Ž(๐‘ฅ) the model prediction โ€ข Let us assume ๐‘€ = 9 and apply ๐‘“ ๐‘ง to each ๐‘ง๐‘– ๐œ– ๐‘๐‘ก๐‘’๐‘ ๐‘ก โ€ข We order in descending order โ€ข We set ๐œ€ = 0.2, then the index of the score ๐‘  = 0.2 โˆ™ 9 + 1 = 2 ๐›ผ ๐‘ =2 โ€ข The fixed width conformal interval would be: โ„Ž(๐‘ฅ) ยฑ 189.52
  • 30. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 31. Summary and conclusions Take away โ€ข Good model performance does not mean trustable predictions. โ€ข Conformal predictions is a useful tool with different applications. โ€ข It is easy to understand and to implement. โ€ข Define a non-conformity function is not always easy. โ€ข Confident areound predictions bring some
  • 32. Motivating example Introduction to conformal predictions Conformal predictions in classification Conformal predictions in regression Application Summary and conclusions References
  • 34. References Some interesting readings 1. V. Vovk, A. Gammerman, G. Shafer, Algorithm learning in a random walk, Springer, 2005. 2. H. Linusson, An introduction to conformal predictions, 2017. 3. V. Vovk, Cross-conformal predictors, Annals of Mathematics and Artificial Intelligence, 1-20, 2013. 4. U. Johannsson, H. Bostrom, T. Lofstrom, H. Linusson, Regression conformal predictors with random forest, Machine Learning, 95, 155-176, 2014. 5. V. Balasubramanian, S-S. Ho, V. Vovk, Conformal predictions for reliable machine learning, Science Direct Journal and Book, 2014.
  • 35. How is your prediction? Quantifying uncertainty in Machine Learning predictions Questions