public GenderComputationTester(GenderComputation computation, GenderTestSet testSetType) { Contract.Requires(computation != null); Computation = computation; TestSetType = testSetType; }
static void Main(string[] args) { var network = LoadNetwork("comp.xml"); var comp = new GenderComputation(network, 1); var test = new GenderComputationTester(comp, GenderTestSet.Validation); test.Update(); Console.WriteLine("Count: {0} Passed: {1} Failed: {2}", test.TestedItems, test.PassedItems, test.FailedItems); Console.WriteLine("Ratio: {0}", Math.Round(test.PassedRatio * 100.0, 4)); Console.ReadKey(); }
private static void Test(NeuralNetwork network) { var comp = new GenderComputation(network, Properties.Settings.Default.NumberOfIterations); var test = new GenderComputationTester(comp, GenderTestSet.Validation); test.Update(); Console.WriteLine("\nCount: {0} Passed: {1} Failed: {2}", test.TestedItems, test.PassedItems, test.FailedItems); Console.WriteLine("Ratio: {0}\n", Math.Round(test.PassedRatio * 100.0, 4)); Console.ReadKey(); }