Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish fit and predict for Hierarchical-model #123

Open
2 tasks
ColinChrist opened this issue Apr 20, 2021 · 1 comment
Open
2 tasks

Distinguish fit and predict for Hierarchical-model #123

ColinChrist opened this issue Apr 20, 2021 · 1 comment

Comments

@ColinChrist
Copy link

Background: Since the class Hierarchical only holds meta-data and does not store anything when fit(X) is called, we can't make a prediction on new data. Ok sure, we can make a new fit, but that would also mean new clusters.

Task:

  • Store metadata-information in the model about every cluster found while executing fit(X)
  • Add predict-function that utilizes the cluster-information by predicting the existing clusters for new series

Please comment, if there is a better way to archive this

@wannesm
Copy link
Owner

wannesm commented May 12, 2021

The Hierarchical class returns a flat clustering. If the conditions for merging are loose (which is the default), there is only one cluster.

If you want to retain the tree, you can use either the HierarchicalTree or the LinkageTree class. The former is our custom algorithm, the latter uses the (faster) SciPy clustering algorithm. In both cases, after calling fit the tree is available in model.linkage.

We use linkage as defined in the SciPy package. Therefore, we do not foresee methods to operate on the linkage matrix in this package and recommend the SciPy package where this is already available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants