Datasets:

Modalities:
Text
Formats:
json
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
themendu commited on
Commit
a50d63b
·
verified ·
1 Parent(s): d2a3e92

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -72,7 +72,7 @@ print(example["prediction"])
72
 
73
  # Filter examples based on harm probability
74
  def is_harmful(example, category_idx=2, threshold=0.7): # SE category (index 2)
75
- return sum(example["prediction"][category_idx][1:]) > threshold # Sum of non-safe probabilities
76
 
77
  harmful_examples = dataset.filter(is_harmful)
78
  ```
 
72
 
73
  # Filter examples based on harm probability
74
  def is_harmful(example, category_idx=2, threshold=0.7): # SE category (index 2)
75
+ return example["prediction"][category_idx][2] > threshold # Removing samples with Sexual Harm's Toxic Dimension Probability greater than 0.7
76
 
77
  harmful_examples = dataset.filter(is_harmful)
78
  ```