I use scikit-learn for clustering data with K_Means and Ward's algorithm (AgglomerativeClustering). Now after having trained the clustering algorithm using the training data, I would like to test the output by using the testdata. When using K_Means this is not a problem as K_Means as K_Means provides a predict method (https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html). So I can just use k_means.predict(trainingDataSample).
Strangely, when using Ward's hierarchical clustering, which is from the group of AgglomerativeClustering, there is no predictmethod but just a fit_predict method (https://scikit-learn.org/stable/modules/generated/sklearn.cluster.AgglomerativeClustering.html). But I don't want to fit the algorithm again with the testdata and then predict the cluster of the trainingDataSample. I just want to use the trained model and input new data (trainingDataSample) into it and let it predict the cluster. My question is how can I do that?
I am aware that a similar question has already been asked here (scikit-learn clustering: predict(X) vs. fit_predict(X)). But none of the answers really answers my question. It's kind of strange as far as I see it that you can't use the trained model to predict new datapoints.