public List<fsp_Clanci_SelectById_Result> GetTopArticleMatches(int articleId, int userId)
{
//Inicijalno ukloniti članke sa lošom prosječnom ocjenom (<2 ako ima više od 5 glasova)
//Inverse User Frequency fj = log(n/nj) - 0 ako su svi korisnici ocijenili item j
//Ovakve članke ukloniti iz preporuke?
GetRatingsForArticles(articleId, userId);
var sortedList = articleRecommendation.Where(x => x.Key != articleId);
List<fsp_Clanci_SelectById_Result> recommendations = new List<fsp_Clanci_SelectById_Result>();
foreach (var entry in sortedList)
{
double pearson = CalculatePearsonCorrelationForArticles(articleId, entry.Key);
//Postaviti minimalnu vrijednost koeficijenta
if (pearson >= 0.2)
recommendations.Add(DAClanci.SelectById(entry.Key));
}
return recommendations;
}