Skip to content

LSML fails on some classical inputs #202

Closed
@wdevazelhes

Description

@wdevazelhes

while finalizing #180, I encountered problems with LSML: examples that shouldn't be problems fail: here are a snippets that failed

import numpy as np
from sklearn.datasets import make_classification
from metric_learn import LSML_Supervised

X, Y = make_classification(n_classes=3, n_clusters_per_class=2,
                           n_informative=3, random_state=42, class_sep=4.,
                           n_features=5)

lsml = LSML_Supervised(num_constraints=200, tol=0.0001,
                       max_iter=10000, verbose=True)
X_lsml = lsml.fit_transform(X, Y)

The error returned is: ValueError: The input metric should be symmetric.

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