I am trying to reproduce and understand the code included in this document on Laplacian Eigenmaps for Dimensionality Reduction using Google Colab. However, I am getting the following error:
AttributeError Traceback (most recent call last)
<ipython-input-8-c1726617ad98> in <module>()
3
4 # Get the data and color map.
----> 5 S_curve, S_colors = datasets.samples_generator.make_s_curve(n_points, random_state=0)
6
7 Axes3D
AttributeError: module 'sklearn.datasets' has no attribute 'samples_generator'
I have made sure that I can actually display the plots in the collection (Swiss roll) by calling additional functions, but it still does not work. Likewise, this answer suggested by Google Colab does not help.
Here is the relevant code:
from sklearn import datasets
# Define the number of points to consider.
n_points = 3000
# Get the data and color map.
S_curve, S_colors = datasets.samples_generator.make_s_curve(n_points, random_state=0)