Package org.encog

Examples of org.encog.EncogError


        }
      }

      this.data = null;
    } catch (final IOException e) {
      throw new EncogError(e);
    }
  }
View Full Code Here


   */
  public void close() {
    try {
      this.reader.close();
    } catch (final IOException e) {
      throw new EncogError(e);
    }
  }
View Full Code Here

    try {
      final String str = get(column);
      return this.sdf.parse(str);
    } catch (final ParseException e) {
      throw new EncogError(e);
    }

  }
View Full Code Here

        }
      }

      return true;
    } catch (final IOException e) {
      throw new EncogError(e);
    }

  }
View Full Code Here

   *            Total workload size.
   */
  public DetermineWorkload(final int threads, final int workloadSize) {

    if( workloadSize==0) {
      throw new EncogError("Workload is of size zero.");
    }
   
    this.workloadSize = workloadSize;
    if (threads == 0) {
      int num = Runtime.getRuntime().availableProcessors();
View Full Code Here

    } else if (MLMethodFactory.TYPE_SOM.equals(methodType)) {
      return this.somFactory.create(architecture, input, output);
    } else if (MLMethodFactory.TYPE_PNN.equals(methodType)) {
      return this.pnnFactory.create(architecture, input, output);
    }
    throw new EncogError("Unknown method type: " + methodType);
  }
View Full Code Here

    } else if (MLTrainFactory.TYPE_PNN.equalsIgnoreCase(type)) {
      return this.pnnFactory.create(method, training, args2);
    } else if (MLTrainFactory.TYPE_QPROP.equalsIgnoreCase(type)) {
      return this.qpropFactory.create(method, training, args2);
    } else {
      throw new EncogError("Unknown training type: " + type);
    }
  }
View Full Code Here

          throw e;
        }
        try {
          Thread.sleep(YahooSearch.RETRY_SLEEP);
        } catch (final InterruptedException e1) {
          throw new EncogError("Interrupted");
        }
      }
      tries++;
    }
View Full Code Here

    int index = fn.indexOf('[');
    if (index != -1) {
      name = fn.substring(0, index).toLowerCase();
      int index2 = fn.indexOf(']');
      if (index2 == -1) {
        throw new EncogError(
            "Unbounded [ while parsing activation function.");
      }
      String a = fn.substring(index + 1, index2);
      params = NumberList.fromList(CSVFormat.EG_FORMAT, a);

    } else {
      name = fn.toLowerCase();
      params = new double[0];
    }

    ActivationFunction af = allocateAF(name);
   
    if( af==null ) {
      return null;
    }

    if (af.getParamNames().length != params.length) {
      throw new EncogError(name + " expected "
          + af.getParamNames().length + ", but " + params.length
          + " were provided.");
    }

    for (int i = 0; i < af.getParamNames().length; i++) {
View Full Code Here

   */
  @Override
  public final void randomize(final MLMethod method) {
   
    if( !(method instanceof BasicNetwork) ) {
      throw new EncogError("Ngyyen Widrow only works on BasicNetwork.");
    }
   
    BasicNetwork network = (BasicNetwork)method;

    new RangeRandomizer(getMin(), getMax()).randomize(network);
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.