Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to pass parameter to number of cluster in K-Centroids Cluster Analysis ?

kantawee
7 - Meteor

How to pass parameter from K in text input to "number of cluster" in K-Centroids Clustpass parameter from text input to number of k.PNGer Analysis ? 

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

@kantawee

 

The K-Centroids Cluster Analysis tool is actually a macro you can right-click and edit, so it's easy enough to save off a new copy for this exercise. Start off by taking note of where the Number of clusters question takes effect. Inside the macro, R-Tool (4), line 22 defines the following:

 

num.clus <- %Question.num clus%

 

Now modifying this will depend on how you want this process to work. I assume you want to update this from the data stream? You can append the value to the current input data and update the R code to something like.

 

num.clus <- unique(the.data$num_clus)

 

Now if you want various values, you're probably best off building the tool into a batch macro.

kantawee
7 - Meteor

@CharlieS

Thanks CharlieS , Could you possibly to show simple config this your guideline.

thank you very much

kantawee
7 - Meteor

@CharlieS

Thanks Charlie , Could you possibly to show simple config this your guideline.

thank you very much

CharlieS
17 - Castor
17 - Castor

@kantawee

 

There's a few ways to go about this. If you could provide an example of how you would like to configure the inputs or control this macro, that would be very helpful. 

Labels