public DeseasesToMedicamentsTable( InvertedIndexUnit[] deseases, InvertedIndexUnit[] medicaments, int minAmount = 50)
 {
     MedicalGuide = new Dictionary<Tuple<string, string>, int>();
     this.deseases = deseases;
     this.medicaments = medicaments;
     this.minAmount = minAmount;
     Initialize();
 }
 public static string FormatStringWrite(InvertedIndexUnit unit)
 {
     return unit.Word + " " + String.Join(" ", unit.Ids);
 }
Beispiel #3
0
 public SortedDictionary<string, double> SymptomIntensityDistributionInDays(InvertedIndexUnit symptom)
 {
     var numerator = GetDistribution(symptom.Ids.Select(id => QuestionList.GetQuestion(id).DateAdded.AddDays(-(int)QuestionList.GetQuestion(id).DateAdded.DayOfWeek).ToShortDateString()));
     var denominator = GetDistribution(Questions.Select(q => q.DateAdded.AddDays(-(int)q.DateAdded.DayOfWeek).ToShortDateString()));
     return Utilits.DistributionQuotient(numerator, denominator);
 }