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
http://scikit-learn.org/0.18/modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding
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_.shape
Expected 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')
Description
embedding_vectors_inLocallyLinearEmbeddingonly exists in documentation, it never get assigned toquote from documentation:
http://scikit-learn.org/0.18/modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding
https://github.com/scikit-learn/scikit-learn/blob/0.19.X/sklearn/manifold/locally_linear.py#L588
Steps/Code to Reproduce
Expected Results
No error is thrown
Actual Results
Versions
Tested with 18.1 but the problem also exists in latest 19 version