FlorentF9 / DeepTemporalClustering

:chart_with_upwards_trend: Keras implementation of the Deep Temporal Clustering (DTC) model
MIT License
219 stars 58 forks source link

Heatmap use #20

Closed jtremblayTelmatik closed 2 years ago

jtremblayTelmatik commented 3 years ago

Could you please explain how to visualize the heatmap weights on a time series ?

jtremblayTelmatik commented 3 years ago

Say that I have a number of 1d time series of equal length L and that I want to divide them into k clusters. I understand that I can use h = dtc.heatmap_model.predict(X_train)[1] to obtain a array of shape [L, k]. How do I interpret these results ? Thank you !

FlorentF9 commented 3 years ago

The array h[:, k] is the class activation map for cluster k, meaning that each element represents the contribution of this time step to being assigned to cluster k. Please also see this issue where I gave some explanation on the heatmap.

Note that the heatmap network is not necessary to perform the clustering, it is a tool for results explainability.