From cff4b6a4d204931b81a618b7bd5255a50eec4c36 Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Fri, 23 Feb 2024 17:17:05 +0000 Subject: [PATCH] umap center radius!!!! FML --- makefile | 2 +- scripts/sortcolor.py | 4 ++-- scripts/vips_composite.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index 854eeea..8acc8c7 100644 --- a/makefile +++ b/makefile @@ -59,7 +59,7 @@ sort_umap: python scripts/sortcolor.py -s umap --dpi 300 --seed 21 parallel_umap: - parallel -j 12 python scripts/sortcolor.py -s umap --dpi 300 --seed ::: $$(seq 1 100) + parallel -j 4 python scripts/sortcolor.py -s umap --dpi 300 --seed ::: $$(seq 1 100) parallel_check: parallel -j 4 python check.py -v ::: $$(seq 0 99) diff --git a/scripts/sortcolor.py b/scripts/sortcolor.py index 9029acd..5aa4085 100644 --- a/scripts/sortcolor.py +++ b/scripts/sortcolor.py @@ -15,7 +15,7 @@ rgb_values = [mcolors.to_rgb(mcolors.XKCD_COLORS[color]) for color in colors] parser = argparse.ArgumentParser() parser.add_argument("-s", "--sort-by", type=str, default="hsv", help="kind of sorting") parser.add_argument("--seed", type=int, default=21, help="seed for UMAP") -parser.add_argument("--dpi", type=int, default=100, help="dpi for saving") +parser.add_argument("--dpi", type=int, default=300, help="dpi for saving") parser.add_argument("--size", type=float, default=6.0, help="size of figure") parser.add_argument( "--fontsize", @@ -24,7 +24,7 @@ parser.add_argument( help="fontsize of annotation (default: 0 = None)", ) parser.add_argument( - "--radius", type=float, default=1 / 3, help="inner radius of circle" + "--radius", type=float, default=1 / 2, help="inner radius of circle" ) args = parser.parse_args() KIND = args.sort_by diff --git a/scripts/vips_composite.py b/scripts/vips_composite.py index 71e8963..b0b8662 100644 --- a/scripts/vips_composite.py +++ b/scripts/vips_composite.py @@ -62,7 +62,7 @@ def create_grid_composite( if __name__ == "__main__": # Example usage # experiment = "umap" - experiment = "supervised" + experiment = "unsupervised-anchors" # directory = "/teamspace/studios/this_studio/out_sortcolors/{experiment}/" # Change to your directory path directory = f"/teamspace/studios/this_studio/colors/colors-refactor-{experiment}/" # Change to your directory path k = 10