Description
pooling_func in AgglomerativeClustering doesn't work.
Steps/Code to Reproduce
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs
from sklearn.cluster import AgglomerativeClustering
centers = [[1, 1], [-1, -1], [1, -1]]
X, labels_true = make_blobs(n_samples=300, centers=centers, cluster_std=0.5,
random_state=0)
model = AgglomerativeClustering(linkage='complete',
connectivity=None,
affinity = 'cosine',
pooling_func = "test_error",
n_clusters=3)
model.fit(X)
Expected Results
Raise error because the pooling_func is not callable. It's a string.
Actual Results
No warning, no error
Versions
Linux-4.4.0-64-generic-x86_64-with-debian-stretch-sid
Python 3.5.3 | packaged by conda-forge | (default, Feb 9 2017, 14:37:12)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.19.0