Be sure to review our Idea Submission Guidelines for more information!
Submission GuidelinesI was able to add the following lines of R script to get the importance of the variables used in the cluster analysis. This will allow the user to see what variables are important in determining the clusters they have.
The script I added is below. It is pretty basic and could used spruced up by an Alteryx engineer as far as column naming, accounting for contingencies, and making it a reporting function. I think this would be a valuable feature for future versions of this tool.
library(FeatureImpCluster)#load library
FeatureImp_res <- FeatureImpCluster(clus.sol,as.data.table(the.matrix)) #Use FeatureImpCluster to take the cluster model (clus.sol) and data (the.matrix) to get variable imp.
FeatureImp_df <- as.data.frame(FeatureImp_res$featureImp) #turns features from a list to dataframe
FeatureImp_df_rn <- tibble::rownames_to_column(FeatureImp_df, "Variable") #Adds the variable name to the importance scores
write.Alteryx(FeatureImp_df_rn, 3) #outputs dataframe in output #3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.