This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reproduce the spectral clustering example of Figure 14.29. | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.cluster import SpectralClustering | |
def sample(n): | |
assert n % 3 == 0 | |