MCPcopy Create free account
hub / github.com/LargeWorldModel/LWM / logistic

Method logistic

scripts/eval_needle.py:114–119  ·  view source on GitHub ↗
(self, x, L=100, x0=50, k=.1)

Source from the content-addressed store, hash-verified

112 return random.randint(lower_bound, upper_bound)
113
114 def logistic(self, x, L=100, x0=50, k=.1):
115 if x == 0:
116 return 0
117 if x == 100:
118 return 100
119 return np.round(L / (1 + np.exp(-k * (x - x0))), 3)
120
121 def read_context_files(self, n):
122 max_context_length = max(self.context_lengths)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected