/// <inheritdoc/> public IMLMethod CreateMethod(String methodType, String architecture, int input, int output) { if (MLMethodFactory.TypeFeedforward.Equals(methodType)) { return(_feedforwardFactory.Create(architecture, input, output)); } if (MLMethodFactory.TypeRbfnetwork.Equals(methodType)) { return(_rbfFactory.Create(architecture, input, output)); } if (MLMethodFactory.TypeSVM.Equals(methodType)) { return(_svmFactory.Create(architecture, input, output)); } if (MLMethodFactory.TypeSOM.Equals(methodType)) { return(_somFactory.Create(architecture, input, output)); } if (MLMethodFactory.TypePNN.Equals(methodType)) { return(_pnnFactory.Create(architecture, input, output)); } if (MLMethodFactory.TypeBayesian.Equals(methodType)) { return(_bayesianFactory.Create(architecture, input, output)); } throw new EncogError("Unknown method type: " + methodType); }
public IMLTrain CreateTraining(IMLMethod method, IMLDataSet training, String type, String args) { String args2 = args; if (args2 == null) { args2 = ""; } if (String.Compare(MLTrainFactory.TypeRPROP, type) == 0) { return(rpropFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeBackprop, type) == 0) { return(backpropFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSCG, type) == 0) { return(scgFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeLma, type) == 0) { return(lmaFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSVM, type) == 0) { return(svmFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSVMSearch, type) == 0) { return(svmSearchFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSOMNeighborhood, type) == 0) { return(neighborhoodFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeAnneal, type) == 0) { return(annealFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeGenetic, type) == 0) { return(geneticFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSOMCluster, type) == 0) { return(somClusterFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeManhattan, type) == 0) { return(manhattanFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeSvd, type) == 0) { return(svdFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypePNN, type) == 0) { return(pnnFactory.Create(method, training, args2)); } else if (String.Compare(MLTrainFactory.TypeQPROP, type) == 0) { return(qpropFactory.Create(method, training, args2)); } else if (MLTrainFactory.TypeBayesian.Equals(type)) { return(bayesianFactory.Create(method, training, args2)); } else if (MLTrainFactory.TypeNelderMead.Equals(type)) { return(nmFactory.Create(method, training, args2)); } else if (MLTrainFactory.TypePSO.Equals(type)) { return(psoFactory.Create(method, training, args2)); } else if (MLTrainFactory.TypeNEATGA.Equals(type)) { return(this.neatGAFactory.Create(method, training, args2)); } else if (MLTrainFactory.TypeEPLGA.Equals(type)) { return(this.eplTrainFctory.Create(method, training, args2)); } else { throw new EncogError("Unknown training type: " + type); } }