예제 #1
0
 // MAYBE: redo separating examples
 public async Task <RegionAnalysisSession> PrintSeparatingExamples()
 {
     foreach (var sigInput in await session.GetSignificantInputsAsync())
     {
         Console.Out.WriteLine("Input[Confidence=" + sigInput.Confidence + "]: " + ((StringRegion[])sigInput.Input).Select(sr => sr.Value).Aggregate((i, j) => i + ", " + j));
         //foreach (var x in session.LearnTopK(5))
         //{
         //	consolePrinter.Out.WriteLine(x.ReferenceKind.ToString() + " " + x.ProgramNode.PrintAST());
         //}
         foreach (object output in await session.ComputeTopKOutputsAsync(sigInput.Input, 5))
         {
             Console.Out.WriteLine("Possible output: " + ((List <StringRegion>)output).Select(sr => sr.Value).Aggregate((i, j) => i + ", " + j));
         }
     }
     return(this);
 }