public IEnumerable <string> InferEasyRules(IEnumerable <string> jsonObjects, InferenceType inferenceType = InferenceType.Pessimistic) { var dymeRules = GetRulesFromWorlds(jsonObjects, inferenceType); var easyRules = ConvertDymeRulesToEasyRules(dymeRules); return(easyRules); }
/// <summary> /// Model constructor /// </summary> /// <param name="inferenceType">A value that specifies the type of inference (i.e. TemporalNextStep, Classification, etc.).</param> protected Model(InferenceType inferenceType) { this._numPredictions = 0; this.__inferenceType = inferenceType; this.__learningEnabled = true; this.__inferenceEnabled = true; this.__inferenceArgs = new Map <string, object>(); }
public CategoricalDistribution AskBayesianModel(object owner, IContextLookup globalVars) { var randomVariables = BayesianNetwork.GetRandomVariables(owner, globalVars); var network = BayesianNetwork.GetNetwork(randomVariables); var inference = InferenceType.GetInference(); var model = new FiniteBayesModel(network, inference); return(Ask.AskBayesianModel(owner, globalVars, randomVariables, model)); }
public Inference(Candidate start, Candidate end, InferenceType inferenceType) { (Start, End, InferenceType) = (start, end, inferenceType); }
public static IEnumerable <string> ReturnInferredEasyRules(IEnumerable <string> jsonObjects, InferenceType inferenceType = InferenceType.Pessimistic) { var evaluator = new JsonEasyRuleEvaluator(); return(evaluator.InferEasyRules(jsonObjects, inferenceType)); }
private IEnumerable <IEvaluatable> GetRulesFromWorlds <WorldType>(IEnumerable <WorldType> dymeWorlds, InferenceType inferenceType) { switch (inferenceType) { case InferenceType.Pessimistic: return(_inferenceEngineSvc.GetRulesForWorlds(dymeWorlds, InferenceMethod.Pessimistic)); } throw new Exception("Invalid inference type"); }
public InferenceException(InferenceType inferenceType, string message, Exception inner) : base(message, inner) { }
public InferenceException(InferenceType inferenceType, string message) : base(message) { }
/// <summary> /// Selects the algorithm for INFERENCE. /// </summary> /// <param name="iStrategy"></param> public void SetInference(InferenceType iStrategy) { this.InferenceStrategy = iStrategy; }