are you using the same categories AMZN provides or using another approach to categorize? You mention open sourcing the code, I would have checked there for an answer but couldn't find the link to it
Code lives here: https://github.com/jonroig/nozama
We're using the categories Amazon provides. One needs Amazon Product API access (I think) to get larger groupings from those niche categories...