public AnalyticRuleSettings Aggregate() { ReliabilityEvaluator evaluator = new ReliabilityEvaluator(item); AnalyticItemSettingsReliability reliability = evaluator.Evaluate(); AnalyticRuleSettings result = new AnalyticRuleSettings(item.Type, reliability); result.EngineType = item.TargetEngineType; result.EngineFamilyType = item.TargetEngineFamilyType; // 1. Get math expectation double m = item.GetDoubleValues().Average(); // 2. Get Sigma double sigma = Sigma.Get(item.GetDoubleValues().ToList()); float a = StandardAggregatorSettings.OptimalBound; float b = StandardAggregatorSettings.MaxAcceptableBound; result.SettingsMolecule.StatisticalAtom.MinOptimal = 0; // 3. Get optimal bound as M + A*Sigma result.SettingsMolecule.StatisticalAtom. MaxOptimal = m + a * sigma; // 4. Get acceptable bound as M + B*Sigma result.SettingsMolecule.StatisticalAtom. MaxAcceptable = m + b * sigma; result.SettingsMolecule.StatisticalAtom.MinAcceptable = 0; return(result); }
public AnalyticRuleSettings(AnalyticRuleType type, AnalyticItemSettingsReliability reliability) { SettingsMolecule = new SettingsMolecule(); RuleType = type; Reliability = reliability; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { AnalyticItemSettingsReliability reliability = (AnalyticItemSettingsReliability)value; string key = String.Format("Reliability{0}DisplayName", reliability); return(CodeBehindStringResolver.Resolve(key)); }
// we need to update a Reliability data if there is some override // overrides are a Special Case for Reliability - need a special Arbitrator here public void SummarizeFor(AnalyticRuleSettingsEntity settings) { if (settings == null) { throw new ArgumentNullException("settings"); } if (!settings.SettingsMolecule.First().OverrideAcceptable && !settings.SettingsMolecule.First().OverrideOptimal) { // all is up to date return; } if (settings.SettingsMolecule.First().OverrideAcceptable && settings.SettingsMolecule.First().OverrideOptimal) { settings.Reliability = (int)AnalyticItemSettingsReliability.High; return; } // We have one predefined value, it means that Reliability is High for overriden AnalyticItemSettingsReliability finalReliability = Upgrade(settings.Reliability); settings.Reliability = (int)finalReliability; }
public AnalyticRuleSettings(AnalyticRuleType type, AnalyticItemSettingsReliability reliability) { this.type = type; this.reliability = reliability; }