@Override
 public void close() {
   if (attributeEditor.hasDataChanged()) {
     int selectedOption =
         JOptionPane.showConfirmDialog(
             this,
             "It seems that you have changed the data without saving it afterwards."
                 + Tools.getLineSeparator()
                 + "Do you still want to proceed and close the editor (changes will be lost)?",
             "Save data file?",
             JOptionPane.YES_NO_OPTION,
             JOptionPane.QUESTION_MESSAGE);
     if (selectedOption == JOptionPane.YES_OPTION) dispose();
   } else if (attributeEditor.hasMetaDataChanged()) {
     int selectedOption =
         JOptionPane.showConfirmDialog(
             this,
             "It seems that you have changed the attribute descriptions without saving an attribute description file (.aml) afterwards."
                 + Tools.getLineSeparator()
                 + "Do you still want to proceed and close the editor (changes will be lost)?",
             "Save attribute description file?",
             JOptionPane.YES_NO_OPTION,
             JOptionPane.QUESTION_MESSAGE);
     if (selectedOption == JOptionPane.YES_OPTION) dispose();
   } else {
     dispose();
   }
 }
Пример #2
0
 @Override
 public String toResultString() {
   StringBuilder result =
       new StringBuilder(
           Tools.getLineSeparator() + "Principal Components:" + Tools.getLineSeparator());
   if (manualNumber) {
     result.append("Number of Components: " + numberOfComponents + Tools.getLineSeparator());
   } else {
     result.append("Proportion Threshold: " + proportionThreshold + Tools.getLineSeparator());
   }
   for (int i = 0; i < vMatrix.getColumnDimension(); i++) {
     result.append("PC " + (i + 1) + ": ");
     for (int j = 0; j < attributeNames.length; j++) {
       double value = vMatrix.get(i, j);
       if (value > 0) {
         result.append(" + ");
       } else {
         result.append(" - ");
       }
       result.append(Tools.formatNumber(Math.abs(value)) + " * " + attributeNames[j]);
     }
     result.append(Tools.getLineSeparator());
   }
   return result.toString();
 }
Пример #3
0
 @Override
 public String toString() {
   StringBuilder result =
       new StringBuilder(
           Tools.getLineSeparator() + "Principal Components:" + Tools.getLineSeparator());
   if (manualNumber) {
     result.append("Number of Components: " + numberOfComponents + Tools.getLineSeparator());
   } else {
     result.append("Variance Threshold: " + varianceThreshold + Tools.getLineSeparator());
   }
   return result.toString();
 }
Пример #4
0
 @Override
 public String toString() {
   StringBuffer result = new StringBuffer(Tools.getLineSeparator() + "PerformanceVector [");
   for (int i = 0; i < size(); i++) {
     Averagable avg = getAveragable(i);
     if ((mainCriterion != null) && (avg.getName().equals(mainCriterion))) {
       result.append(Tools.getLineSeparator() + "*****");
     } else {
       result.append(Tools.getLineSeparator() + "-----");
     }
     result.append(avg);
   }
   result.append(Tools.getLineSeparator() + "]");
   return result.toString();
 }
 public String toString(int maxNumber) {
   Collections.sort(associationRules);
   StringBuffer buffer = new StringBuffer("Association Rules" + Tools.getLineSeparator());
   int counter = 0;
   for (AssociationRule rule : associationRules) {
     if ((maxNumber >= 0) && (counter > maxNumber)) {
       buffer.append("... " + (associationRules.size() - maxNumber) + " other rules ...");
       break;
     }
     buffer.append(rule.toString());
     buffer.append(Tools.getLineSeparator());
     counter++;
   }
   return buffer.toString();
 }
Пример #6
0
  @Override
  public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append("Threshold: ");
    builder.append(threshold);
    builder.append(Tools.getLineSeparator());
    builder.append("first class: ");
    builder.append(zeroClass);
    builder.append(Tools.getLineSeparator());
    builder.append("second class: ");
    builder.append(oneClass);

    builder.append(Tools.getLineSeparator());
    builder.append("if confidence(" + oneClass + ") > " + threshold + " then " + oneClass);
    builder.append(Tools.getLineSeparator());
    builder.append("else " + zeroClass);
    return builder.toString();
  }
 /** Sends the output to the LogService. */
 private void logOutput(String message, InputStream in) throws IOException {
   BufferedReader bin = new BufferedReader(new InputStreamReader(in));
   String line = null;
   StringBuffer buffer = new StringBuffer(message);
   while ((line = bin.readLine()) != null) {
     buffer.append(Tools.getLineSeparator());
     buffer.append(line);
   }
   logNote(buffer.toString());
 }
  @Override
  public String toResultString() {
    StringBuilder builder = new StringBuilder();

    builder.append(
        "Denormalization Model of the following Normalization:" + Tools.getLineSeparator());
    builder.append(invertedModel.toResultString());

    return builder.toString();
  }
Пример #9
0
 @Override
 public String toString() {
   StringBuffer result =
       new StringBuffer(
           "IOContainer (" + ioObjects.size() + " objects):" + Tools.getLineSeparator());
   Iterator i = ioObjects.iterator();
   while (i.hasNext()) {
     IOObject current = (IOObject) i.next();
     if (current != null) {
       result.append(
           current.toString()
               + Tools.getLineSeparator()
               + (current.getSource() != null
                   ? "(created by " + current.getSource() + ")" + Tools.getLineSeparator()
                   : ""));
     }
   }
   return result.toString();
 }
Пример #10
0
 /** @return a <code>String</code> representation of this scaling model. */
 @Override
 public String toString() {
   String result =
       super.toString()
           + " ("
           + this.parameters.toString()
           + ") "
           + Tools.getLineSeparator()
           + "Model: "
           + model.toResultString();
   return result;
 }
Пример #11
0
 @Override
 public String toString() {
   StringBuffer buffer = new StringBuffer();
   if ((classPositive != null) && (classNegative != null))
     buffer.append(
         "Hyperplane seperating "
             + classPositive
             + " and "
             + classNegative
             + "."
             + Tools.getLineSeparator());
   else buffer.append("Hyperplane for linear regression." + Tools.getLineSeparator());
   buffer.append("Intercept: ");
   buffer.append(Double.toString(intercept));
   buffer.append(Tools.getLineSeparator());
   buffer.append("Coefficients: " + Tools.getLineSeparator());
   int counter = 0;
   for (double value : coefficients) {
     buffer.append(
         "w("
             + coefficientNames[counter]
             + ") = "
             + Tools.formatIntegerIfPossible(value, 3)
             + Tools.getLineSeparator());
     counter++;
   }
   buffer.append(Tools.getLineSeparator());
   return buffer.toString();
 }
Пример #12
0
 @Override
 public String toResultString() {
   StringBuilder result =
       new StringBuilder(
           Tools.getLineSeparator() + "Principal Components:" + Tools.getLineSeparator());
   if (manualNumber) {
     result.append("Number of Components: " + numberOfComponents + Tools.getLineSeparator());
   } else {
     result.append("Variance Threshold: " + varianceThreshold + Tools.getLineSeparator());
   }
   for (int i = 0; i < eigenVectors.size(); i++) {
     result.append("PC " + (i + 1) + ": ");
     for (int j = 0; j < attributeNames.length; j++) {
       double value = eigenVectors.get(i).getEigenvector()[j];
       if (value > 0) result.append(" + ");
       else result.append(" - ");
       result.append(Tools.formatNumber(Math.abs(value)) + " * " + attributeNames[j]);
     }
     result.append(Tools.getLineSeparator());
   }
   return result.toString();
 }
 /** @return a <code>String</code> representation of this boosting model. */
 @Override
 public String toString() {
   StringBuffer result =
       new StringBuffer(
           super.toString()
               + Tools.getLineSeparator()
               + "Number of inner models: "
               + this.getNumberOfModels()
               + Tools.getLineSeparators(2));
   for (int i = 0; i < this.getNumberOfModels(); i++) {
     Model model = this.getModel(i);
     result.append(
         (i > 0 ? Tools.getLineSeparator() : "")
             + "Embedded model #"
             + i
             + " (weight: "
             + Tools.formatNumber(this.getWeightForModel(i))
             + "): "
             + Tools.getLineSeparator()
             + model.toResultString());
   }
   return result.toString();
 }
Пример #14
0
 public String toString(int numberOfExamples, boolean onlySV) {
   StringBuffer result =
       new StringBuffer(
           "SVM Example Set ("
               + (onlySV
                   ? (getNumberOfSupportVectors() + " support vectors")
                   : (train_size + " examples"))
               + "):"
               + Tools.getLineSeparator()
               + "b: "
               + b
               + Tools.getLineSeparator());
   for (int e = 0; e < numberOfExamples; e++) {
     if (!onlySV || (alphas[e] != 0.0d)) {
       for (int a = 0; a < atts[e].length; a++) {
         result.append(index[e][a] + ":");
         result.append(atts[e][a] + " ");
       }
       result.append(", alpha: " + alphas[e]);
       result.append(", y: " + ys[e] + Tools.getLineSeparator());
     }
   }
   return result.toString();
 }
 /** @return a <code>String</code> representation of this rule model. */
 public String toString() {
   StringBuffer result =
       new StringBuffer(
           super.toString()
               + Tools.getLineSeparator()
               + " ("
               + this.getLabel().getName()
               + "="
               + (this.getLabel().getMapping().mapIndex(this.predictedLabel))
               + ") <-- ");
   for (int i = 0; i < this.getRuleLength(); i++) {
     Attribute att = this.getAttributeOfLiteral(i);
     String val = att.getMapping().mapIndex((int) this.getTestedValueAtLiteral(i));
     result.append((i > 0 ? ", " : "") + ("(" + att.getName() + "=" + val + ")"));
   }
   return result.toString();
 }
 protected String createProcessTree(
     int indent, String selfPrefix, String childPrefix, Operator markOperator, String mark) {
   String tree = Tools.indent(indent) + " subprocess '" + getName() + "'";
   Iterator<Operator> i = operators.iterator();
   while (i.hasNext()) {
     tree +=
         Tools.getLineSeparator()
             + i.next()
                 .createProcessTree(
                     indent,
                     childPrefix + "+- ",
                     childPrefix + (i.hasNext() ? "|  " : "   "),
                     markOperator,
                     mark);
   }
   return tree;
 }
 @Override
 public String toString() {
   StringBuffer distributionDescription = new StringBuffer();
   boolean first = true;
   for (int i = 0; i < valueNames.length; i++) {
     if (!first) {
       distributionDescription.append("\t");
     }
     distributionDescription.append(valueNames[i]);
     first = false;
   }
   first = true;
   distributionDescription.append(Tools.getLineSeparator());
   for (int i = 0; i < valueNames.length; i++) {
     if (!first) {
       distributionDescription.append("\t");
     }
     distributionDescription.append(Tools.formatNumber(probabilities[i]));
     first = false;
   }
   return distributionDescription.toString();
 }
 public String toString() {
   StringBuffer s = new StringBuffer("A cluster model with the following properties:");
   s.append(Tools.getLineSeparator());
   if (properties.getKeys().hasNext()) s.append(Tools.getLineSeparator() + properties.toString());
   return s.toString();
 }
Пример #19
0
 @Override
 public String toString() {
   return indexToSymbolMap.toString() + Tools.getLineSeparator() + symbolToIndexMap.toString();
 }