Skip to content

Commit 1140d30

Browse files
Update radial_basis_function_neural_network.py
1 parent 42826a1 commit 1140d30

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

neural_network/radial_basis_function_neural_network.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
''' Radial Basis Function Neural Network (RBFNN)
2+
3+
A Radial Basis Function Neural Network (RBFNN) is a type of artificial
4+
neural network that uses radial basis functions as activation functions.
5+
RBFNNs are particularly effective for function approximation, regression,
6+
and classification tasks.
7+
8+
#### Reference
9+
10+
- Wikipedia https://en.wikipedia.org/wiki/Radial_basis_function_network
11+
'''
12+
113
import numpy as np
214

315

@@ -132,12 +144,9 @@ def predict(self, input_data: np.ndarray) -> np.ndarray:
132144
rbf_outputs = self._compute_rbf_outputs(input_data)
133145
return rbf_outputs.dot(self.weights)
134146

135-
136-
from doctest import testmod
137-
138147
# Example Usage
139148
if __name__ == "__main__":
140-
testmod() # Running the doctest
149+
# doctest.testmod() # Running the doctest
141150

142151
# Sample dataset for XOR problem
143152
X = np.array([[0, 0], [1, 0], [0, 1], [1, 1]]) # 2D input

0 commit comments

Comments
 (0)