Comments (4)
I'm assuming you're talking about scikit-learn's estimator and transform APIs (fit, transform, and fit_transform).
Yep! That's the one! I'm interested in such an API because it might help users in my bulk labelling interface.
In terms of implementation, maybe the neatest way is to add a class, maybe something like:
import pymde
from pymde import PyMDE
component = PyMDE(method="preserve_neighbors", constraint=pymde.Standardized())
If you want to go the extra mile, I may even go as far as having a constraint
-parameter as a string and allowing keyword arguments to pass through. That way, if folks want to use GridSearchCV
they can still get nice output. Strings/numbers work a bit better in summary tables than Python objects. But I think just having a scikit-learn compatible class, even if it's just using standard parameters, will also go a long way to have more people try out your library.
from pymde.
ps. I'm also a huge fan of cvxpy
by the way!
from pymde.
Hi! Thanks for raising this issue, and sorry for the delay in my response.
I'm happy to consider adding an API that's compatible with scikit-learn.
I'm assuming you're talking about scikit-learn's estimator and transform APIs (fit
, transform
, and fit_transform
).
Off the top of my head:
We could have versions of preserve_neighbors
and preserve_distances
that implemented this API. That makes sense to me, because these functions take raw vector data and preprocess it (conceptually, fit
). The transform
method would actually compute the embedding.
Would that be helpful?
from pymde.
Okay, great! I'd love for PyMDE to be useful for bulk, which looks awesome, by the way.
Thanks for the code snippet --- something like that could definitely work. I'll put something together in the coming weeks.
from pymde.
Related Issues (20)
- Error when embedding new points HOT 2
- Could not find a `llvm-config` binary on Mac M1 HOT 3
- Adding or removing one sample results in absolutely different embeddings HOT 1
- Continuous color bar for categorical variables HOT 4
- SolverError after using Standardized constraint HOT 2
- Implement pymde in Scanpy HOT 3
- Quadratic initialization on GPU HOT 2
- [Question] Possible to invert embedding? HOT 1
- Updating embeddings Notebook - doesnt work HOT 3
- Incorrect conda command on installation page HOT 1
- Implement default embeddings
- Distortion functions on the embedded positions?
- Using pre-computed knn with preserve_neighbors HOT 5
- Conflict with sklearn.manifold.TSNE HOT 2
- poetry installation "Unable to find installation candidates for nvidia-cudnn-cu11" HOT 6
- incompatibility with PyTorch 2.0? HOT 2
- advice on scaling
- Is there an easy way to use Standardized() constraint with target std not equal to 1? HOT 1
- Error while plotting graph HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymde.