Compare examples within an ExampleSet based on previous values
my current ExampleSet looks like:
Row No. att_1 att_2 att_3
1 A (empty) C
2 A B (empty)
3 (empty) B (empty)
4 D B C
5 (empty) B C
6 A (empty) C
So, what I now want to do is, to compare the examples based on the value of the previous rows as long as there is no false. In this case the result_attribute should show "1" until the first false occurs. So far so good...
The "special" thing now is, that if one of the previous values shows (empty), the result of the comparision should still be true. After the first false occurs, the process has to start again and the result_attribute should now show "2". And so on and so on. For example, the solution should look like:
Row No. att_1 att_2 att_3 Result
1 A (empty) C 1
2 A B (empty) 1
3 (empty) B (empty) 1
4 D B C 2
5 (empty) B C 2
6 A (empty) C 3
Little explanation: The result of row two shows "1" because the comparison between row one and two is true. The result of row three still shows "1" because the comparison between row one/two and three is true. Row 4 shows now "2" because the comparison between row one/two/three and four is false (att_1 shows D which is not equal to the previous A in row two) and the process has to start again at the point of the first false.
I hope you can follow my explanation and you could give me a little help.
Thanks in advance!