List of usage examples for weka.classifiers.functions MultilayerPerceptron MultilayerPerceptron
public MultilayerPerceptron()
From source file:problems.NextReleaseProblem.java
public NextReleaseProblem(String solutionType, DataSet data, Integer numberOfBits) { try {/* ww w. j a v a 2 s . co m*/ dataset = data; model = new MultilayerPerceptron(); model.buildClassifier(dataset.getInstances()); reqList = ObjectDAO.getInstance().getAllReq(); numberOfVariables_ = 1; numberOfObjectives_ = 2; numberOfConstraints_ = 0; problemName_ = "NRP"; solutionType_ = new BinarySolutionType(this); for (int i = 0; i < numberOfBits; i++) { budget += reqList.get(i).getCost(); } budget = (budget * 0.4); length_ = new int[numberOfVariables_]; length_[0] = numberOfBits; if (solutionType.compareTo("Binary") == 0) { solutionType_ = new BinarySolutionType(this); } else { System.out.println("NRP: solution type " + solutionType + " invalid"); System.exit(-1); } } catch (Exception ex) { Logger.getLogger(NextReleaseProblem.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:wekimini.learning.NeuralNetModelBuilder.java
public NeuralNetModelBuilder() { classifier = new MultilayerPerceptron(); setHiddenLayers(1, HiddenLayerType.NUM_FEATURES, 0); //((MultilayerPerceptron)classifier).setHiddenLayers("i"); }