-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
embedding_vectors_ in LocallyLinearEmbedding only exists in documentation #10031
Copy link
Copy link
Closed
Closed
Copy link
Labels
Documentationgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted
Description
Description
embedding_vectors_ in LocallyLinearEmbedding only exists in documentation, it never get assigned to
quote from documentation:
Attributes:
embedding_vectors_: array-like, shape [n_components, n_samples] Stores the embedding vectors
https://github.com/scikit-learn/scikit-learn/blob/0.19.X/sklearn/manifold/locally_linear.py#L588
Steps/Code to Reproduce
from sklearn.datasets import make_classification
from sklearn.manifold import LocallyLinearEmbedding
n_classes=3
X, y = make_classification(
n_classes=n_classes,n_samples=5000, n_features=12, n_redundant=0,
n_informative=12, random_state=0, n_clusters_per_class=1
)
emb = LocallyLinearEmbedding(n_components=3, n_neighbors=10)
emb.fit(X)
emb.embedding_vectors_.shapeExpected Results
No error is thrown
Actual Results
>>> emb.embedding_vectors_.shape
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'LocallyLinearEmbedding' object has no attribute 'embedding_vectors_'
Versions
Tested with 18.1 but the problem also exists in latest 19 version
>>> import platform; print(platform.platform())
Linux-4.11.11-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six
>>> import sys; print("Python", sys.version)
('Python', '2.7.13 (default, Sep 5 2017, 08:53:59) \n[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]')
>>> import numpy; print("NumPy", numpy.__version__)
('NumPy', '1.12.1')
>>> import scipy; print("SciPy", scipy.__version__)
('SciPy', '0.19.1')
>>> import sklearn; print("Scikit-Learn", sklearn.__version__)
('Scikit-Learn', '0.18.1')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Documentationgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted