Package org.encog.app.analyst

Examples of org.encog.app.analyst.AnalystError


    for (String line : this.lines) {
      line = line.trim();
      if (line.length() > 0) {
        final int idx = line.indexOf('=');
        if (idx == -1) {
          throw new AnalystError("Invalid setup item: " + line);
        }
        final String name = line.substring(0, idx).trim();
        final String value = line.substring(idx + 1).trim();

        result.put(name, value);
View Full Code Here


   */
  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

      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

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

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

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

   * @param analyst The Encog analyst.
   * @return The mode.
   */
  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

   */
  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

Related Classes of org.encog.app.analyst.AnalystError

Copyright © 2018 www.massapicom. 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.