Skip to content

Commit 8913586

Browse files
docs: Remove jargon from code examples
Removes subjective jargon like "good" and "bad" from the model names in the documentation. The examples now use neutral, descriptive names like "Model A" and "Model B" for clarity and professionalism.
1 parent 6131ae1 commit 8913586

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import rtichoke as rk
3333
# For reproducibility
3434
np.random.seed(42)
3535

36-
# Generate more realistic sample data for a "good" model
36+
# Generate more realistic sample data for a model
3737
# Probabilities for the positive class are generally higher
3838
probs_positive_class = np.random.rand(50) * 0.5 + 0.5 # High probabilities (0.5 to 1.0)
3939
probs_negative_class = np.random.rand(50) * 0.5 # Low probabilities (0.0 to 0.5)
@@ -43,8 +43,8 @@ probs_combined = np.concatenate([probs_positive_class, probs_negative_class])
4343
reals_combined = np.concatenate([np.ones(50), np.zeros(50)])
4444

4545
shuffle_index = np.random.permutation(100)
46-
probs = {'My Model': probs_combined[shuffle_index]}
47-
reals = {'My Population': reals_combined[shuffle_index]}
46+
probs = {'Model A': probs_combined[shuffle_index]}
47+
reals = {'Population': reals_combined[shuffle_index]}
4848

4949

5050
# Create the ROC curve

docs/tutorials/getting_started.qmd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ This is the simplest case, where you want to evaluate the performance of a singl
3232
For this, you provide `probs` with a single entry for your model and `reals` with a single entry for the corresponding outcomes.
3333

3434
```python
35-
# Generate realistic sample data for a "good" model
35+
# Generate realistic sample data for a model
3636
probs_positive_class = np.random.rand(50) * 0.5 + 0.5
3737
probs_negative_class = np.random.rand(50) * 0.5
3838
probs_combined = np.concatenate([probs_positive_class, probs_negative_class])
3939
reals_combined = np.concatenate([np.ones(50), np.zeros(50)])
4040
shuffle_index = np.random.permutation(100)
4141

42-
probs_single = {"Good Model": probs_combined[shuffle_index]}
42+
probs_single = {"Model A": probs_combined[shuffle_index]}
4343
reals_single = {"Population": reals_combined[shuffle_index]}
4444

4545
# Create a ROC curve
@@ -60,23 +60,23 @@ Often, you want to compare the performance of several different models on the *s
6060
For this, you provide `probs` with an entry for each model you want to compare. `reals` will still have a single entry, since the outcome data is the same for all models.
6161

6262
```python
63-
# Generate data for a "Good Model", a "Bad Model", and a "Random Guess"
64-
# The "Good Model" has a clearer separation of probabilities.
65-
good_probs_pos = np.random.rand(50) * 0.4 + 0.6 # 0.6 to 1.0
66-
good_probs_neg = np.random.rand(50) * 0.4 # 0.0 to 0.4
67-
good_probs = np.concatenate([good_probs_pos, good_probs_neg])
63+
# Generate data for two different models to compare.
64+
# Model A has a clearer separation of probabilities.
65+
model_a_probs_pos = np.random.rand(50) * 0.4 + 0.6 # 0.6 to 1.0
66+
model_a_probs_neg = np.random.rand(50) * 0.4 # 0.0 to 0.4
67+
model_a_probs = np.concatenate([model_a_probs_pos, model_a_probs_neg])
6868

69-
# The "Bad Model" has more overlap.
70-
bad_probs_pos = np.random.rand(50) * 0.5 + 0.4 # 0.4 to 0.9
71-
bad_probs_neg = np.random.rand(50) * 0.5 + 0.1 # 0.1 to 0.6
72-
bad_probs = np.concatenate([bad_probs_pos, bad_probs_neg])
69+
# Model B has more overlap.
70+
model_b_probs_pos = np.random.rand(50) * 0.5 + 0.4 # 0.4 to 0.9
71+
model_b_probs_neg = np.random.rand(50) * 0.5 + 0.1 # 0.1 to 0.6
72+
model_b_probs = np.concatenate([model_b_probs_pos, model_b_probs_neg])
7373

7474
reals_comparison_data = np.concatenate([np.ones(50), np.zeros(50)])
7575
shuffle_index_comp = np.random.permutation(100)
7676

7777
probs_comparison = {
78-
"Good Model": good_probs[shuffle_index_comp],
79-
"Bad Model": bad_probs[shuffle_index_comp],
78+
"Model A": model_a_probs[shuffle_index_comp],
79+
"Model B": model_b_probs[shuffle_index_comp],
8080
"Random Guess": np.random.rand(100)
8181
}
8282
reals_comparison = {"Population": reals_comparison_data[shuffle_index_comp]}

0 commit comments

Comments
 (0)