Hi, I have built 8 clusters using proc fastclus and I now want to apply it to a new dataset - how do I do this?
Is there something similar like proc score that is used in logistic regression?
I think this thread explains the syntax that you need to use:
Thank you
Tried to apply this and the clusters are completely different
is there another method to use similar to proc score?
How else would you be able to score customers with a cluster once you have built a segmentation?
Please post the code that you tried to use.
/* original dataset and cluster */
PROC FASTCLUS
DATA=WORK.SEGBASEMIG
OUT=WORK.SEGBASEMIGTEST
outstat= OUTCLUS
MAXCLUSTERS = 8
MAXITER=1000
DELETE= 100
;
VAR
TICKETS_2_ORMORE
PARTNER_FLAG
/*PARTNER_DOMINANT*/
/*DIRECT_ONLINE_FLAG*/
DIRECT_ONLINE_DOMINANT
/*ONTHEDAY_FLAG*/
ONTHEDAY_2_ORMORE
LONG_JOURNEY_2_ORMORE
/*SINGLE_DOMINANT_FLAG*/
RETURN_DOMINANT_FLAG
OPENRETURN_DOMINANT_FLAG
/*WEEKPEAK_FLAG*/
WEEKPEAK_DOMINANT
WEEKOFFPEAK_DOMINANT
/*WEEKEND_DOMINANT*/
/*WEEKORMORE_FLAG*/
WEEKORMORE_DOMINANT
/*SAMEDAY_RETURN_FLAG*/
/*ANCIL_FLAG*/
ANCIL_2_ORMORE
TYPES_2_ORMORE
COUPLE_FLAG
/*COUPLE_2_ORMORE*/
FAMILY_FLAG
/*FAMILY_2_ORMORE*/
GROUP_FLAG
/*GROUP_2_ORMORE*/
/*SOLO_DOMINANT_FLAG*/
ROUTES_2_ORMORE
EVENT_FLAG
/*CATEGORIES_2_ORMORE*/
FREQ_JOURNEY_FLAG
/*UNI_STOP_FLAG*/
/*UNI_CITY_FLAG*/
/*UNI_PROMO_FLAG*/
/*AIRPORT_FLAG*/
AIRPORT_DOMINANT
HIGHVALUE_FLAG
;
RUN;
/* new dataset and cluster */
PROC FASTCLUS
DATA=WORK.SEGBASEMIG2
OUT=WORK.SEGBASEMIGTEST2
INSTAT= OUTCLUS
MAXCLUSTERS = 8
MAXITER=1000
DELETE= 100
;
VAR
TICKETS_2_ORMORE
PARTNER_FLAG
/*PARTNER_DOMINANT*/
/*DIRECT_ONLINE_FLAG*/
DIRECT_ONLINE_DOMINANT
/*ONTHEDAY_FLAG*/
ONTHEDAY_2_ORMORE
LONG_JOURNEY_2_ORMORE
/*SINGLE_DOMINANT_FLAG*/
RETURN_DOMINANT_FLAG
OPENRETURN_DOMINANT_FLAG
/*WEEKPEAK_FLAG*/
WEEKPEAK_DOMINANT
WEEKOFFPEAK_DOMINANT
/*WEEKEND_DOMINANT*/
/*WEEKORMORE_FLAG*/
WEEKORMORE_DOMINANT
/*SAMEDAY_RETURN_FLAG*/
/*ANCIL_FLAG*/
ANCIL_2_ORMORE
TYPES_2_ORMORE
COUPLE_FLAG
/*COUPLE_2_ORMORE*/
FAMILY_FLAG
/*FAMILY_2_ORMORE*/
GROUP_FLAG
/*GROUP_2_ORMORE*/
/*SOLO_DOMINANT_FLAG*/
ROUTES_2_ORMORE
EVENT_FLAG
/*CATEGORIES_2_ORMORE*/
FREQ_JOURNEY_FLAG
/*UNI_STOP_FLAG*/
/*UNI_CITY_FLAG*/
/*UNI_PROMO_FLAG*/
/*AIRPORT_FLAG*/
AIRPORT_DOMINANT
HIGHVALUE_FLAG
;
RUN;
Try running the second FASTCLUS code without the options MAXCLUSTERS MAXITER or DELETE
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.