|
1 | 1 | """
|
2 | 2 | Radial Basis Function Neural Network (RBFNN)
|
3 | 3 |
|
4 |
| -A Radial Basis Function Neural Network (RBFNN) is a type of artificial neural |
5 |
| -network that uses radial basis functions as activation functions. |
6 |
| -RBFNNs are particularly effective for function approximation, regression, and |
7 |
| -classification tasks. The architecture typically consists of an input layer, |
| 4 | +A Radial Basis Function Neural Network (RBFNN) is a type of artificial neural |
| 5 | +network that uses radial basis functions as activation functions. |
| 6 | +RBFNNs are particularly effective for function approximation, regression, and |
| 7 | +classification tasks. The architecture typically consists of an input layer, |
8 | 8 | a hidden layer with radial basis functions, and an output layer.
|
9 | 9 |
|
10 | 10 | In an RBFNN:
|
11 |
| -- The hidden layer applies a radial basis function (often Gaussian) to the |
| 11 | +- The hidden layer applies a radial basis function (often Gaussian) to the |
12 | 12 | input data, transforming it into a higher-dimensional space.
|
13 |
| -- The output layer combines the results from the hidden layer using |
| 13 | +- The output layer combines the results from the hidden layer using |
14 | 14 | weighted sums to produce the final output.
|
15 | 15 |
|
16 | 16 | #### Reference
|
@@ -67,7 +67,7 @@ def _gaussian_rbf(self, input_vector: np.ndarray, center: np.ndarray) -> float:
|
67 | 67 | 0.1353352832366127
|
68 | 68 | """
|
69 | 69 | # Calculate the squared distances
|
70 |
| - distances = np.linalg.norm(input_vector[:, np.newaxis] - center, axis=2)** 2 |
| 70 | + distances = np.linalg.norm(input_vector[:, np.newaxis] - center, axis=2) ** 2 |
71 | 71 | return np.exp(-distances / (2 * self.spread**2))
|
72 | 72 |
|
73 | 73 | def _compute_rbf_outputs(self, input_data: np.ndarray) -> np.ndarray:
|
|
0 commit comments