GithubHelp home page GithubHelp logo

scikit-learn compatible API about pymde HOT 4 OPEN

cvxgrp avatar cvxgrp commented on May 13, 2024
scikit-learn compatible API

from pymde.

Comments (4)

koaning avatar koaning commented on May 13, 2024 1

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.

koaning avatar koaning commented on May 13, 2024 1

ps. I'm also a huge fan of cvxpy by the way!

from pymde.

akshayka avatar akshayka commented on May 13, 2024

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.

akshayka avatar akshayka commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.