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
    Jul 5 '11 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
    Jul 5 '11 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
    Jul 5 '11 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
    Jul 5 '11 at 7:30
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
    Sep 15 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
    Sep 15 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
    Sep 15 at 21:38
  • $\begingroup$ Oh great then, it's exactly what I need. And thank you for such a quick answer. $\endgroup$
    – Vladimir
    Sep 16 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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