예제 #1
0
 /// <summary>
 /// Probability Result of the PDA Analysis
 /// </summary>
 /// <param name="data"></param>
 public void SendDataResultSet(PropabilityDataSet data)
 {
     lock (tableLock)
     {
         UserDataSet dataSet = table.FirstOrDefault(item => item.Ident.Equals(data.userID) && item.Time.Equals(data.time));
         dataSet.RawPropabilities = data.propabilities;
     }
 }
예제 #2
0
        private UserResponseDataSet CreateUserReport(Guid userId, DateTime time)
        {
            if (!NewFindingAvailable(userId, time))
            {
                return(new UserResponseDataSet());
            }

            PropabilityDataSet sourceData = dataService.RequestDiseasePropability(userId, time);

            UserResponseDataSet res = new UserResponseDataSet();

            res.userID        = userId;
            res.time          = time;
            res.propabilities = sourceData?.propabilities;
            res.diseaseTypes  = knowledgeService.GetDiseaseIdentData();
            var maxLikelyDisease = res.propabilities.Aggregate((x, y) => x.propability > y.propability ? x : y);

            res.message = knowledgeService.EvaluateSpecificDisease(maxLikelyDisease.id, maxLikelyDisease.propability);
            return(res);
        }
예제 #3
0
 private void executeAnalyzing()
 {
     try
     {
         outputData = new PropabilityDataSet()
         {
             userID        = inputData.userID,
             time          = inputData.time,
             propabilities = knowledgeService.GetDiseaseTypes().Select(item => new DiseaseData()
             {
                 id = item.IdentData.id, propability = item.propabilityAlgorithm(inputData)
             }).ToList()
         };
     }
     catch (Exception err)
     {
         System.Diagnostics.Trace.Write(err);
         outputData = new PropabilityDataSet();
     }
 }
예제 #4
0
 public void SendHistoryResultSet(PropabilityDataSet data)
 {
     throw new NotImplementedException();
 }