<!-- If your issue is a usage question, submit it here instead: - StackOverflow with the scikit-learn tag: http://stackoverflow.com/questions/tagged/scikit-learn - Mailing List: https://mail.python.org/mailman/listinfo/scikit-learn For more information, see User Questions: http://scikit-learn.org/stable/support.html#user-questions --> <!-- Instructions For Filing a Bug: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#filing-bugs --> #### Description <!-- Example: Joblib Error thrown when calling fit on LatentDirichletAllocation with evaluate_every > 0--> pooling_func in AgglomerativeClustering doesn't work. #### Steps/Code to Reproduce ```python 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 <!-- Example: No error is thrown. Please paste or describe the expected results.--> Raise error because the pooling_func is not callable. It's a string. #### Actual Results <!-- Please paste or specifically describe the actual output or traceback. --> No warning, no error #### Versions <!-- Please run the following snippet and paste the output below. import platform; print(platform.platform()) import sys; print("Python", sys.version) import numpy; print("NumPy", numpy.__version__) import scipy; print("SciPy", scipy.__version__) import sklearn; print("Scikit-Learn", sklearn.__version__) --> 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 <!-- Thanks for contributing! -->