public List<Pitanja> GetTopQuestionsMatches(int questionId, int userId)
{
GetRatingsForQuestions(questionId, userId);
var sortedList = questionRecommendation.Where(x => x.Key != questionId);
List<Pitanja> recommendations = new List<Pitanja>();
foreach (var entry in sortedList)
{
double pearson = CalculatePearsonCorrelationForQuestions(questionId, entry.Key);
//Postaviti minimalnu vrijednost koeficijenta
if (pearson >= 0.2)
recommendations.Add(QAService.getPitanjeByID(entry.Key));
}
return recommendations;
}