@Override public void resultChanged(LookupEvent le) { Lookup.Result r = (Lookup.Result) le.getSource(); Collection c = r.allInstances(); if (!c.isEmpty()) { dataset = (DataSet) c.iterator().next(); datasetTextField.setEnabled(true); datasetTextField.setText(dataset.getLabel()); graphTypeCombo.removeAllItems(); if (nnet != null && dataset != null) { graphTypeCombo.addItem(new OutputSurface3D(nnet, dataset)); graphTypeCombo.addItem(new ErrorSurface3D(nnet, dataset)); graphTypeCombo.addItem(new OutputForAttributeSurface3D(nnet, dataset)); graphTypeCombo.addItem(new ErrorForAttributeSurface3D(nnet, dataset)); datasetRowCount = dataset.getRows().size(); drawButton.setEnabled(true); } } }
public ErrorSurface3D(NeuralNetwork nnet, DataSet dataset) { dataProvider3D = new ErrorDataProvider3D(dataset, nnet); dataSetRowCount = dataset.getRows().size(); outputNeuronCount = nnet.getOutputsCount(); }