Package org.encog

Examples of org.encog.EncogError


  public final MLMethod create(final String architecture, final int input,
      final int output) {

    final List<String> layers = ArchitectureParse.parseLayers(architecture);
    if (layers.size() != MAX_LAYERS) {
      throw new EncogError(
          "RBF Networks must have exactly three elements, "
          + "separated by ->.");
    }

    final ArchitectureLayer inputLayer = ArchitectureParse.parseLayer(
View Full Code Here


  public final MLTrain create(final MLMethod method,
      final MLDataSet training,
      final String argsStr) {

    if (!(method instanceof SVM)) {
      throw new EncogError(
          "SVM Train training cannot be used on a method of type: "
              + method.getClass().getName());
    }

    final double defaultGamma = 1.0 / ((SVM) method).getInputCount();
View Full Code Here

  public final MLTrain create(final MLMethod method,
      final MLDataSet training,
      final String argsStr) {

    if (!(method instanceof BasicNetwork)) {
      throw new EncogError(
          "LMA training cannot be used on a method of type: "
              + method.getClass().getName());
    }

    final Map<String, String> args = ArchitectureParse.parseParams(argsStr);
View Full Code Here

  public final MLTrain create(final MLMethod method,
      final MLDataSet training,
      final String argsStr) {

    if (!(method instanceof SOM)) {
      throw new EncogError(
          "Neighborhood training cannot be used on a method of type: "
              + method.getClass().getName());
    }

    final Map<String, String> args = ArchitectureParse.parseParams(argsStr);
View Full Code Here

      copy(is,fos);

      fos.close();
      is.close();
    } catch (final IOException e) {
      throw new EncogError(e);
    }
  }
View Full Code Here

        if (length > 0) {
          os.write(buffer, 0, length);
        }
      } while (length > 0);
    } catch(IOException ex) {
      throw new EncogError(ex);
    }
  }
View Full Code Here

    OutputStream os = new FileOutputStream(targetFile);
    copy(is,os);
    is.close();
    os.close();
    } catch(IOException ex) {
      throw new EncogError(ex);
    }
  }
View Full Code Here

      // close the files after the copy
      in.close();
      out.close();
    } catch (final IOException e) {
      throw new EncogError(e);
    }
  }
View Full Code Here

      for (final File element : files) {
        if (element.isDirectory()) {
          Directory.deleteDirectory(element);
        } else {
          if (!element.delete()) {
            throw new EncogError("Failed to delete: "
                + element.toString() + "\nFile may be in use.");
          }
        }
      }
    }
View Full Code Here

      }
      reader.close();

      return sb.toString();
    } catch (final IOException e) {
      throw new EncogError(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.encog.EncogError

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.