Ethical and Privacy Issues
Data mining can reveal personal facts that people never chose to share, so it raises serious issues.
- Privacy: combining records can identify a person even when names are removed (re-identification).
- Informed consent and purpose: data should be used only for the purpose for which it was collected.
- Bias and fairness: a model trained on biased data repeats the bias, for example in hiring or loans.
- Security: mined data and models must be protected against leaks.
- Transparency and accountability: people affected by a decision should be able to know the reasons.
Safeguards include anonymisation, k-anonymity (every combination of quasi-identifiers such as age band and pin code appears in at least k records), data minimisation, access control, differential privacy (adding noise), privacy-preserving data mining and legal rules such as India's Digital Personal Data Protection Act, 2023.
Case Study: Predicting Customer Churn
A telecom company has 1,000 customers, of whom 200 (20 percent) leave each year. The steps of the study follow the KDD process:
- Business goal: find customers likely to leave so that they can be offered a retention plan.
- Data: usage, billing, complaints and tenure from the warehouse, cleaned and integrated.
- Preparation: fill missing values, normalise numeric fields and encode categories.
- Modelling: train a decision tree or Naive Bayes, validated by 10-fold cross-validation.
- Evaluation: measure precision, recall and lift, not accuracy alone.
- Deployment: score customers every month and review the model as behaviour changes.
Definition: k-anonymity. A privacy property in which every combination of quasi-identifier values in a released data set is shared by at least k records.
Table 4.7: Privacy techniques
| Technique | What it does | Weakness |
|---|---|---|
| Anonymisation | Removes names and IDs | Re-identification by linking |
| k-anonymity | Groups of at least k records | Group may share one sensitive value |
| Differential privacy | Adds calibrated noise | Reduces accuracy |
| Access control | Limits who sees data | Does not protect released data |
Example 4.7: Lift of a churn model
Problem: Of 1,000 customers, 200 will churn. The model flags the 150 customers with the highest risk and 90 of them really churn. Find the precision, recall and lift, and compare with contacting 150 customers at random.
Solution:
- Precision = 90 / 150 = 0.60.
- Recall = 90 / 200 = 0.45.
- The base churn rate is 200 / 1000 = 0.20, so lift = 0.60 / 0.20 = 3.0.
- Contacting 150 customers at random would reach 0.20 x 150 = 30 churners, against 90 with the model.
Result: Precision 60 percent, recall 45 percent and lift 3.0; the model finds three times as many churners as random selection.
from collections import Counter
flagged, hit, churn, total = 150, 90, 200, 1000
prec, rec = hit / flagged, hit / churn
print("Precision:", prec, "Recall:", rec)
print("Lift :", round(prec / (churn / total), 2))
print("Random :", round(churn / total * flagged), "churners")
sizes = [3, 4, 2, 5]
recs = [(i, "x") for i, n in enumerate(sizes) for _ in range(n)]
k = min(Counter(r[0] for r in recs).values())
print("Records:", len(recs), "k-anonymity k =", k)
Output
Precision: 0.6 Recall: 0.45
Lift : 3.0
Random : 30 churners
Records: 14 k-anonymity k = 2
Common mistakes
- Believing that removing names makes data anonymous.
- Judging a churn model by accuracy when only 20 percent of customers churn.
- Collecting more personal data than the purpose needs.
- Deploying a model without checking it for bias or reviewing it over time.
Key takeaways
- Issues: privacy, consent, bias, security and transparency.
- k-anonymity: every quasi-identifier combination appears in at least k records.
- Lift = precision divided by the base rate.
- A case study follows the KDD steps from goal to deployment and monitoring.
Practice questions
- What is re-identification?
- What does a lift of 3 mean?
- Name two safeguards for privacy.
Answers to the practice questions
- Finding the identity of a person by linking an anonymised record with other data.
- The model finds three times as many targets as random selection.
- Anonymisation or k-anonymity, and differential privacy or access control.
Sources
- Official BCA syllabus Data Warehousing and Mining, course code 25BCA406DS03, Unit IV
