public BasicPNN create() { PNNOutputMode mode = PNNOutputMode.Regression; BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 1); BasicMLDataSet trainingSet = new BasicMLDataSet(XOR.XORInput, XOR.XORIdeal); TrainBasicPNN train = new TrainBasicPNN(network, trainingSet); train.Iteration(); XOR.VerifyXOR(network, 0.001); return network; }
public void TestClassifyPNN() { PNNOutputMode mode = PNNOutputMode.Classification; BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 2); IMLDataSet trainingData = new BasicMLDataSet(XOR.XORInput, XOR.XORIdeal); TrainBasicPNN train = new TrainBasicPNN(network, trainingData); train.Iteration(); XOR.VerifyXOR(network, 0.01); }