# What is meant by the rank of the scoring function here?

I've been reading this paper on Knowledge Graph Reasoning for Explainable Recommendation lately, and I don't understand a particular section:

Specifically, the scoring function $$f((r,e)|u)$$ maps any edge $$(r,e)$$ to a real-valued score conditioned on user $$u$$. Then, the user-conditional pruned action space of state $$s_t$$ denoted by $$A_t(u)$$ is defined as:

$$A_t(u) = \{(r,e)| rank(f((r,e)|u))) \leq \alpha ,(r,e) \in A_t\}$$

where $$\alpha$$ is a predefined integer that upper bounds the size of the action space.

Details about the scoring function can be found in the attached paper - what I don't understand is - What does rank mean, here? Is the thing inside of it a matrix? It would be great if someone could explain the expression for the user conditional pruned action space in greater detail.

## References:

1. Reinforcement Knowledge Graph Reasoning for Explainable Recommendation [Yikun Xian, Zuohui Fu, S. Muthukrishnan, Gerard de Melo, Yongfeng Zhang]

$$\text{rank}(f((r,e)|u))$$ in $$A_t(u)$$ means to compute the value of scoring function $$f$$ for all pairs $$(r,e)\in A_t$$ which are conditioned by $$u$$, then sort them in a descending order. The rank of the $$f((r,e)|u)$$ in this order is equal to $$\text{rank}(f((r,e)|u))$$. Hence $$\text{rank}(f((r,e)|u)) \leqslant \alpha$$ means to select the $$\alpha$$ top most scored pairs.
• $f$ is a function that maps $(r, e)$ to some real value. $f((r,e|u)$ is a scalar not a matrix . Rank of it is probably result based on some ranking system they use, not the matrix rank. Jun 2 '20 at 13:26