tSNE Updates#1400
Open
alexcarssuncao wants to merge 6 commits intoe-sensing:devfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sits_tsne: expose perplexity/rounds, add LSTM-FCN & LightTAE support, fix plot palette
Summary
This PR improves the t-SNE workflow and model coverage in sits:
perplexityandroundsare now explicit insits_tsne()and stored in the result for reproducibility and plotting.sits_tsne()now works with LSTM-FCN and the currentsits_lighttaeimplementation.plot.sits_tsne().Changes
perplexityandroundsparameters tosits_tsne()and propagate them to the returned object (used by plotting/metadata).sits_lighttaeversion."torch_model_mlp","torch_model_tae", …) sosits_tsne()can route to the correct method.plot.sits_tsne()so class colors match SITS conventions.Implementation notes
sits_tsne()dispatches based on the model type; for now, I added attributes/classes to identify each torch model family.Open question for maintainers
If there’s a preferred way to discover the concrete model without adding attributes, I’m happy to refactor. Possible alternatives:
class(model) <- c("torch_model_tae", "torch_model")) and keepsits_tsne.torch_model_tae()etc..get_embeddings(model, x)) implemented per model type;sits_tsne()would call that.Testing
sits_tsneobject across models.EXPERIMENTAL
I’d appreciate any comments or suggestions—especially on the preferred mechanism for model-type dispatch (attribute vs. S3 class vector vs. helper generic).