A dataset is an organized collection of data examples considered together for analysis or machine learning. In a table, columns are features and rows are examples. Datasets let algorithms find patterns that would be difficult to spot manually. section 8.1 section 8.7
A useful dataset answers a specific question and contains data whose meaning you understand. For fraud detection, transaction fields must be interpreted correctly; data may need to be collected from several systems and combined. section 8.7
A diamond dataset
The diamond dataset contains more than 50,000 rows and 10 features, including carat, cut, color, clarity, depth, table, and three physical dimensions. Price is the value to analyze or predict. A few rows might show that a 0.30-carat diamond costs $339, while a 2.21-carat diamond costs $6,535. Comparing these examples helps reveal relationships between measurements and price. section 8.7
Dataset design shapes what a model can learn:
- Quality matters more than size; a small curated dataset can be more useful than a large uncurated one. section 11.6
- Narrow datasets, such as chest X-rays or satellite images, support specialized expertise, while broad datasets improve generalization across varied subjects. section 12.27
- Image datasets pair images with captions, so resolution, diversity, and descriptions influence what a generative model can create. section 12.4
- Training data also requires attention to permitted use, including public-domain or explicitly licensed content. section 11.6
Datasets define the world available to a learning system. Sensor datasets can connect soil, moisture, weather, water, fertilizer, and timing with crop yield. A model cannot reliably learn patterns that its dataset never represents. section 1.25 section 12.27
Table 8.1 The diamond dataset
|
Carat |
Cut |
Color |
Clarity |
Depth |
Table |
Price |
X |
Y |
Z |
|
| 1 |
0.30 |
Good |
J |
SI1 |
64.0 |
55 |
339 |
4.25 |
4.28 |
2.73 |
| 2 |
0.41 |
Ideal |
I |
SI1 |
61.7 |
55 |
561 |
4.77 |
4.80 |
2.95 |
| 3 |
0.75 |
Very good |
D |
SI1 |
63.2 |
56 |
2,760 |
5.80 |
5.75 |
3.65 |
| 4 |
0.91 |
Fair |
H |
SI2 |
65.7 |
60 |
2,763 |
6.03 |
5.99 |
3.95 |
| 5 |
1.20 |
Fair |
F |
I1 |
64.6 |
56 |
2,809 |
6.73 |
6.66 |
4.33 |
| 6 |
1.31 |
Premium |
J |
SI2 |
59.7 |
59 |
3,697 |
7.06 |
7.01 |
4.20 |
| 7 |
1.50 |
Premium |
H |
I1 |
62.9 |
60 |
4,022 |
7.31 |
7.22 |
4.57 |
| 8 |
1.74 |
Very good |
H |
I1 |
63.2 |
55 |
4,677 |
7.62 |
7.59 |
4.80 |
| 9 |
1.96 |
Fair |
I |
I1 |
66.8 |
55 |
6,147 |
7.62 |
7.60 |
5.08 |
| 10 |
2.21 |
Premium |
H |
I1 |
62.2 |
58 |
6,535 |
8.31 |
8.27 |
5.16 |
Use the diamond table to inspect how one dataset organizes features, examples, measurements, and a target value. section 8.7























