Skip to content

Commit 25571d5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c235a71 commit 25571d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

machine_learning/tsne.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
t-SNE is a nonlinear dimensionality reduction algorithm for visualizing
66
high-dimensional data in a low-dimensional space (2D or 3D).
77
8-
It computes pairwise similarities in both spaces and minimizes the
8+
It computes pairwise similarities in both spaces and minimizes the
99
Kullback-Leibler divergence using gradient descent.
1010
1111
References:
@@ -37,9 +37,7 @@ def collect_dataset() -> tuple[np.ndarray, np.ndarray]:
3737
return np.array(data.data), np.array(data.target)
3838

3939

40-
def compute_pairwise_affinities(
41-
data_x: np.ndarray, sigma: float = 1.0
42-
) -> np.ndarray:
40+
def compute_pairwise_affinities(data_x: np.ndarray, sigma: float = 1.0) -> np.ndarray:
4341
"""
4442
Compute high-dimensional affinities (P matrix) using Gaussian kernel.
4543

0 commit comments

Comments
 (0)