@@ -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