\section{Methodology}\label{metodologia}
\subsection{The Sports}\label{esporte}
\indent

%We have chosen Mixed Martial Arts (MMA) as the sport of interest for the initial tests of our proposed time-aware ranking strategy for a number of reasons. First, this is a sport that has gained a lot of popularity lately. Second, and more importantly, there are several sites available on the Web with information about events, fights, etc., as well as with rankings of athletes that can serve as a possible gold standard, thus making our work feasible.

We have chosen Mixed Martial Arts (MMA) and tennis as the sports of interest for testing our proposed time-aware ranking strategy for a number of reasons. First, they are both high popular sports. Although tennis is a more  traditional sport, with years of history, MMA in its turn has gained a lot of popularity in the last few years. Second, and more importantly, there are several sites available on the Web with information about events, confronts, etc., as well as with rankings of athletes that can serve as a possible gold standard, thus making our work feasible.

Next, we describe some design choices we made regarding each sport.

\subsubsection{MMA}
Mixed Martial Arts (MMA) is a full contact combat sport that allows several types of fighting technique. Confronts usually take place in events in which fighters try to defeat each other. Although interesting for our study for the reasons mentioned above, there are also some challenges in exploring this particular sport. First, there are several organizations related to the sport that promote events all around the world, with slightly different rules. The current main organization is UFC (Ultimate Fighting Championship), although there are several other organizations such as Pride Fighting Championships (now extinct), DREAM, and WEC. The second challenge relates to the existence of several fighter categories, based on the body weight. Examples include Welterweight and Heavyweight. An important aspect is that each organization adopts its own rules to define the categories. For instance, UFC and Strikeforce consider that the Welterweight category covers body weights between 71--77 kg while in Pride FC the same category covers fighters who weight up to 83 kg. Besides that, another important aspect is that a fighter may compete in different categories in different points in time. For instance,  in a given moment a fighter may belong to category Welterweight while in a different moment in his carrier he fighted under the Middleweight category.

For these reasons, we have made the following design choices:
\begin{itemize}
\item We do not consider existing differences among organizations and events. We consider all confronts from all events equivalent, since the fighters compete under the same conditions.
\item The analysis of results are perfomed per category, i.e.,  we consider all fights within a given category to produce a rank.
\end{itemize}

\subsubsection{Tennis}
Tennis is a largely popular traditional sport, dating back to the $19^{th}$ century. Matches are usually held between two players
or double teams and, unlike MMA, they occur much more frequently in a per year basis---consequently, there is a higher number of
confronts per player than in MMA. The  Association of Tennis Professionals (ATP) organizes several tennis tournaments around the world.
The most important ones are the four Grand Slams, namely, the Australian Open, the French Open, Wimbledon and the US Open. 

With respect to tennis, we have made the following design choices:
\begin{itemize}
\item We do not consider existing differences among the tournaments, i.e., we consider all confronts from all tournaments equivalent, since the players compete under the same conditions.
\item The analysis of results are performed per time span, i.e.,  we consider all confronts that occurred within a given period of time.
\end{itemize}



\subsection{The Network Representation}\label{rede}

\indent
The results of the confronts (fights or matches) are materialized through a network represented as a weighted directed graph. Each node corresponds to an athlete and there is an edge connecting nodes $i$ and $j$ if the athlete represented by node $i$ was defeated in some confront by the athlete represented by node $j$.
The weight of an edge represents the weight associated with one or more confronts between two athletes. This will be further discussed in Section~\ref{temporal}. As an example, we present in Figure~\ref{fig:rede_top} a network constructed using our dataset with results of confronts among some of the main MMA fighters according to the ranking presented in Subsection~\ref{goldstd}.
%{\vspace{-0.1cm}}
% EXAMPLE OF HOW TO INCLUDE eps FIGURES

\begin{figure}[tb] % FIGURES SHOULD BE AT THE TOP [t] OR BOTTOM [b} OF PAGES
\centering % FIGURES SHOULD BE CENTERED
\includegraphics[width=0.6\textwidth]{figuras/rede_top.eps}
{\vspace{-0.2cm}}
\caption{Network of confronts among some of the main MMA fighters.} % ALWAYS INCLUDE CAPTIONS IN YOUR FIGURES
\label{fig:rede_top} 
\end{figure}

It is important to notice that we organized the data in order to generate a network of confronts according to various criteria, such as confronts in the same category (MMA), in the same tournament (tennis), that happened in the same year, etc., for future developments.

\subsection{The Ranking Method}\label{ranqueamento}
We want to obtain a ranking of athletes based on the results of the confronts up to a given point in time. By analyzing the network of confronts, we can, intuitively, make the conclusion that nodes with high indegree represent those with more wins and, consequently, with higher chance of being highly ranked. This intuition, however, takes into account only the number of wins, ignoring the ``quality'' of these wins. For instance, using only this criterion an athlete that has defeated several other not so ``prestigious'' athletes would be better ranked than another athlete that has obtained fewer victories but over stronger opponents. A way to address this problem is to apply the well known PageRank algorithm ~\cite{page_pagerank_1999} in the network of confronts. The intuition here is analogous to that of Web page rank. With each athlete is associated a certain ``prestige'' that defines its importance and that flows through the network according to the direction of the edges. Thus, athletes who defeat other athletes with higher prestige are more benefited.

\subsection{Time-Varying Edge Weights}\label{temporal}

The time-dependent interactions among athletes clearly has a fundamental impact on their rankings. For example, a series of recent confronts is 
likely to be more important in determining the current ranking of a set of athletes than a series of confronts among the same set of athletes 
that occurred far in the past. Intuitively, the importance of confronts for ranking athletes decays over time: the older a confront is, the 
less important is its result. Thus, a good ranking for today's athletes should give more importance to recent confronts. 

The importance of relationships is usually captured by assigning weights to network edges. Thus, based on this 
intuition, we propose the use of time-varying edge weights to reflect the fact that the importance of confront results decays with time. 
In particular, we will consider an exponentially decaying weight, controlled by a parameter that determines how fast 
importance decays over time\footnote{We tested with other functions and none produced better results.}. Consider two athletes $i$ and $j$ and let $t_{i,j}^k$ denote the time instant of their 
$k$-th confront, for $k = 1, 2, \ldots$. Moreover, let $w_{i,j}(t)$ denote the weight of the directed edge 
from $i$ to $j$ at time $t \geq 0$. We define the edge weight $w_{i,j}(t)$ recursively as follows:


\begin{equation}
\begin{small}
w_{i,j}(t) = \left\{
\begin{array}{l l}
 0                                               & \text{$t = 0$} \\
 w_{i,j}(t-\epsilon) + I                         & \text{$t = t_{i,j}^k$ and $j$ defeated $i$} \\
                                                 & \text{in a confront at $t_{i,j}^k$} \\
 w_{i,j}(t_{i,j}^k) e^{-\alpha(t-t_{i,j}^k)} & \mbox{$t_{i,j}^k \leq t < t_{i,j}^{k+1}$} \\
% w_{i,j}(t_{i,j}^k) e^{-\alpha\cdot(t-t_{i,j}^k)} & \mbox{$t_{i,j}^k \leq t < t_{i,j}^{k+1}$} \\
\end{array} \right.
\label{eq:weight}
\end{small}
\end{equation}

%\ldots$,
Note that the edge weight is zero at time zero. At the time of a confront, namely at the instants $t_{i,j}^k$ for $k=1,2,3$ and so on,  
the weight of the edge increases by $I$ if $j$ defeats $i$. Note that $I$ is a constant that indicates how much weight is 
added to the edge when an athlete defeats another. This value could depend on the importance of the confront (e.g., a final match), 
but in this work we assume $I=1$ for all confronts. Note that $\epsilon$ is a small constant (e.g., $10^{-6}$) and is used 
to capture the edge weight just before a confront between $i$ and $j$ occurs. 
Finally, in between confronts the weight decreases exponentially with 
parameter $\alpha$ according to the amount of time elapsed since the last confront (note that $t-t_{i,j}^k$ is the time 
elapsed since the $k$-th confront). Note that if $j$ never defeats $i$ again, then the weight $w_{i,j}$ will eventually get close to zero. 

A key parameter of the formulation above is $\alpha$ which denotes how fast the weight of an edge decreases over time. If $\alpha$ 
is too small, then the edge weight will have a long memory. In particular, if $\alpha = 0$ then edge weights do not decrease with time. 
On the other hand, if $\alpha$ is too large, then the weights have very short memory, getting quickly to zero. Intuitively, $\alpha$ 
should be set according to the timescale of the sport to reflect how fast real rankings change. Moreover, it should also be 
related to the number of confronts per unit of time (e.g., year or month) of the sport. In our experiments, we investigate the impact of various 
values for $\alpha$.

Figure~\ref{fig:fd1} illustrates the function $w_{i,j}(t)$ for two athletes in our dataset, considering three values for $\alpha$, namely, $0$, $0.05$ and $0.25$.
Note that there was a confront at time points $7$, $15$, $18$, $19$ and $20$ when $j$ defeated $i$, thus indicating the increments ($I=1$). Between confronts, the weight 
decreases exponentially. Note that for $\alpha = 0.05$ the edge accumulates more weight over time, indicating its longer memory.

% \begin{figure}[tb] % FIGURES SHOULD BE AT THE TOP [t] OR BOTTOM [b} OF PAGES
% \begin{minipage}[b]{0.5\linewidth}
% \centering % FIGURES SHOULD BE CENTERED
% \includegraphics[width=1\textwidth]{figuras/funcao_decaimento_1_alpha_005.eps} 
% \caption{Evolution of edge weight $w_{i,j}(t)$ over time ($\alpha = 0.05$).} % ALWAYS INCLUDE CAPTIONS IN YOUR FIGURES
% \label{fig:fd1} % USE THE CONTENT WITHIN label FOR REFERENCING IT (USE \ref WITHIN THE TEXT)
% \end{minipage}
% \hspace{0.2cm}
% \begin{minipage}[b]{0.5\linewidth}
% \centering % FIGURES SHOULD BE CENTERED
% \includegraphics[width=1\textwidth]{figuras/funcao_decaimento_2_alpha_020.eps} 
% \caption{Evolution of edge weight $w_{i,j}(t)$ over time ($\alpha = 0.20$).} % ALWAYS INCLUDE CAPTIONS IN YOUR FIGURES
% \label{fig:fd2} % USE THE CONTENT WITHIN label FOR REFERENCING IT (USE \ref WITHIN THE TEXT)
% \end{minipage}
% \end{figure}


\begin{figure}[tb] % FIGURES SHOULD BE AT THE TOP [t] OR BOTTOM [b} OF PAGES
\centering % FIGURES SHOULD BE CENTERED
\includegraphics[width=.5\textwidth]{figuras/temp_weight_example.eps} 
{\vspace{-0.3cm}}
\caption{Evolution of edge weight $w_{i,j}(t)$ over time (for $\mathbf{\alpha \in \{ 0, 0.05, 0.25 \}}$).} % ALWAYS INCLUDE CAPTIONS IN YOUR FIGURES
\label{fig:fd1} % USE THE CONTENT WITHIN label FOR REFERENCING IT (USE \ref WITHIN THE TEXT)
\end{figure}
