Alteryx Designer Desktop Discussions

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

How can I use data from the K-Centroids Diagnostic tool as an input?

sky007
7 - Meteor

So I am using the K-Centroid Diagnostics tool to cluster groups of sales and everything is working fine but when I try to read the data it gives me the following:

 

(Multiple Sources) - View Browse Tool Report Tab

 

How can I convert that data into something that I can use within the same workflow? I've tried outputting it to a CSV and Excel but it doesn't show me any of the data.

 

sky007_0-1603984290365.png

I want to view only the mean values for both tables from the diagnostic tool as well as the column headers (which indicate the amount of clusters)

 

sky007_1-1603984368236.png

 

I need this data so I can create a dynamic workflow that assigns a k value without me having to manually look at all of them.

 

This is what it gives me when I try to export to a CSV or Excel file:

sky007_2-1603984490938.png

 

 

 

5 REPLIES 5
afv2688
16 - Nebula
16 - Nebula

Hello @sky007,

 

have you tried using this macro:

 

https://gallery.alteryx.com/#!app/Model-Coefficients/5d926bb90462d7065c3fd921

 

It has been long time since I last used it and am not sure if it would work.

 

Regards

damc
11 - Bolide

Hello @sky007 

 

As an alternative solution I´ve modified  the  Diagnostics tool´s code a little bit  to output the information you need and saved it as a new macro (in order to avoid confusion with the original tool, which remains unaltered).

 

These are the modified/inserted lines of code:

 

rand.sum <- cbind(data.frame(Adjusted_Rand_Index = first.col), rand.sum)

#### new code to output Rand Index on outout #3#####
write.Alteryx(rand.sum, 3)

 

ch.sum <- cbind(data.frame(CH_Index = first.col), ch.sum)

####new code to output CH Index on output #4#####
write.Alteryx(ch.sum, 4)

 

Hope it helps

 

Regards

sky007
7 - Meteor

Can you please elaborate on how I would specifically use your method? I've downloaded your file but I'm having difficulty understanding what next steps should be.

sky007
7 - Meteor

I'm unable to download it.

damc
11 - Bolide

Hello @sky007 

 

I´ve attached the macro again. You can save it and use it on your own workflow
right clicking on the canvas then choosing Insert -> Macro... (then point to the folder where you saved it).

 

The configuration is the same as the Diagnostics tool, but it has two more outputs, where you can find the information you need.


Hope it helps

 

Regards

Labels