Skip to content

Commit 45964b0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2df283d commit 45964b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

machine_learning/dimensionality_reduction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def linear_discriminant_analysis(
185185

186186
# Add regularization to Sw to avoid singular matrix
187187
sw_reg = sw + 1e-6 * np.eye(sw.shape[0])
188-
188+
189189
# Solve the generalized eigenvalue problem: Sb v = λ Sw v
190190
eigenvalues, eigenvectors = eigh(sb, sw_reg)
191191

@@ -203,6 +203,7 @@ def linear_discriminant_analysis(
203203
logging.error("Dataset empty")
204204
raise AssertionError
205205

206+
206207
def locally_linear_embedding(
207208
features: np.ndarray, dimensions: int, n_neighbors: int = 12, reg: float = 1e-3
208209
) -> np.ndarray:

0 commit comments

Comments
 (0)