def METHOD_NAME(attrname, old, new):
    global X, y
    dataset = dataset_select.value
    algorithm = algorithm_select.value
    n_clusters = int(clusters_slider.value)
    n_samples = int(samples_slider.value)
    X, y = get_dataset(dataset, n_samples)
    X, y_pred = clustering(X, algorithm, n_clusters)
    colors = [spectral[i] for i in y_pred]
    source.data = dict(colors=colors, x=X[:, 0], y=X[:, 1])