亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? prune.java

?? Prune a JOONE neural network with a selective prune algorithm.
?? JAVA
字號:
/** * Prune * Copyright 2005 by Jeff Heaton(jeff@jeffheaton.com) * * Example program from Chapter 11 * Programming Neural Networks in Java * http://www.heatonresearch.com/articles/series/1/ * * This software is copyrighted. You may use it in programs * of your own, without restriction, but you may not * publish the source code without the author's permission. * For more information on distributing this code, please * visit: *    http://www.heatonresearch.com/hr_legal.php * * @author Jeff Heaton * @version 1.1 */public class Prune {  /**   * The neural network that is currently being processed.   */  protected Network currentNetwork;  /**   * The training set.   */  protected double train[][];  /**   * The ideal results from the training set.   */  protected double ideal[][];  /**   * The desired learning rate.   */  protected double rate;  /**   * The desired momentum.   */  protected double momentum;;  protected double minError;  /**   * The current error.   */  protected double error;  /**   * Used to determine if training is still effectve. Holds the error level   * the last time the error level was tracked. This is 1000 cycles ago. If   * no significant drop in error occurs for 1000 cycles, training ends.   */  protected double markErrorRate;  /**   * Used with markErrorRate. This is the number of cycles since the error   * was last marked.   */  protected int sinceMark;  /**   * The number of cycles used.   */  protected int cycles;  /**   * The number of hidden neurons.   */  protected int hiddenNeuronCount;  /**   * Flag to indicate if the incramental prune process   * is done or not.   */  protected boolean done;  /**   * Constructor used to setup the prune object for an incramental prune.   *   * @param rate The desired learning rate.   * @param momentum The desired momentum.   * @param train The training data.   * @param ideal The ideal results for the training data.   * @param minError The minimum error that is acceptable.   */  public Prune(double rate,double momentum,double train[][],double ideal[][],double minError)  {    this.rate = rate;    this.momentum = momentum;    this.train = train;    this.ideal = ideal;    this.minError = minError;  }  /**   * Constructor that is designed to setup for a selective   * prune.   *   * @param network The neural network that we wish to prune.   * @param train   * @param ideal   */  public Prune(Network network,double train[][],double ideal[][])  {    this.currentNetwork = network;    this.train = train;    this.ideal = ideal;  }  /**   * Method that is called to start the incramental prune   * process.   */  public void startIncramental()  {    hiddenNeuronCount = 1;    cycles = 0;    done = false;    currentNetwork = new Network(                                train[0].length,                                hiddenNeuronCount,                                ideal[0].length,                                rate,                                momentum);  }  /**   * Internal method that is called at the end of each   * incramental cycle.   */  protected void incrament()  {    boolean doit = false;    if (markErrorRate==0) {      markErrorRate = error;      sinceMark = 0;    } else {      sinceMark++;      if (sinceMark>10000) {        if ( (markErrorRate-error)<0.01 )          doit = true;        markErrorRate = error;        sinceMark = 0;      }    }    if (error<minError)      done = true;    if (doit) {      cycles = 0;      hiddenNeuronCount++;      currentNetwork = new Network(                                  train[0].length,                                  hiddenNeuronCount,                                  ideal[0].length,                                  rate,                                  momentum);    }  }  /**   * Method that is called to prune the neural network incramentaly.   */  public void pruneIncramental()  {    if (done)      return;    for (int i=0;i<train.length;i++) {      currentNetwork.computeOutputs(train[i]);      currentNetwork.calcError(ideal[i]);      currentNetwork.learn();    }    error = currentNetwork.getError(train.length);    cycles++;    incrament();  }  /**   * Called to get the current error.   *   * @return The current error.   */  public double getError()  {    return error;  }  /**   * Get the number of hidden neurons.   *   * @return The number of hidden neurons.   */  public double getHiddenNeuronCount()  {    return hiddenNeuronCount;  }  /**   * Called to get the current number of cycles.   *   * @return The current number of cycles.   */  public int getCycles()  {    return cycles;  }  /**   * Called to determine if we are done in an incremental prune.   *   * @return Returns true if we are done, false otherwise.   */  public boolean getDone()  {    return done;  }  /**   * Get the current neural network.   *   * @return The neural network.   */  public Network getCurrentNetwork()  {    return currentNetwork;  }  /**   * Internal method used to clip the hidden neurons.   *   * @param neuron The neuron to clip.   * @return Returns the new neural network.   */  protected Network clipHiddenNeuron(int neuron)  {    Network result = new Network(                                currentNetwork.getInputCount(),                                currentNetwork.getHiddenCount()-1,                                currentNetwork.getOutputCount(),                                currentNetwork.getLearnRate(),                                currentNetwork.getMomentum());    double array1[] = currentNetwork.toArray();    double array2[] = new double[array1.length];    int index1 = 0;    int index2 = 0;    // weight matrix    for (int i=0;i<currentNetwork.getInputCount();i++) {      for (int j=0;j<currentNetwork.getHiddenCount();j++) {        if (j!=neuron) {          array2[index2] = array1[index1];          index2++;        }        index1++;      }    }    for (int i=0;i<currentNetwork.getHiddenCount();i++) {      for (int j=0;j<currentNetwork.getOutputCount();j++) {        if (i!=neuron) {          array2[index2] = array1[index1];          index2++;        }        index1++;      }    }    // threshold    int neuronCount =    currentNetwork.getInputCount()+    currentNetwork.getHiddenCount()+    currentNetwork.getOutputCount();    for (int i=0;i<neuronCount;i++) {      if (i!=currentNetwork.getInputCount()+neuron) {        array2[index2] = array1[index1];        index2++;      }      index1++;    }    result.fromArray(array2);    return result;  }  /**   * Internal method to determine the error for a neural network.   *   * @param network The neural network that we are seeking a error rate for.   * @return The error for the specified neural network.   */  protected double determineError(Network network)  {    for (int i=0;i<train.length;i++) {      network.computeOutputs(train[i]);      network.calcError(ideal[i]);      network.learn();    }    return network.getError(train.length);  }  /**   * Internal method that will loop through all hidden neurons and   * prune them if pruning the neuron does not cause too great of an   * increase in error.   *   * @return True if a prune was made, false otherwise.   */  protected boolean findNeuron()  {    double e1 = determineError(currentNetwork);    for (int i=0;i<currentNetwork.getHiddenCount();i++) {      Network trial = this.clipHiddenNeuron(i);      double e2 = determineError(trial);      if ( Math.abs(e1-e2)<0.2 ) {        currentNetwork = trial;        return true;      }    }    return false;  }  /**   * Called to complete the selective pruning process.   *   * @return The number of neurons that were pruned.   */  public int pruneSelective()  {    int i = currentNetwork.getHiddenCount();    while (findNeuron());    return(i-currentNetwork.getHiddenCount());  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩中文字幕1| 日韩欧美中文字幕制服| 欧美一区二区三区播放老司机| 国产午夜精品理论片a级大结局| 6080午夜不卡| 久久久精品免费观看| 成人激情小说乱人伦| 日本一区免费视频| 亚洲女同一区二区| 欧美日韩一本到| 国产精品99久久久久久久女警 | 一区二区三区不卡在线观看| 欧美色综合影院| 99久久夜色精品国产网站| 免费三级欧美电影| 亚洲一区二区欧美日韩| 欧美国产丝袜视频| 精品理论电影在线观看| 欧美日韩精品专区| 福利视频网站一区二区三区| 成人午夜电影网站| 亚洲精品美腿丝袜| 欧美剧在线免费观看网站| 国产二区国产一区在线观看| 日韩av一区二| 5566中文字幕一区二区电影| 日韩av一区二区三区| 久久精品无码一区二区三区| 成人深夜在线观看| 视频一区二区不卡| 亚洲国产精品99久久久久久久久| 欧美自拍偷拍午夜视频| 91影院在线免费观看| 国内精品在线播放| 喷白浆一区二区| 欧美一区二区三区视频免费 | 成人免费观看男女羞羞视频| 亚洲午夜视频在线观看| 日韩一区日韩二区| 国产欧美一区二区三区在线看蜜臀 | 26uuu色噜噜精品一区| 精品国产免费人成在线观看| 精品国产91洋老外米糕| 亚洲男人天堂av网| 日韩av高清在线观看| 成人精品鲁一区一区二区| 欧美性受极品xxxx喷水| 日韩一级片在线观看| 久久嫩草精品久久久精品| 欧美一区二区精品在线| 欧美精品第1页| 国产午夜亚洲精品午夜鲁丝片| 久久人人超碰精品| 国产欧美日韩视频在线观看| 国产精品久久免费看| 国产欧美日本一区二区三区| 亚洲欧洲制服丝袜| 国产伦精品一区二区三区免费| 国产一区999| 国产成人午夜电影网| 国产91精品久久久久久久网曝门| 丁香激情综合国产| 91网站在线播放| 56国语精品自产拍在线观看| 欧美嫩在线观看| 国产欧美中文在线| 亚洲高清不卡在线| 国产精品一区二区免费不卡| 成人av网站免费观看| 欧美性一区二区| 2023国产精品自拍| 亚洲一级电影视频| 国产成人精品三级| 欧美日韩视频在线一区二区 | 欧美影院精品一区| 日韩亚洲欧美综合| 亚洲精品久久7777| 国产一区二区成人久久免费影院| 色系网站成人免费| 久久久亚洲精华液精华液精华液| 国产精品欧美久久久久一区二区| 亚洲高清不卡在线| 99久久国产综合色|国产精品| 51午夜精品国产| 亚洲一区在线视频观看| 狠狠色丁香婷婷综合久久片| 欧美性生活影院| 一区二区三区在线不卡| 国产一区欧美一区| 日韩视频一区二区三区| 一区av在线播放| 色婷婷亚洲婷婷| 国产精品不卡一区二区三区| 蜜臀a∨国产成人精品| 777午夜精品免费视频| 亚洲午夜精品一区二区三区他趣| 99vv1com这只有精品| 最新欧美精品一区二区三区| 天天操天天色综合| 欧美一区二区三区在线观看 | 一本大道久久a久久精品综合| 不卡电影一区二区三区| 国产成人精品综合在线观看| 欧美视频中文字幕| 热久久国产精品| 亚洲成人在线免费| 免费看欧美女人艹b| 日韩av高清在线观看| 捆绑调教美女网站视频一区| 国产麻豆精品视频| 国产在线精品一区二区三区不卡| 久久午夜国产精品| 日日欢夜夜爽一区| 国产成人精品亚洲日本在线桃色 | 狠狠色综合播放一区二区| 国产乱国产乱300精品| 69堂亚洲精品首页| 国产永久精品大片wwwapp| 2020日本不卡一区二区视频| 蜜桃在线一区二区三区| 欧美日韩精品电影| 麻豆91在线播放免费| 欧美午夜理伦三级在线观看| 一区二区三区日韩欧美精品| 色偷偷久久人人79超碰人人澡| 亚洲免费av观看| 日韩欧美国产一区二区在线播放| av在线这里只有精品| 亚洲成人一二三| 亚洲欧美影音先锋| 欧美久久久久久久久久| www.一区二区| 福利视频网站一区二区三区| 午夜婷婷国产麻豆精品| 日本一区免费视频| 69精品人人人人| 欧美精品乱码久久久久久| 99久久99精品久久久久久 | 日本精品免费观看高清观看| 毛片不卡一区二区| 国产盗摄一区二区三区| 成人午夜视频网站| 国内偷窥港台综合视频在线播放| 亚洲免费av高清| 亚洲欧美激情在线| 一卡二卡欧美日韩| 亚洲午夜在线电影| 丝袜美腿亚洲一区| 奇米影视在线99精品| 日韩激情在线观看| 男人的j进女人的j一区| 久久99精品国产91久久来源| 蜜桃在线一区二区三区| 精品在线播放免费| 国产成人免费网站| 99久久国产综合精品麻豆| 99热精品一区二区| 91高清视频在线| 91精品国产免费| 久久久久久电影| 一区二区在线观看视频| 日韩国产高清影视| 国产成人一区在线| 欧美日韩一级片网站| 精品成人一区二区| 亚洲欧美在线视频| 免费成人在线播放| 成人精品视频.| 欧美一级淫片007| 亚洲天堂免费看| 久久99精品久久久久| 99久久婷婷国产综合精品电影| 欧美嫩在线观看| 中文字幕一区二区三区在线不卡 | 中文一区在线播放| 手机精品视频在线观看| 国产精品综合在线视频| 欧美日韩国产乱码电影| 欧美激情自拍偷拍| 日韩精品欧美成人高清一区二区| 国产福利一区二区三区视频| 69精品人人人人| 亚洲狠狠丁香婷婷综合久久久| 国产麻豆成人精品| 日韩视频永久免费| 免费人成在线不卡| 欧美日韩1区2区| 香蕉影视欧美成人| 在线观看网站黄不卡| 亚洲精品国产一区二区三区四区在线 | 欧美日韩国产bt| 午夜国产精品一区| 欧美性videosxxxxx| 亚洲主播在线观看| 欧美唯美清纯偷拍| 日韩极品在线观看| 欧美一区二区三区日韩视频| 五月天中文字幕一区二区| 欧美色图免费看| 日韩av网站免费在线|