Week 9: Time Series, Imbalanced Data & Fairness Flashcards
REVERSED
F1 = (2*R*P)/(R+P)
What is the F1 measure?
REVERSED
- Sampling data from a stream
- Queries over sliding windows
- Counting distinct elements
What are 3 problems with a data stream?
REVERSED
AEO(diff) = [(P1-P2) + (P3-P4)] /2
What is AEO(diff)?
REVERSED
Maintain a count of the number of distinct elements seen so far
What is counting distinct elements?
REVERSED
- A single sensitive (protected) attribute defining demographic groups
- Find privileged and unprivileged groups based on the sensitive attributes and the decision label
- Checking parity between demographic groups
- Cannot always identify hidden unfairness
What is statistical fairness?
REVERSED
- Store all the first s elements of the stream to S
- We have seen n-1 elements, now the nth element arrives
- With probability s/n, keep the nth element, otherwise discard it
- If we picked the nth element, then it replaces one of the element s in sample S, picked uniformly at random
What is reservoir sampling?
REVERSED
might introduce artificial minority class examples too deeply in the majority class space
What is a problem with SMOTE?
REVERSED
- Cost is the penalty associated with an incorrect prediction, goal is to minimise the cost
- Based on the classifier predicted probabilities
- Binary traditional case: predict positive if probability is > 0.5
- Probability threshold can be changed using a cost matrix
- Classify as positive if: probability of positive > FP/FP+FN
What is cost sensitive classification?
REVERSED
- Define multiple subgroups in a dataset, check parity between these subgroups
- A statistical constraint is needed
What is group fairness?
REVERSED
D = {X,S,Y} is a dataset
* X: the set of attributes that do not contain sensitive information regarding individuals
* S: the set of sensitive attributes containing sensitive information
* Y/Y*: either 0 or 1 is the original/predicted class label of individuals, which indicates the decision outcome
* G/G’: the values of the unprivileged/privileged group
What are the symbols used for defining fairness metrics?
REVERSED
- Divide the data into two equal time ranges
- Calculate the average of the observations in each of the two time ranges. plot the average at the mid-point of each time range.
- Draw a straight line between the two points
How does the semi average method work for finding the trend?
REVERSED
PP and EO need original and model
DP, DI and consistency can be computed from either the original or the model
Which fairness metrics need the original dataset and the model?
REVERSED
- Naive forecasting
- Simple mean
- Moving average
- Weighted moving average
- Exponential smoothing
What are 5 methods for forecasting the trend?
REVERSED
- A smaller a makes the forecast more stable
- A larger a makes the forecast more responsive
What do different values of a do for an exponential smoothing forecast?
REVERSED
bias in the training datasets
Where does bias in algorithms come from?
REVERSED
- Forecasts are more accurate for aggregated data than for individual items
- Forecast are more accurate for shorter than longer time periods
What makes demand forecasts more accurate?
REVERSED
series which are measures of activities to specific dates e.g. retail, balance of payments
What is a flow series?
REVERSED
- Sensitive attributes should not affect the outcome labels
- Identify “proxy” attributes that are related to the protected attributes
What is causal fairness?
REVERSED
- Collect more data - difficult in many domains
- Delete data from the majority class
- Create synthetic data
- Adapt your learning algorithm (cost sensitive classification)
- Random over/under sampling
What are 5 options for handling imbalanced data?
REVERSED
- Take the difference between a sample point and one of its nearest neighbours
- Multiply the difference by a random number between 0 and 1 and add it to the feature vector
What are the steps of creating data with SMOTE?
REVERSED
Balanced accuracy = (sensitivity + specificity)/2
What is the balanced accuracy measure?
REVERSED
- Pick a hash function h that maps each of the N elements to at least log2(N) bits
- For each stream element a, let r(a) be the number of trailing 0s in h(a)
- r(a) = position of first 1 counting from the right (including 0)
- Record R = the maximum r(a) seen
- Estimated number of distinct elements = 2^R
What is the Flajolet-Martin approach?
REVERSED
- a is small -> more weight for the past parameters
- a is large -> more weight for the present trend
What do a high and low alpha represent in exponential smoothing?
REVERSED
- Synthetic minority over-sampling techniques (SMOTE)
- Creates new data points from the minority class
What is SMOTE?
REVERSED
EO states that instances from protected and unprotected groups should have equal true positive rate (TPR) and false positive rate (FPR)
- P1 = P[Y*(x) = 1 | S(x) = G’, Y(x) = 1]
- P2 = P[Y*(x) = 1 | S(x) = G, Y(x) = 1]
- P3 = P[Y*(x) = 1 | S(x) = G’, Y(x) = 0]
- P4 = P[Y*(x) = 1 | S(x) = G, Y(x) = 0]
- For a classifier to be fair: P1=P2 and P3=P4
What is equalised odds difference?
REVERSED
measures of activity at a point in time e.g. employment
What is a stock series?
REVERSED
- Eliminate the discrimination from the final predictions
- Change the predicted outcomes of classifiers by accessing a hold out set that was not involved in the training of the model
What is post-processing for mitigation?
REVERSED
-The instances in both protected(unprivileged) and unprotected(privileged) groups should have equal probability of being predicted as positive outcome
DP(diff) = P[Y(x) = 1 | S(x) = G’] - P[Y(x) = 1 | S(x) = G] = approx 0
-This metric takes values between 0 and 1 where 0 is the optimal
What is Demographic Parity (DP) Difference?
REVERSED
The long term growth or decline of the series
What is trend?
REVERSED
Inductive hypothesis: after n elements, the sample S contains each element seen so far with probability s/n
Inductive step: for elements already in S, the probability that the algorithm keeps it in S is:…n/n+1
So, at time n the tuples in S were there with probability s/n, then at time n+1 the tuple stayed in s with probability n/n+1, so the probability that a tuple is in S at time n+1 is (s/n)*(n/n+1) = s/n+1
How do you prove that each element is picked with equal probability in reservoir sampling using mathematical induction?