Skip to content

Commit f8f0273

Browse files
committed
Renamed logistic function to match naming convention, addressed PR comments
1 parent fecf1e9 commit f8f0273

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ACKNOWLEDGEMENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Thank you to everyone here for your impactful contributions!
66
- Rich Caruana
77
- Avinava Dubey
88
- Manolis Kellis
9-
- Jason Miller
10-
- Eric Xing
9+
- Eric Xing
10+
- Jason Miller

contextualized/functions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def identity(x):
1818
return x
1919

2020

21-
def logistic(x, slope, intercept):
21+
def logistic_link(x, slope, intercept):
2222
return 1 / (1 + torch.exp(-x * slope - intercept))
2323

2424

@@ -45,14 +45,14 @@ def make_fn(base_fn, **params):
4545
return partial(base_fn, **params)
4646

4747

48-
def logistic_constructor(slope=1, intercept=0):
48+
def logistic_link_constructor(slope=1, intercept=0):
4949
"""
5050
Creates a single-parameter logistic function with slope m and offset b.
5151
:param slope: (Default value = 1)
5252
:param intercept: (Default value = 0)
5353
5454
"""
55-
return make_fn(logistic, slope=slope, intercept=intercept)
55+
return make_fn(logistic_link, slope=slope, intercept=intercept)
5656

5757

5858
def identity_link_constructor():
@@ -85,6 +85,6 @@ def softmax_link_constructor(slope=1, intercept=0):
8585
LINK_FUNCTIONS = {
8686
"identity": identity_link_constructor(),
8787
"linear": linear_link_constructor(),
88-
"logistic": logistic_constructor(),
88+
"logistic": logistic_link_constructor(),
8989
"softmax": softmax_link_constructor(),
9090
}

0 commit comments

Comments
 (0)