Skip to content

Commit b8628e9

Browse files
committed
fix: add noqa comments for ML convention uppercase X
1 parent 3ded533 commit b8628e9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

machine_learning/rbf_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _gaussian_rbf(self, x: np.ndarray, center: np.ndarray) -> float:
7171
distance_squared = np.sum((x - center) ** 2)
7272
return np.exp(-self.gamma * distance_squared)
7373

74-
def _compute_rbf_activations(self, X: np.ndarray) -> np.ndarray:
74+
def _compute_rbf_activations(self, X: np.ndarray) -> np.ndarray: # noqa: N803
7575
"""
7676
Compute RBF activations for all input samples.
7777
@@ -90,7 +90,7 @@ def _compute_rbf_activations(self, X: np.ndarray) -> np.ndarray:
9090

9191
return activations
9292

93-
def train(self, X: np.ndarray, y: np.ndarray) -> None:
93+
def train(self, X: np.ndarray, y: np.ndarray) -> None: # noqa: N803
9494
"""
9595
Train the RBFNN using KMeans clustering and least-squares fitting.
9696
@@ -132,7 +132,7 @@ def train(self, X: np.ndarray, y: np.ndarray) -> None:
132132
# weights = (A^T A)^-1 A^T y, where A is the activation matrix
133133
self.weights = np.linalg.lstsq(activations, y, rcond=None)[0]
134134

135-
def predict(self, X: np.ndarray) -> np.ndarray:
135+
def predict(self, X: np.ndarray) -> np.ndarray: # noqa: N803
136136
"""
137137
Make predictions using trained RBFNN.
138138

0 commit comments

Comments
 (0)