🔹 𝗖𝗼𝗺𝗽𝗿𝗲𝗻𝗱𝗿𝗲 𝘂𝗻 𝗻𝗲𝘂𝗿𝗼𝗻𝗲 𝗮𝗿𝘁𝗶𝗳𝗶𝗰𝗶𝗲𝗹 𝗲𝗻 𝟭 𝗺𝗶𝗻𝘂𝘁𝗲 !
Un neurone artificiel reçoit des entrées pondérées (x·w), ajoute un biais (b) puis applique une fonction d’activation φ :
👉 Équation :
y = φ(w₁x₁ + w₂x₂ + ... + wₘxₘ + b)
ou sous forme vectorielle :
y = φ(wᵀx + b)
➡️ C’est le mécanisme de base qui
permet aux réseaux de neurones d’imiter le fonctionnement du cerveau
humain 🧠.
🐍 Implémentation
en Python
import numpy as np
class
NeuroneArtificiel:
def __init__(self, n_inputs, activation='logistic'):
self.weights =
np.random.randn(n_inputs) # poids
self.bias = np.random.randn() # biais
self.activation = activation
def __call__(self, x):
z = np.dot(x, self.weights) + self.bias
if self.activation == 'logistic':
return 1 / (1 + np.exp(-z)) # Sigmoïde
elif self.activation == 'relu':
return np.maximum(0, z) # ReLU
else:
return z # Linéaire
# Exemple
neurone =
NeuroneArtificiel(n_inputs=3, activation='logistic')
x = np.array([0.3, -1.2, 0.7])
y = neurone(x)
print("Entrée :", x)
print("Sortie :", y)
print("Poids :",
neurone.weights)
print("Biais :",
neurone.bias)
✅ Exemple de sortie :
Entrée : [ 0.3 -1.2 0.7]
Sortie : 0.7155
Poids : [ 0.4010
0.8758 -0.5280]
Biais : 2.2226
________________________________________
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 𝙀𝙘𝙤𝙣𝙤𝙢é𝙩𝙧𝙞𝙚 𝙚𝙩 𝙏𝙚𝙘𝙝𝙣𝙞𝙦𝙪𝙚𝙨 𝙌𝙪𝙖𝙣𝙩𝙞𝙩𝙖𝙩𝙞𝙫𝙚𝙨
________________________________________
#️⃣ #IntelligenceArtificielle #DeepLearning #MachineLearning
#DataScience #NeuroneArtificiel
.png)
Commentaires
Enregistrer un commentaire