Skip to content

Commit a6aa0a4

Browse files
committed
📝 Fix links in 'See also' block
1 parent 9428957 commit a6aa0a4

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

sklift/metrics/metrics.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def uplift_curve(y_true, uplift, treatment):
99
"""Compute Uplift curve.
1010
11-
For computing the area under the Uplift Curve, see :func:`uplift_auc_score`.
11+
For computing the area under the Uplift Curve, see :func:`.uplift_auc_score`.
1212
1313
Args:
1414
y_true (1d array-like): Correct (true) target values.
@@ -19,13 +19,13 @@ def uplift_curve(y_true, uplift, treatment):
1919
array (shape = [>2]), array (shape = [>2]): Points on a curve.
2020
2121
See also:
22-
:func:`uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
22+
:func:`.uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
2323
24-
:func:`perfect_uplift_curve`: Compute the perfect Uplift curve.
24+
:func:`.perfect_uplift_curve`: Compute the perfect Uplift curve.
2525
26-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
26+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
2727
28-
:func:`qini_curve`: Compute Qini curve.
28+
:func:`.qini_curve`: Compute Qini curve.
2929
3030
References:
3131
Devriendt, F., Guns, T., & Verbeke, W. (2020). Learning to rank for uplift modeling. ArXiv, abs/2002.05897.
@@ -68,7 +68,7 @@ def perfect_uplift_curve(y_true, treatment):
6868
"""Compute the perfect (optimum) Uplift curve.
6969
7070
This is a function, given points on a curve. For computing the
71-
area under the Uplift Curve, see :func:`uplift_auc_score`.
71+
area under the Uplift Curve, see :func:`.uplift_auc_score`.
7272
7373
Args:
7474
y_true (1d array-like): Correct (true) target values.
@@ -78,11 +78,11 @@ def perfect_uplift_curve(y_true, treatment):
7878
array (shape = [>2]), array (shape = [>2]): Points on a curve.
7979
8080
See also:
81-
:func:`uplift_curve`: Compute the area under the Qini curve.
81+
:func:`.uplift_curve`: Compute the area under the Qini curve.
8282
83-
:func:`uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
83+
:func:`.uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
8484
85-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
85+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
8686
"""
8787
check_consistent_length(y_true, treatment)
8888
y_true, treatment = np.array(y_true), np.array(treatment)
@@ -112,13 +112,13 @@ def uplift_auc_score(y_true, uplift, treatment):
112112
float: Area Under the Uplift Curve.
113113
114114
See also:
115-
:func:`uplift_curve`: Compute Uplift curve.
115+
:func:`.uplift_curve`: Compute Uplift curve.
116116
117-
:func:`perfect_uplift_curve`: Compute the perfect (optimum) Uplift curve.
117+
:func:`.perfect_uplift_curve`: Compute the perfect (optimum) Uplift curve.
118118
119-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
119+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
120120
121-
:func:`qini_auc_score`: Compute normalized Area Under the Qini Curve from prediction scores.
121+
:func:`.qini_auc_score`: Compute normalized Area Under the Qini Curve from prediction scores.
122122
"""
123123
check_consistent_length(y_true, uplift, treatment)
124124

