File size: 2,975 Bytes
f786df2
831a492
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f786df2
831a492
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
language:
- en
tags:
- adult
- tabular_classification
- binary_classification
- multiclass_classification
pretty_name: Adult
size_categories:
- 10K<n<100K
task_categories:  # Full list at https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts
- tabular-classification
configs:
- encoding
- income
- income-no race
- race
---
# Adult
The [Adult dataset](https://archive.ics.uci.edu/ml/datasets/Adult) from the [UCI ML repository](https://archive.ics.uci.edu/ml/datasets).
Census dataset including personal characteristic of a person, and their income threshold.

# Configurations and tasks
| **Configuration** | **Task**                  | Description                                                   |
|-------------------|---------------------------|---------------------------------------------------------------|
| encoding          |                           | Encoding dictionary                                           |
| income            | Binary classification     | Classify the person's income as over or under the threshold.  |
| income-no race    | Binary classification     | As `income`, but the `race` feature is removed.               |
| race              | Multiclass classification | Predict the race of the individual.                           |

# Usage
```
from datasets import load_dataset
from sklearn.tree import DecisionTreeClassifier

dataset = load_dataset("mstz/adult", "income")["train"]
```

# Features
|**Feature**        |**Type**   | **Description**                                           |
|-------------------|-----------|-----------------------------------------------------------|
|`age`              |`[int64]`  | Age of the person                                         |
|`capital_gain`     |`[float64]`| Capital gained by the person                              |
|`capital_loss`     |`[float64]`| Capital lost by the person                                |
|`education`        |`[int8]`   | Education level: the higher, the more educated the person |
|`final_weight`     |`[int64]`  |                                                           |
|`hours_per_week`   |`[int64]`  | Hours worked per week                                     |
|`marital_status`   |`[string]` | Marital status of the person                              |
|`native_country`   |`[string]` | Native country of the person                              |
|`occupation`       |`[string]` | Job of the person                                         |
|`race`             |`[string]` | Race of the person                                        |
|`relationship`     |`[string]` |                                                           |
|`sex`              |`[int8]`   | Sex of the person                                         |
|`workclass`        |`[string]` | Type of job of the person                                 |
|`over_threshold`   |`int8`     |`1` for income `>= 50k$`, `0` otherwise                    |