Layouts auto API #801
Replies: 4 comments 11 replies
-
hey @dlee0156 - this looks like a great start for this conversation! Do you think you could just copy paste what you have in those text files into your comment (or new ones)? I think this will make it easier for folks to provide feedback. cc: @dwaynepryce @bryantower |
Beta Was this translation helpful? Give feedback.
-
Thanks for putting some thought into this. All three of these approaches have some merit. The 2nd proposal seems like it is doing a lot. I like decomposing the problem a little bit more than that if we are not going completely on rails (with the defaults). Both the first and the third solutions have two different methods that take in the max_edges parameter. I think we want to avoid that. We want there to be a clear flow. If we are going to force someone to provide the embedding, then the graph preprocessing should be done before the layout method. In the third solution it looks like the intent is for the preprocessing_for_layoutmethod to be called before the embed_for_layout method. If that is the case we should not provide the max_edges parameter to the embed_for_layout. I think one other thing that would help is to write a layout method that produces the complete layout in proposal 1 and 3. Obviously proposal 2 has everything in that one method. That will help in two ways, 1, you will be able to solidify the methods proposed are sufficient and 2, you should be able to see if there is friction with the proposed methods and completing the full layout. |
Beta Was this translation helpful? Give feedback.
-
Only minor comments here, it's looking pretty good as it goes. One thing is in embed_for_layout, you're going to want to do preconditions checks to ensure that nobody calls it with the 100% fabricated "DaxStupidEmbedderOfDoom" argument that has no actual impl. Just make sure you do your precons to make sure nobody calls it with the wrong magic strings. Next, I'd change "reduce_for_layout" to "reduce_dimensionality" - sure, it's for the layout, but "reduce for layout" isn't specific enough on what is being reduced, though it does tell us what it's for.
One question about doing the embed part: for lse you specifically force us to use One thing we're not doing for all of these broken out functions is the sanity checks that we got by default by only being able to use them via the Maybe we add a boolean parameter that is set to False by default called like, uh... |
Beta Was this translation helpful? Give feedback.
-
I also have been thinking about a def plot_layout(
positions: List[NodePosition],
edges: np.ndarray,
figsize: Tuple[float, float] = (10, 10),
palette: str = "Set1",
hue: Optional[str] = None,
vertex_linewidth: float = 0.01,
vertex_alpha: float = 0.5,
edge_linewidth: float = 0.5,
edge_alpha: float = 0.5,
title=None,
legend=None,
): We could also maybe have a boolean parameter called |
Beta Was this translation helpful? Give feedback.
-
Hi, just wanted to start a thread about the layouts/auto API and run some ideas by everyone!
Here's a version where a lot of the structure stays the same as the current auto.py, but we could have a new function layout_auto where the user can specify ase/lse/n2v (or use their own embedding) and umap/tsne, then use the show_graph function to plot the layout. auto_v1.txt
The second version is more similar to the code Ben posted in the layouts meta issue (#736), where there's one function that does everything from start to finish, including the plotting part. I think one interesting thing we could look at is comparing the run times between networkx and other packages? But here's the outline for what I think the function could look like. auto_v2.txt
We could also potentially think about exposing all of these functions for each step, where the user would call them individually as needed and follow a workflow, but just more food for thought. auto_v3.txt
I think this covers most of what we talked about @bdpedigo, but please let me know if I missed anything! Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions