I have a question about the methods for doing the climbing hill algorithm with a specific problem I have.
I have 2 metrics: Sum_x and Sum_y, and I have about a hundred rows in this format:
| CategoryA | CategoryB | x | y |
|---|---|---|---|
| A | 10 | 1 | 4 |
| A | 12 | 3 | 1 |
| B | 10 | 7 | 4 |
| C | 17 | 3 | 3 |
where the combination of CategoryA and CategoryB are unique. I need to find which rows are included in Sum_x and Sum_y.
Do you know how I can do this? My current approach is to code each row in binary, starting with all rows as 0, and change each value from 0 to 1 to sum the x and y column, plotting the sums of x and y and finding which matches.
Is this the right approach? I'm trying to write this in Q for now, but I think even Python will work for this.
here's a solution using dynamic programming: