1%{ @file cache_prob_spm.m
2 % @brief Computes cache hit probabilities
using saddle-point method
4 % @author LINE Development Team
8 % @brief Computes cache hit probabilities
using saddle-point approximation
11 % This function computes cache hit probability distribution
using the
12 % saddle-point method (SPM)
for approximation.
16 % prob = cache_prob_spm(gamma, m)
17 % prob = cache_prob_spm(gamma, m, lE)
22 % <tr><th>Name<th>Description
23 % <tr><td>gamma<td>Item popularity probabilities
24 % <tr><td>m<td>Cache capacity vector
25 % <tr><td>lE<td>(Optional) Pre-computed log of normalizing constant
30 % <tr><th>Name<th>Description
31 % <tr><td>prob<td>Cache hit probability distribution
34function prob = cache_prob_spm(gamma,m, lE)
37[~, lE] = cache_spm(gamma,m);
41 [~, lEi] = cache_spm(gamma(setdiff(1:n,i),:),oner(m,j));
42 prob(i,1+j) = m(j) * gamma(i,j) * exp(lEi-lE);
44 prob(i,1) = abs(1 - sum(prob(i,2:end)));