I am building a classification model (binary outcome) and would like to include an external cluster membership code as a predictor. For training the model, this is straight forward. When "scoring" new data with the model, it is less so.
- If the clustering was k-means and used euclidean distance, assigning the new data to its closest cluster (centroid) would be easy.
- But, how do you do this when you are using a distance matrix as input to the clustering algorithm? That is, what if you cannot compute some sort of centroid or other "aggregate representation" of a cluster?
Note: Once the classification model is built, the labeling and meaning of the clusters must remain static.
The question is general, but perhaps made more difficult in that I am looking at clustering time series data (using the
dtw package with
hclust) - so it seems that one possible solution to the general question ( i.e. to use a predictive model to map new data to the existing cluster assignments) is not possible.
Any experience with this?