Examples of AnalystError


Examples of org.encog.app.analyst.AnalystError

      break;
    case SingleField:
      resultIndex = (int) data[0];
      break;
      default:
        throw new AnalystError("Unknown action: " + this.action);
    }

    return this.classes.get(resultIndex);
  }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

      break;
    case SingleField:
      resultIndex = (int) d[0];
      break;
    default:
      throw new AnalystError("Invalid action: " + this.action);
    }

    if (resultIndex < 0) {
      return null;
    }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

   * @param analyst
   * @return
   */
  public int determineMode(EncogAnalyst analyst) {
    if( !this.isClassify() ) {
      throw new AnalystError("Can only calculate the mode for a class.");
    }
   
    DataField df = analyst.getScript().findDataField(this.name);
    AnalystClassItem m = null;
    int result = 0;
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

  public final void produceReport(final File filename) {
    try {
      final String str = produceReport();
      FileUtil.writeFileAsString(filename, str);
    } catch (final IOException ex) {
      throw new AnalystError(ex);
    }
  }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

        } else if ("list-string".equalsIgnoreCase(typeStr)) {
          t = PropertyType.TypeListString;
        } else if ("string".equalsIgnoreCase(typeStr)) {
          t = PropertyType.TypeString;
        } else {
          throw new AnalystError("Unknown type constraint: "
              + typeStr);
        }

        final PropertyEntry entry = new PropertyEntry(t, nameStr,
            sectionStr);
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

      final String subSection, final String name) {
    final String key = section.toUpperCase() + ":"
        + subSection.toUpperCase();
    final List<PropertyEntry> list = this.data.get(key);
    if (list == null) {
      throw new AnalystError("Unknown section and subsection: " + section
          + "." + subSection);
    }
    for (final PropertyEntry entry : list) {
      if (entry.getName().equalsIgnoreCase(name)) {
        return entry;
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

          result.append(PropertyEntry.dotForm(section, subSection,
              name));
          result.append(", value is ");
          result.append(value);
          result.append(".");
          throw new AnalystError(result.toString());
        }
        break;
      case TypeDouble:
        Double.parseDouble(value);
        break;
      case typeFormat:
        if (ConvertStringConst.string2AnalystFileFormat(value)
            == null) {
          final StringBuilder result = new StringBuilder();
          result.append("Invalid file format for ");
          result.append(PropertyEntry.dotForm(section, subSection,
              name));
          result.append(", value is ");
          result.append(value);
          result.append(".");
          throw new AnalystError(result.toString());
        }
        break;
      case TypeInteger:
        Integer.parseInt(value);
        break;
      case TypeListString:
        break;
      case TypeString:
        break;
      default:
        throw new AnalystError("Unsupported property type.");
      }
    } catch (final NumberFormatException ex) {
      final StringBuilder result = new StringBuilder();
      result.append("Illegal value for ");
      result.append(PropertyEntry.dotForm(section, subSection, name));
      result.append(", expecting a ");
      result.append(getEntryType().toString());
      result.append(", but got ");
      result.append(value);
      result.append(".");
      throw new AnalystError(result.toString());
    }
  }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

   */
  public final String getFilename(final String file) {
    final String key2 = "SETUP:FILENAMES_" + file;

    if (!this.data.containsKey(key2)) {
      throw new AnalystError("Undefined file: " + file);
    }

    return this.data.get(key2);
  }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

      if (value == null) {
        return 0;
      }
      return Integer.parseInt(value);
    } catch (final NumberFormatException ex) {
      throw new AnalystError(ex);
    }
  }
View Full Code Here

Examples of org.encog.app.analyst.AnalystError

   */
  public final URL getPropertyURL(final String name) {
    try {
      return new URL(this.data.get(name));
    } catch (final MalformedURLException e) {
      throw new AnalystError(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.