def logistic()

in genai-on-vertex-ai/gemini/needle_in_a_haystack/needlehaystack/llm_needle_haystack_tester.py [0:0]


    def logistic(self, x, L=100, x0=50, k=.1):
        if x in [0, 100]:
            return x
        x = -k * (x - x0)
        return np.round(L * self.sigmoid(x), 3)