Alteryx Designer Desktop Discussions

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

Tile tool to split 10 rows into two equal groups based on numeric 'Rating' value.

GarethLiggett
5 - Atom

I have a list of 10 players

GarethLiggett_0-1666618221094.png

 

I tried using the Tile tool with equal sum method to split the rows into 2 groups (as close to even as possible)

GarethLiggett_1-1666618250310.png

 

This has not worked as expected. The tile tool has just categorised the rows in the order they appear, with tile 1 have a much higher rating.

GarethLiggett_2-1666618326652.png

 

I may be using the Tile application incorrectly, or my understanding of how it works is incorrect. Alternatively can I achieve 2 even groups with an alternative tool? Perhaps by listing out all possible team combinations and summarizing to get average rating across the teams.

 

 

5 REPLIES 5
DataNath
17 - Castor

Hey @GarethLiggett, I thought this was a little odd and your configuration is spot on so had a little bit of a dig. @DavidP gave a great explanation in this thread - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-properly-use-the-Tile-Tool/td-p...

 

Essentially, the Tile tool doesn't appear to give great results for smaller datasets, at least when in Equal Sum mode.

GarethLiggett
5 - Atom

Thanks DataNath - Any other suggestions on how I could replicate this functionality for 10 rows? E.g. get a list of all possible team combinations (unsure on this process)? If I had this I could generate a MatchID and TeamID and calculate the difference between Team 1 vs Team 2 and sort by the difference ASC.

DenisZ
11 - Bolide

I am not so sure how simple it is using Alteryx. You could try to match all possible team combinations, but this would be a 10 factorial number of combinations. However, if you have experience with Python, then that tool can be leveraged as there appears to be multiple codes online for that. 

 

Some examples: 

python - Splitting list into 2 parts, as equal to sum as possible - Stack Overflow

DataNath
17 - Castor

@GarethLiggett I've just quickly put together an iterative macro that splits the data in 2, sums both teams and then creates a % difference of this split. Upon outputting from the macros, the iterations are then sorted by % diff and the top one taken. At the moment, I've just set a hard limit of 50 iterations (I've ran it a few times and usually the best result in this case - 0.43% - is found within ~5 iterations anyway, though there were a few runs that went into the 20s etc). However, you could set a threshold for the % diff as a point for the macro to end if there was a result that you'd be happy with without finding the optimal. Hope this helps and please let me know if you have any questions:

 

DataNath_0-1666688859377.png

 

(The error is just the macro hitting the iteration limit I set - don't worry!)

Present_guy
8 - Asteroid

So..... I conclude that the tile tool will not do an equal sum grouping and eagerly await the new tool that will be added to Alteryx that will actually do this. :(

Labels