Skip to content

Commit

Permalink
fix: At david_map_reduce_weighted.py, fixed herding_weights and `ra…
Browse files Browse the repository at this point in the history
…ndom_weights` in the plots
  • Loading branch information
qh681248 committed Oct 24, 2024
1 parent a4cbc80 commit 07dbc36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/david_map_reduce_weighted.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def downsample_opencv(image_path: str, downsampling_factor: int) -> np.ndarray:
-herding_coreset.coreset.data[:, 0],
c=herding_coreset.coreset.data[:, 2],
cmap="gray",
s=(5.0 * coreset_size * random_weights * downsampling_factor**2).reshape(1, -1),
s=(5.0 * coreset_size * herding_weights * downsampling_factor**2).reshape(
1, -1
),
marker="h",
alpha=0.8,
)
Expand All @@ -241,9 +243,7 @@ def downsample_opencv(image_path: str, downsampling_factor: int) -> np.ndarray:
random_coreset.coreset.data[:, 1],
-random_coreset.coreset.data[:, 0],
c=random_coreset.coreset.data[:, 2],
s=(5.0 * coreset_size * herding_weights * downsampling_factor**2).reshape(
1, -1
),
s=(5.0 * coreset_size * random_weights * downsampling_factor**2).reshape(1, -1),
cmap="gray",
marker="h",
alpha=0.8,
Expand Down

0 comments on commit 07dbc36

Please sign in to comment.