transform() for mixed dataset
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
Thanks lmcinnes for this great library!
I'm currently using umap on mixed data (and I've successfully used the code from issue #58 to implement mixed data fitting) and I was wondering how I could extend that to transform additional mixed data onto the fitted projection. Would the following implementation work?
Given that `umap_model_numerical` and `umap_model_categorical` are umap models respectively fitted onto the numerical and categorical (one encoded) data and that `df_numerical` and `df_categorical` are additional data to be projected onto the umap representation:
`fit1 = umap_model_numerical.transform(df_numerical.values)`
`fit2 = umap_model_categorical.transform(df_categorical.values)`
`intersection = umap.umap_.general_simplicial_set_intersection(fit1.graph_, fit2.graph_, weight=0.5)`
`intersection = umap.umap_.reset_local_connectivity(intersection)`
`embedding = umap.umap_.simplicial_set_embedding(fit1._raw_data, intersection, fit1.n_components,
fit1.learning_rate, fit1._a, fit1._b,
fit1.repulsion_strength, fit1.negative_sample_rate,
200, 'random', np.random, fit1.metric,
fit1._metric_kwds, False)`
From what I've seemed to understand, setting `'random'` for the `init` parameter for `simplicial_set_intersection` allows to not consider `fit1._raw_data` and `fit1._metric_kwds` parameters
Thanks in advance for your help and amazing work!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing UMAP's transform path and the mentioned entry points general_simplicial_set_intersection, reset_local_connectivity, and simplicial_set_embedding. Determine whether the proposed numerical and categorical workflow can support transforming additional mixed data, and define completion as a validated approach or a clearly scoped implementation with mixed-data examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100