Improve class design for AgglomerativeClustering and FeatureAgglomeration (was pooling_func in AgglomerativeClustering doesn't work) · Issue #9846 · scikit-learn/scikit-learn · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me like this is a class design issue: FeatureAgglomeration derives from AgglomerativeClustering but pooling_func is only used in AgglomerativeClustering.transform.
Feel free to open a PR. I haven't looked in detail but a possible solution would be to have FeatureAgglomeration and AgglomerativeClustering derive from a common base class and have pooling_func only in FeatureAgglomeration.
Having said that there may be reasons why it was done like this although I can't think of any.
On 28 Sep 2017 9:24 pm, "Loïc Estève" ***@***.***> wrote:
It seems to me like this is a class design issue: FeatureAgglomeration
derives from AgglomerativeClustering but pooling_func is only used in
AgglomerativeClustering.transform.
Feel free to open a PR. I haven't looked in detail but a possible solution
would be to have FeatureAgglomeration and AgglomerativeClustering derive
from a common base class and have pooling_func only in FeatureAgglomeration.
Having said that there may be reasons why it was done like this although I
can't think of any.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9846 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6z9lkUF7u0jA2-sWEe_XIZvUk1r_ks5sm4HdgaJpZM4PnBzV>
.
lesteve
changed the title
pooling_func in AgglomerativeClustering doesn't work
Better class design for AgglomerativeClustering and FeatureAgglomeration (was pooling_func in AgglomerativeClustering doesn't work)
Oct 3, 2017
lesteve
changed the title
Better class design for AgglomerativeClustering and FeatureAgglomeration (was pooling_func in AgglomerativeClustering doesn't work)
Improve class design for AgglomerativeClustering and FeatureAgglomeration (was pooling_func in AgglomerativeClustering doesn't work)
Oct 3, 2017
Description
pooling_func in AgglomerativeClustering doesn't work.
Steps/Code to Reproduce
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
The text was updated successfully, but these errors were encountered: