/**
  * Neural network learns from Java-ML data set
  *
  * @param dataSetJML Dataset Java-ML data set
  */
 @Override
 public void buildClassifier(Dataset dataSetJML) {
   DataSet dataSet =
       JMLDataSetConverter.convertJMLToNeurophDataset(
           dataSetJML, neuralNet.getInputsCount(), neuralNet.getOutputsCount());
   neuralNet.learn(dataSet);
 }
 private boolean validateAttribute(JTextField attributeField) {
   if (attributeField.isEnabled()) {
     try {
       int a = Integer.parseInt(attributeField.getText().trim());
       if (a > nnet.getInputsCount() || a <= 0) {
         JOptionPane.showMessageDialog(
             this,
             "There is no data set attribute (input) with index: " + a,
             "Error",
             JOptionPane.ERROR_MESSAGE);
         return false;
       }
       return true;
     } catch (Exception e) {
       JOptionPane.showMessageDialog(
           this,
           "Please enter an integer value in attribute field.",
           "Error",
           JOptionPane.ERROR_MESSAGE);
       return false;
     }
   }
   return true;
 }