Package com.digiburo.backprop1b.network

Examples of com.digiburo.backprop1b.network.PatternList


  /**
   * Read and return the ASCII pattern files as Pattern objects.
   */
  public void createTrainingSet() throws Exception {
    PatternList pl = new PatternList();

    double input[] = null;
    double output[] = new double[10];

    for (int ii = 0; ii < RAW_FILENAMES.length; ii++) {
      output[ii] = zero;
    }

    for (int ii = 0; ii < RAW_FILENAMES.length; ii++) {
      System.out.println(RAW_FILENAMES[ii]);
      input = patternReader(FILE_PATH + RAW_FILENAMES[ii]);
      if (ii == 0) {
        output[ii] = one;
      } else {
        output[ii] = one;
        output[ii - 1] = zero;
      }

      pl.add(input, output);
    }

    pl.writer(new File(TRAIN_FILENAME));
  }
View Full Code Here


    /**
     * Load training datum
     * @param datum training file
     */
    public int loadTraining(File datum) throws IOException, FileNotFoundException, ClassNotFoundException {
      pl = new PatternList();
      pl.reader(datum);
      return(pl.size());
    }
View Full Code Here

    /**
     * Load training datum
     * @param datum training file
     */
    public int loadTraining(File datum) throws IOException, FileNotFoundException, ClassNotFoundException {
      pl = new PatternList();
      pl.reader(datum);
      return(pl.size());
    }
View Full Code Here

   */
  public static void main(String args[]) throws Exception {
    System.out.println("begin");

    BpDemo3 bd3 = null;
    PatternList training = null;

    training = new PatternList();
    training.reader(new File(TRAIN_FILENAME));

    if (args.length == 0) {
      bd3 = new BpDemo3(new File(NETWORK_FILENAME));
    } else {
      bd3 = new BpDemo3(new File(args[0]));
View Full Code Here

  /**
     *
     */
  public void patternReader(String file_name) throws Exception {
    pl = new PatternList();
    pl.reader(new File(file_name));

    int limit = pl.size();

    // write above answers
View Full Code Here

  /**
   * Create training datum
   */
  public int loadTraining() throws IOException, FileNotFoundException, ClassNotFoundException {
    pl = new PatternList();

    double[] input = new double[2];
    double[] output = new double[1];

    input[0] = ZERO;
View Full Code Here

TOP

Related Classes of com.digiburo.backprop1b.network.PatternList

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.