# Compas
The [Compas dataset](https://github.com/propublica/compas-analysis) for recidivism prediction.
Dataset known to have racial bias issues, check this [Propublica article](https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing) on the topic.

# Configurations and tasks
| **Configuration**                | **Task**                  | Description                                                     |
|----------------------------------|---------------------------|-----------------------------------------------------------------|
| encoding                         |                           | Encoding dictionary showing original values of encoded features.|
| two-years-recidividity           | Binary classification     | Will the defendant be a violent recidivist?                     |
| two-years-recidividity-no-race   | Binary classification     | As above, but the `race` feature is removed.                    |
| priors-prediction                | Regression                | How many prior crimes has the defendant committed?              |
| priors-prediction-no-race        | Binary classification     | As above, but the `race` feature is removed.                    |
| race                             | Multiclass classification | What is the `race` of the defendant?                            |


# Usage
```python
from datasets import load_dataset

dataset = load_dataset("mstz/compas", "two-years-recidividity")["train"]
```

# Features
|**Feature**                            |**Type**   |**Description**                        |
|---------------------------------------|-----------|---------------------------------------|
|`sex`                                  |`int64`    |                                       |
|`age`                                  |`int64`    |                                       |
|`race`                                 |`int64`    |                                       |
|`number_of_juvenile_fellonies`         |`int64`    |                                       |
|`decile_score`                         |`int64`    |Criminality score                      |
|`number_of_juvenile_misdemeanors`      |`int64`    |                                       |
|`number_of_other_juvenile_offenses`    |`int64`    |                                       |
|`number_of_prior_offenses`             |`int64`    |                                       |
|`days_before_screening_arrest`         |`int64`    |                                       |
|`is_recidivous`                        |`int64`    |                                       |
|`days_in_custody`                      |`int64`    |Days spent in custody                  |
|`is_violent_recidivous`                |`int64`    |                                       |
|`violence_decile_score`                |`int64`    |Criminality score for violent crimes   |
|`two_years_recidivous`                 |`int64`    |                                       |
task_categories:tabular-classification size_categories:1K<n<10K language:en license:cc compas tabular_classification binary_classification UCI region:us
{"language": ["en"], "license": "cc", "size_categories": ["1K<n<10K"], "task_categories": ["tabular-classification"], "pretty_name": "Compas", "tags": ["compas", "tabular_classification", "binary_classification", "UCI"], "configs": ["encoding", "two-years-recidividity", "two-years-recidividity-no-race", "priors-prediction", "priors-prediction-no-race", "race"]}
TAGS
#task_categories-tabular-classification #size_categories-1K<n<10K #language-English #license-cc #compas #tabular_classification #binary_classification #UCI #region-us 

Compas
======


The Compas dataset for recidivism prediction.
Dataset known to have racial bias issues, check this Propublica article on the topic.


Configurations and tasks
========================


Configuration: encoding, Task: , Description: Encoding dictionary showing original values of encoded features.
Configuration: two-years-recidividity, Task: Binary classification, Description: Will the defendant be a violent recidivist?
Configuration: two-years-recidividity-no-race, Task: Binary classification, Description: As above, but the 'race' feature is removed.
Configuration: priors-prediction, Task: Regression, Description: How many prior crimes has the defendant committed?
Configuration: priors-prediction-no-race, Task: Binary classification, Description: As above, but the 'race' feature is removed.
Configuration: race, Task: Multiclass classification, Description: What is the 'race' of the defendant?


Usage
=====


Features
========


Feature: 'sex', Type: 'int64', Description: 
Feature: 'age', Type: 'int64', Description: 
Feature: 'race', Type: 'int64', Description: 
Feature: 'number\_of\_juvenile\_fellonies', Type: 'int64', Description: 
Feature: 'decile\_score', Type: 'int64', Description: Criminality score
Feature: 'number\_of\_juvenile\_misdemeanors', Type: 'int64', Description: 
Feature: 'number\_of\_other\_juvenile\_offenses', Type: 'int64', Description: 
Feature: 'number\_of\_prior\_offenses', Type: 'int64', Description: 
Feature: 'days\_before\_screening\_arrest', Type: 'int64', Description: 
Feature: 'is\_recidivous', Type: 'int64', Description: 
Feature: 'days\_in\_custody', Type: 'int64', Description: Days spent in custody
Feature: 'is\_violent\_recidivous', Type: 'int64', Description: 
Feature: 'violence\_decile\_score', Type: 'int64', Description: Criminality score for violent crimes
Feature: 'two\_years\_recidivous', Type: 'int64', Description: 



TAGS
#task_categories-tabular-classification #size_categories-1K<n<10K #language-English #license-cc #compas #tabular_classification #binary_classification #UCI #region-us 
