1
$\begingroup$

I have carried out PCA and then clustered the 6 resultant components using K-means clustering technique using SPSS. Normally SPSS adds a class variable for each case indicating its assigned group.

Is there any other method I can "calculate" the class variable (i.e. using component scores and REGR factor scores for the K means analysis given in the "Final Cluster centers" table????

$\endgroup$
4
  • $\begingroup$ Please break down your last sentence into clear parts. $\endgroup$
    – rolando2
    Commented Jul 5, 2011 at 3:16
  • $\begingroup$ Do I understand you right in that you ask how to classify new objects to the k clusters given that you have the k cluster means? $\endgroup$
    – ttnphns
    Commented Jul 5, 2011 at 5:57
  • $\begingroup$ Sorry for not being clear. Exactly ttnphns. K-means analysis gives a table titled "final Cluster Centers" in the output. On the basis of these centers, all cases are classified. Just wanted to know what are the calculations involved. Thanks. $\endgroup$
    – mzalikhan
    Commented Jul 5, 2011 at 7:09
  • $\begingroup$ Below you find my technical answer how to classify new objects to the existing clusters. Object is assigned to cluster which center it is most close to. $\endgroup$
    – ttnphns
    Commented Jul 5, 2011 at 7:30

1 Answer 1

3
$\begingroup$

Rerun your clusterization to save the final cluster centers as .SAV data file (check "Write final"). Then you open the data file with new objects to classify (this dataset may contain only new objects or a mix of new and old objects - it will make no difference). Check "Read initial" and choose here that saved file with cluster centers. Check "Classify only" instead of "Iterate and classify". Order to save cluster memberships under "Save" button. Run.

$\endgroup$
4
  • $\begingroup$ Are you sure? Because when I do that the initial clusters and final clusters are different. I don't understand what does the classify only option do $\endgroup$
    – Vladimir
    Commented Sep 15, 2021 at 21:06
  • 1
    $\begingroup$ 'Classify only' is the zero number of iterations. The program passes through the objects and assigns each to its closest input centroid. Then it recalculates the centroids (so they may change) and stops at that. No re-assignment ever takes place. $\endgroup$
    – ttnphns
    Commented Sep 15, 2021 at 21:21
  • 1
    $\begingroup$ The distance bw an object and its cluster is the distance to the centroid before the assignment takes place and thus before the recalculated centroids appear. The "final" centroid is not the one to whom objects were (re)assigned based on the "distance to centroid", they were (re)assigned that way to its predecessor centroid. $\endgroup$
    – ttnphns
    Commented Sep 15, 2021 at 21:38
  • $\begingroup$ Oh great then, it's exactly what I need. And thank you for such a quick answer. $\endgroup$
    – Vladimir
    Commented Sep 16, 2021 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.