Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Data Science with Python

You're reading from   Practical Data Science with Python Learn tools and techniques from hands-on examples to extract insights from data

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781801071970
Length 620 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nathan George Nathan George
Author Profile Icon Nathan George
Nathan George
Arrow right icon
View More author details
Toc

Table of Contents (30) Chapters Close

Preface 1. Part I - An Introduction and the Basics
2. Introduction to Data Science FREE CHAPTER 3. Getting Started with Python 4. Part II - Dealing with Data
5. SQL and Built-in File Handling Modules in Python 6. Loading and Wrangling Data with Pandas and NumPy 7. Exploratory Data Analysis and Visualization 8. Data Wrangling Documents and Spreadsheets 9. Web Scraping 10. Part III - Statistics for Data Science
11. Probability, Distributions, and Sampling 12. Statistical Testing for Data Science 13. Part IV - Machine Learning
14. Preparing Data for Machine Learning: Feature Selection, Feature Engineering, and Dimensionality Reduction 15. Machine Learning for Classification 16. Evaluating Machine Learning Classification Models and Sampling for Classification 17. Machine Learning with Regression 18. Optimizing Models and Using AutoML 19. Tree-Based Machine Learning Models 20. Support Vector Machine (SVM) Machine Learning Models 21. Part V - Text Analysis and Reporting
22. Clustering with Machine Learning 23. Working with Text 24. Part VI - Wrapping Up
25. Data Storytelling and Automated Reporting/Dashboarding 26. Ethics and Privacy 27. Staying Up to Date and the Future of Data Science 28. Other Books You May Enjoy
29. Index

k-anonymity, l-diversity, and t-closeness

There are a few methodologies for protecting privacy with data, especially if we are going to be publishing data or sharing it with others. For example, we may need to send data to a service like Amazon Mechanical Turk for data labeling, and we don't want to have a data breach as a result of sending the data there. The first methodology for protecting privacy is k-anonymity, which was first introduced in 1998. This says that if we have at least k records with identical tuples of quasi-identifiers (QIs) then we have k-anonymity (where k is a positive integer). QIs are PII that has been semi-anonymized. For example, age and zip code could make a tuple of quasi-identifiers by converting ages to ranges and removing the last few digits of zip codes.

As an example, let's look at the simple dataset in the GitHub repository for this chapter of the book. This is a mock dataset that has HIV test results of individuals. Let's first...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime