<jupyter_start><jupyter_text>Sigmoid函数   *  $$\hat p = \sigma (\theta^T \cdot x_b)$$  *  $$\sigma(t)=\frac{1}{1+e^-t}$$<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
def sigmoid(t):
    return 1/(1 + np.exp(-t))
x = np.linspace(-10, 10, 500)
y = sigmoid(x)
plt.plot(x, y)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20909090909090908, 'fraction_numerical': 0.03333333333333333, 'mean_word_length': 4.610169491525424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '194632', 'license': 'MIT', 'n_tokens_mistral': 161, 'n_tokens_neox': 152, 'n_words': 29, 'path': 'data/21-Logistic-Regression-Sigmoid.ipynb', 'repo_name': 'IIMostro/machine-learning', 'size': '330'}