𝐅𝐨𝐧𝐜𝐭𝐢𝐨𝐧𝐬 𝐬𝐢𝐠𝐦𝐨ï𝐝𝐞𝐬 : 𝐞𝐱𝐞𝐦𝐩𝐥𝐞𝐬 📈
Les 𝐟𝐨𝐧𝐜𝐭𝐢𝐨𝐧𝐬 𝐬𝐢𝐠𝐦𝐨ï𝐝𝐞𝐬 sont des courbes en S : 𝐛𝐨𝐫𝐧𝐞́𝐞𝐬, 𝐝𝐞́𝐫𝐢𝐯𝐚𝐛𝐥𝐞𝐬, avec 𝐝𝐞́𝐫𝐢𝐯𝐞́𝐞 𝐧𝐨𝐧 𝐧𝐞́𝐠𝐚𝐭𝐢𝐯𝐞 et un seul 𝐩𝐨𝐢𝐧𝐭 𝐝’𝐢𝐧𝐟𝐥𝐞𝐱𝐢𝐨𝐧.
𝐅𝐨𝐧𝐜𝐭𝐢𝐨𝐧𝐬
& 𝐝𝐞́𝐫𝐢𝐯𝐞́𝐞𝐬
(version texte FB)
1.
f(x) = 1 / (1 + e^{-x}) → f’(x) = f(x) * (1 − f(x))
2.
f(x) = tanh(x) = (e^{x} – exp(−x) / (exp(x) + exp(−x) →
f’(x) = 1 − (tanh(x))^2
3.
f(x) = arctan(x) → f’(x) = 1 / (1 + x^2)
4.
f(x) = erf(x) = (2/√π) ∫_0^x exp(−t^2) dt → f’(x) =
(2/√π) exp(−x^2)
𝐂𝐨𝐝𝐞
𝐏𝐲𝐭𝐡𝐨𝐧:
from matplotlib import pyplot as plt
import numpy as np
from scipy import special
def logistic(x, k=1):
return 1/(1 +
np.exp(-k*x))
def tanh(x):
return np.tanh(x)
def arctan(x):
return
np.arctan(x)
def erf(x):
return
special.erf(x)
xs = np.linspace(-10, 10, 200)
funcs = [logistic,
tanh, arctan, erf]
labels = ["logistic", "tanh",
"arctan", "erf"]
for f, name in zip(funcs, labels):
ys = f(xs)
plt.plot(xs, ys,
label=name, linewidth=2)
plt.title("Fonctions
sigmoïdes : Exemples")
plt.legend(); plt.grid(True)
plt.show()
________________________________________
Si vous avez trouvé cette publication
utile, n'hésitez pas à 𝒍𝒂 𝒍𝒊𝒌𝒆𝒓 𝒆𝒕
à 𝒍𝒂 𝒑𝒂𝒓𝒕𝒂𝒈𝒆𝒓
avec vos amis et collègues !
Pour mieux apprendre l’utilisation des logiciel et modèles statistiques, nous vous invitons à prendre part à la prochaine session de notre formation en 𝙀𝙘𝙤𝙣𝙤𝙢é𝙩𝙧𝙞𝙚 𝙚𝙩 𝙏𝙚𝙘𝙝𝙣𝙞𝙦𝙪𝙚𝙨 𝙌𝙪𝙖𝙣𝙩𝙞𝙩𝙖𝙩𝙞𝙫𝙚𝙨
________________________________________
#MachineLearning #DeepLearning #DataScience #Python
#FonctionsSigmoides
Commentaires
Enregistrer un commentaire