Skip to content

TupleTransformer #247

@wdevazelhes

Description

@wdevazelhes

As discussed with @bellet, it would be useful to have a sort of TupleTransformer object, that would take as __init__ a regular scikit-learn Transformer (so it would be a MetaEstimator), and that would fit/transform on tuples using the given Transformer (instead of the dataset of points)
i.e. it would deduplicate the points inside, fit the transformer on the dataset, and be able to transform it. This would allow to use it in a pipeline like:

from sklearn.decomposition import PCA
from sklearn.pipeline import make_pipeline
from metric_learn import TupleTransformer, ITML
from sklearn.model_selection import cross_val_score

model = make_pipeline(TupleTransformer(PCA()), ITML())
cross_val_score(model, pairs, y_pairs)

It could also be useful in some cases to have an way to use metric learning algorithms to transform tuples, like a transform_tuples method for instance

There may be other options too, this issue is to discuss about this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions