private LogisticRegression GetTaughtRegression(KnownFacts known)
 {
     double[][] inputs = known.Samples.Select(GetInput).ToArray();
     double[] outputs = known.Samples.Select(GetOutput).ToArray();
     var regression = new LogisticRegression(inputs.Length);
     Teach(regression, inputs, outputs);
     return regression;
 }
 public double[] Teach(KnownFacts known)
 {
     return GetTaughtRegression(known).Coefficients;
 }
 public Probability Classify(KnownFacts known, UnknownSample unknown)
 {
     double probability = GetTaughtRegression(known).Compute(GetInput(unknown));
     return new Probability(probability);
 }