Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Calculate Average Precision / refer to value from previous row

$
0
0
Hi

For the evaluation of a ranking algorithm I would like to calculate the average precision. The calculation should be done for each row, but refers to the sum of the previous rows:


Rank Hit Precision
1 1 1/1 = 1
2 0 (1+0)/2 = 0.5
3 0 (1+0+0)/3 = 0.33
4 1 (1+0+0+1)/4 = 0.5
5 0 (1+0+0+1+0)/5 = 0.4

Given the existence of the Rank and Hit colum, how can I calculate the Precision?

  • With Calculator and Formula it seems that I only can calculate values from the same row.
  • With Group By it seems that I only can can calculate values for all rows of the whole stream? With the "Cumulative Sum" of Group by I could calculate the precision of the last row, but actually I need it on every row.


Is there a chance to pass on a value from one row to the next?

Any help or hint is very appreciated!

Christian

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>