@@ -138,7 +138,7 @@ def uplift_auc_score(y_true, uplift, treatment):
138138
def qini_curve(y_true, uplift, treatment):
139139
"""Compute Qini curve.
140140
141-
For computing the area under the Qini Curve, see :func:`qini_auc_score`.
141+
For computing the area under the Qini Curve, see :func:`.qini_auc_score`.
142142
143143
Args:
144144
y_true (1d array-like): Correct (true) target values.
@@ -149,13 +149,13 @@ def qini_curve(y_true, uplift, treatment):
149149
array (shape = [>2]), array (shape = [>2]): Points on a curve.
150150
151151
See also:
152-
:func:`uplift_curve`: Compute the area under the Qini curve.
152+
:func:`.uplift_curve`: Compute the area under the Qini curve.
153153
154-
:func:`perfect_qini_curve`: Compute the perfect Qini curve.
154+
:func:`.perfect_qini_curve`: Compute the perfect Qini curve.
155155
156-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
156+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
157157
158-
:func:`uplift_curve`: Compute Uplift curve.
158+
:func:`.uplift_curve`: Compute Uplift curve.
159159
160160
References:
161161
Nicholas J Radcliffe. (2007). Using control groups to target on predicted lift:
@@ -201,7 +201,7 @@ def qini_curve(y_true, uplift, treatment):
201201
def perfect_qini_curve(y_true, treatment, negative_effect=True):
202202
"""Compute the perfect (optimum) Qini curve.
203203
204-
For computing the area under the Qini Curve, see :func:`qini_auc_score`.
204+
For computing the area under the Qini Curve, see :func:`.qini_auc_score`.
205205
206206
Args:
207207
y_true (1d array-like): Correct (true) target values.
@@ -213,11 +213,11 @@ def perfect_qini_curve(y_true, treatment, negative_effect=True):
213213
array (shape = [>2]), array (shape = [>2]): Points on a curve.
214214
215215
See also:
216-
:func:`qini_curve`: Compute Qini curve.
216+
:func:`.qini_curve`: Compute Qini curve.
217217
218-
:func:`qini_auc_score`: Compute the area under the Qini curve.
218+
:func:`.qini_auc_score`: Compute the area under the Qini curve.
219219
220-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
220+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
221221
"""
222222
check_consistent_length(y_true, treatment)
223223
n_samples = len(y_true)
@@ -260,13 +260,13 @@ def qini_auc_score(y_true, uplift, treatment, negative_effect=True):
260260
float: Qini coefficient.
261261
262262
See also:
263-
:func:`qini_curve`: Compute Qini curve.
263+
:func:`.qini_curve`: Compute Qini curve.
264264
265-
:func:`perfect_qini_curve`: Compute the perfect (optimum) Qini curve.
265+
:func:`.perfect_qini_curve`: Compute the perfect (optimum) Qini curve.
266266
267-
:func:`plot_uplift_qini_curves`: Plot Uplift and Qini curves.
267+
:func:`.plot_uplift_qini_curves`: Plot Uplift and Qini curves.
268268
269-
:func:`uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
269+
:func:`.uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
270270
271271
References:
272272
Nicholas J Radcliffe. (2007). Using control groups to target on predicted lift:
@@ -322,9 +322,9 @@ def uplift_at_k(y_true, uplift, treatment, strategy, k=0.3):
322322
float: Uplift score at first k observations of the total sample.
323323
324324
See also:
325-
:func:`uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
325+
:func:`.uplift_auc_score`: Compute normalized Area Under the Uplift curve from prediction scores.
326326
327-
:func:`qini_auc_score`: Compute normalized Area Under the Qini Curve from prediction scores.
327+
:func:`.qini_auc_score`: Compute normalized Area Under the Qini Curve from prediction scores.
328328
"""
329329
# ToDo: checker that treatment is binary and all groups is not empty
330330
check_consistent_length(y_true, uplift, treatment)
@@ -550,7 +550,7 @@ def uplift_by_percentile(y_true, uplift, treatment, strategy='overall', bins=10,
550550
std (bool): If True, add columns with the uplift standard deviation and the response rate standard deviation.
551551
Default is False.
552552
total (bool): If True, add the last row with the total values. Default is False.
553-
The total uplift is a weighted average uplift. See :func:`weighted_average_uplift`.
553+
The total uplift is a weighted average uplift. See :func:`.weighted_average_uplift`.
554554
The total response rate is a response rate on the full data amount.
555555
bins (int): Determines the number of bins (and the relative percentile) in the data. Default is 10.
556556

0 commit comments

Comments
 (0)