You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the auto init, there is a misleading behaviour that needs to be addressed: if I specify init='lda' , with a number of components of n_features, (and I have n_classes < n_features for isntance), lda can still be used, and a transformer that does dimensionality reduction will be returned (the number of output components will be equal to n_classes -1). This happens silently
Here is an example (on the current master)
frommetric_learnimportLMNNfromsklearn.datasetsimportmake_classificationX, y=make_classification(n_samples=100, n_classes=3,
n_informative=3, class_sep=4., n_features=5,
n_redundant=0)
lmnn=LMNN(init='lda', n_components=5)
lmnn.fit(X, y)
print(lmnn.transformer_.shape[0]) # is 2 not 5
The text was updated successfully, but these errors were encountered:
In the auto init, there is a misleading behaviour that needs to be addressed: if I specify
init='lda'
, with a number of components of n_features, (and I have n_classes < n_features for isntance), lda can still be used, and a transformer that does dimensionality reduction will be returned (the number of output components will be equal ton_classes
-1). This happens silentlyHere is an example (on the current master)
The text was updated successfully, but these errors were encountered: