Skip to content

Commit

Permalink
Adjust scale
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmymathews committed Aug 27, 2024
1 parent 0b4aa58 commit dec8d64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spatialprofilingtoolbox/workflow/common/umap_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

logger = colorized_logger(__name__)

UMAP_POINT_LIMIT = 150000
UMAP_POINT_LIMIT = 100000


class UMAPCreator:
Expand Down Expand Up @@ -167,7 +167,7 @@ def preprocess_univariate_adjustments(df):

@staticmethod
def umap_reduce_to_2d(array):
manifold = UMAP(random_state=99).fit(array)
manifold = UMAP(random_state=99, min_dist=0.2).fit(array)
return manifold.transform(array)

@staticmethod
Expand All @@ -176,7 +176,7 @@ def scale_up(array):
logger.info(f'First few points: {first}')
size_x = max(array[:,0])
size_y = max(array[:,1])
scale = 3000 / min(size_x, size_y)
scale = 5000 / min(size_x, size_y)
scaled = scale * array
first = tuple(zip(scaled[0:5,0], scaled[0:5,1]))
logger.info(f'After scaling: {first}')
Expand Down

0 comments on commit dec8d64

Please sign in to comment.