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

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

?? multilayerperceptron.java

?? MacroWeka擴展了著名數據挖掘工具weka
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
    m_outputs = new NeuralEnd[0];
    m_inputs = new NeuralEnd[0];
    m_numAttributes = 0;
    m_numClasses = 0;
    m_neuralNodes = new NeuralConnection[0];
    m_selected = new FastVector(4);
    m_graphers = new FastVector(2);
    m_nextId = 0;
    m_stopIt = true;
    m_stopped = true;
    m_accepted = false;
    m_numeric = false;
    m_random = null;
    m_nominalToBinaryFilter = new NominalToBinary();
    m_sigmoidUnit = new SigmoidUnit();
    m_linearUnit = new LinearUnit();
    //setting all the options to their defaults. To completely change these
    //defaults they will also need to be changed down the bottom in the 
    //setoptions function (the text info in the accompanying functions should 
    //also be changed to reflect the new defaults
    m_normalizeClass = true;
    m_normalizeAttributes = true;
    m_autoBuild = true;
    m_gui = false;
    m_useNomToBin = true;
    m_driftThreshold = 20;
    m_numEpochs = 500;
    m_valSize = 0;
    m_randomSeed = 0;
    m_hiddenLayers = "a";
    m_learningRate = .3;
    m_momentum = .2;
    m_reset = true;
    m_decay = false;
  }

  /**
   * @param d True if the learning rate should decay.
   */
  public void setDecay(boolean d) {
    m_decay = d;
  }
  
  /**
   * @return the flag for having the learning rate decay.
   */
  public boolean getDecay() {
    return m_decay;
  }

  /**
   * This sets the network up to be able to reset itself with the current 
   * settings and the learning rate at half of what it is currently. This
   * will only happen if the network creates NaN or infinite errors. Also this
   * will continue to happen until the network is trained properly. The 
   * learning rate will also get set back to it's original value at the end of
   * this. This can only be set to true if the GUI is not brought up.
   * @param r True if the network should restart with it's current options
   * and set the learning rate to half what it currently is.
   */
  public void setReset(boolean r) {
    if (m_gui) {
      r = false;
    }
    m_reset = r;
      
  }

  /**
   * @return The flag for reseting the network.
   */
  public boolean getReset() {
    return m_reset;
  }
  
  /**
   * @param c True if the class should be normalized (the class will only ever
   * be normalized if it is numeric). (Normalization puts the range between
   * -1 - 1).
   */
  public void setNormalizeNumericClass(boolean c) {
    m_normalizeClass = c;
  }
  
  /**
   * @return The flag for normalizing a numeric class.
   */
  public boolean getNormalizeNumericClass() {
    return m_normalizeClass;
  }

  /**
   * @param a True if the attributes should be normalized (even nominal
   * attributes will get normalized here) (range goes between -1 - 1).
   */
  public void setNormalizeAttributes(boolean a) {
    m_normalizeAttributes = a;
  }

  /**
   * @return The flag for normalizing attributes.
   */
  public boolean getNormalizeAttributes() {
    return m_normalizeAttributes;
  }

  /**
   * @param f True if a nominalToBinary filter should be used on the
   * data.
   */
  public void setNominalToBinaryFilter(boolean f) {
    m_useNomToBin = f;
  }

  /**
   * @return The flag for nominal to binary filter use.
   */
  public boolean getNominalToBinaryFilter() {
    return m_useNomToBin;
  }

  /**
   * This seeds the random number generator, that is used when a random
   * number is needed for the network.
   * @param l The seed.
   */
  public void setRandomSeed(long l) {
    if (l >= 0) {
      m_randomSeed = l;
    }
  }
  
  /**
   * @return The seed for the random number generator.
   */
  public long getRandomSeed() {
    return m_randomSeed;
  }

  /**
   * This sets the threshold to use for when validation testing is being done.
   * It works by ending testing once the error on the validation set has 
   * consecutively increased a certain number of times.
   * @param t The threshold to use for this.
   */
  public void setValidationThreshold(int t) {
    if (t > 0) {
      m_driftThreshold = t;
    }
  }

  /**
   * @return The threshold used for validation testing.
   */
  public int getValidationThreshold() {
    return m_driftThreshold;
  }
  
  /**
   * The learning rate can be set using this command.
   * NOTE That this is a static variable so it affect all networks that are
   * running.
   * Must be greater than 0 and no more than 1.
   * @param l The New learning rate. 
   */
  public void setLearningRate(double l) {
    if (l > 0 && l <= 1) {
      m_learningRate = l;
    
      if (m_controlPanel != null) {
	m_controlPanel.m_changeLearning.setText("" + l);
      }
    }
  }

  /**
   * @return The learning rate for the nodes.
   */
  public double getLearningRate() {
    return m_learningRate;
  }

  /**
   * The momentum can be set using this command.
   * THE same conditions apply to this as to the learning rate.
   * @param m The new Momentum.
   */
  public void setMomentum(double m) {
    if (m >= 0 && m <= 1) {
      m_momentum = m;
  
      if (m_controlPanel != null) {
	m_controlPanel.m_changeMomentum.setText("" + m);
      }
    }
  }
  
  /**
   * @return The momentum for the nodes.
   */
  public double getMomentum() {
    return m_momentum;
  }

  /**
   * This will set whether the network is automatically built
   * or if it is left up to the user. (there is nothing to stop a user
   * from altering an autobuilt network however). 
   * @param a True if the network should be auto built.
   */
  public void setAutoBuild(boolean a) {
    if (!m_gui) {
      a = true;
    }
    m_autoBuild = a;
  }

  /**
   * @return The auto build state.
   */
  public boolean getAutoBuild() {
    return m_autoBuild;
  }


  /**
   * This will set what the hidden layers are made up of when auto build is
   * enabled. Note to have no hidden units, just put a single 0, Any more
   * 0's will indicate that the string is badly formed and make it unaccepted.
   * Negative numbers, and floats will do the same. There are also some
   * wildcards. These are 'a' = (number of attributes + number of classes) / 2,
   * 'i' = number of attributes, 'o' = number of classes, and 't' = number of
   * attributes + number of classes.
   * @param h A string with a comma seperated list of numbers. Each number is 
   * the number of nodes to be on a hidden layer.
   */
  public void setHiddenLayers(String h) {
    String tmp = "";
    StringTokenizer tok = new StringTokenizer(h, ",");
    if (tok.countTokens() == 0) {
      return;
    }
    double dval;
    int val;
    String c;
    boolean first = true;
    while (tok.hasMoreTokens()) {
      c = tok.nextToken().trim();

      if (c.equals("a") || c.equals("i") || c.equals("o") || 
	       c.equals("t")) {
	tmp += c;
      }
      else {
	dval = Double.valueOf(c).doubleValue();
	val = (int)dval;
	
	if ((val == dval && (val != 0 || (tok.countTokens() == 0 && first)) && 
	     val >= 0)) {
	  tmp += val;
	}
	else {
	  return;
	}
      }
      
      first = false;
      if (tok.hasMoreTokens()) {
	tmp += ", ";
      }
    }
    m_hiddenLayers = tmp;
  }

  /**
   * @return A string representing the hidden layers, each number is the number
   * of nodes on a hidden layer.
   */
  public String getHiddenLayers() {
    return m_hiddenLayers;
  }

  /**
   * This will set whether A GUI is brought up to allow interaction by the user
   * with the neural network during training.
   * @param a True if gui should be created.
   */
  public void setGUI(boolean a) {
    m_gui = a;
    if (!a) {
      setAutoBuild(true);
      
    }
    else {
      setReset(false);
    }
  }

  /**
   * @return The true if should show gui.
   */
  public boolean getGUI() {
    return m_gui;
  }

  /**
   * This will set the size of the validation set.
   * @param a The size of the validation set, as a percentage of the whole.
   */
  public void setValidationSetSize(int a) {
    if (a < 0 || a > 99) {
      return;
    }
    m_valSize = a;
  }

  /**
   * @return The percentage size of the validation set.
   */
  public int getValidationSetSize() {
    return m_valSize;
  }

  
  
  
  /**
   * Set the number of training epochs to perform.
   * Must be greater than 0.
   * @param n The number of epochs to train through.
   */
  public void setTrainingTime(int n) {
    if (n > 0) {
      m_numEpochs = n;
    }
  }

  /**
   * @return The number of epochs to train through.
   */
  public int getTrainingTime() {
    return m_numEpochs;
  }
  
  /**
   * Call this function to place a node into the network list.
   * @param n The node to place in the list.
   */
  private void addNode(NeuralConnection n) {
    
    NeuralConnection[] temp1 = new NeuralConnection[m_neuralNodes.length + 1];
    for (int noa = 0; noa < m_neuralNodes.length; noa++) {
      temp1[noa] = m_neuralNodes[noa];
    }

    temp1[temp1.length-1] = n;
    m_neuralNodes = temp1;
  }

  /** 
   * Call this function to remove the passed node from the list.
   * This will only remove the node if it is in the neuralnodes list.
   * @param n The neuralConnection to remove.
   * @return True if removed false if not (because it wasn't there).
   */
  private boolean removeNode(NeuralConnection n) {
    NeuralConnection[] temp1 = new NeuralConnection[m_neuralNodes.length - 1];
    int skip = 0;
    for (int noa = 0; noa < m_neuralNodes.length; noa++) {
      if (n == m_neuralNodes[noa]) {
	skip++;
      }
      else if (!((noa - skip) >= temp1.length)) {
	temp1[noa - skip] = m_neuralNodes[noa];
      }
      else {
	return false;
      }
    }
    m_neuralNodes = temp1;
    return true;
  }

  /**
   * This function sets what the m_numeric flag to represent the passed class
   * it also performs the normalization of the attributes if applicable
   * and sets up the info to normalize the class. (note that regardless of
   * the options it will fill an array with the range and base, set to 
   * normalize all attributes and the class to be between -1 and 1)
   * @param inst the instances.
   * @return The modified instances. This needs to be done. If the attributes
   * are normalized then deep copies will be made of all the instances which
   * will need to be passed back out.
   */
  private Instances setClassType(Instances inst) throws Exception {
    if (inst != null) {
      // x bounds
      double min=Double.POSITIVE_INFINITY;
      double max=Double.NEGATIVE_INFINITY;
      double value;
      m_attributeRanges = new double[inst.numAttributes()];
      m_attributeBases = new double[inst.numAttributes()];
      for (int noa = 0; noa < inst.numAttributes(); noa++) {
	min = Double.POSITIVE_INFINITY;
	max = Double.NEGATIVE_INFINITY;
	for (int i=0; i < inst.numInstances();i++) {
	  if (!inst.instance(i).isMissing(noa)) {
	    value = inst.instance(i).value(noa);
	    if (value < min) {
	      min = value;
	    }
	    if (value > max) {
	      max = value;
	    }
	  }
	}
	
	m_attributeRanges[noa] = (max - min) / 2;
	m_attributeBases[noa] = (max + min) / 2;
	if (noa != inst.classIndex() && m_normalizeAttributes) {
	  for (int i = 0; i < inst.numInstances(); i++) {
	    if (m_attributeRanges[noa] != 0) {
	      inst.instance(i).setValue(noa, (inst.instance(i).value(noa)  
					      - m_attributeBases[noa]) /
					m_attributeRanges[noa]);
	    }
	    else {
	      inst.instance(i).setValue(noa, inst.instance(i).value(noa) - 
					m_attributeBases[noa]);
	    }
	  }
	}
      }
      if (inst.classAttribute().isNumeric()) {
	m_numeric = true;
      }
      else {
	m_numeric = false;
      }
    }
    return inst;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女一区二区视频| www.欧美.com| 日韩欧美在线影院| 五月天激情小说综合| 欧美三片在线视频观看| 亚洲精品成人天堂一二三| 91玉足脚交白嫩脚丫在线播放| 中文一区在线播放| 成人一级片在线观看| 日本一区免费视频| 成人精品视频一区| 中文字幕佐山爱一区二区免费| 99精品国产99久久久久久白柏| 自拍偷拍国产精品| 欧美综合欧美视频| 亚洲v精品v日韩v欧美v专区| 7777精品伊人久久久大香线蕉完整版| 亚洲电影视频在线| 51午夜精品国产| 日韩电影一区二区三区四区| 日韩三级伦理片妻子的秘密按摩| 久久黄色级2电影| 精品嫩草影院久久| 国产乱码一区二区三区| 国产精品人人做人人爽人人添| 成人小视频免费观看| 最新国产の精品合集bt伙计| www.激情成人| 一区二区三区中文字幕在线观看| 欧美色偷偷大香| 美女任你摸久久| 久久久久99精品国产片| 成人深夜在线观看| 一区二区三区四区中文字幕| 欧美高清hd18日本| 国产一区二区看久久| 中文字幕在线不卡国产视频| 在线观看不卡视频| 久久激五月天综合精品| 国产精品免费视频观看| 在线一区二区三区做爰视频网站| 日日骚欧美日韩| 2019国产精品| 97精品国产露脸对白| 午夜精品一区二区三区三上悠亚| 欧美tickling网站挠脚心| 成人小视频在线| 亚洲午夜久久久| 精品国产成人系列| 91麻豆免费视频| 免费一级片91| 1000精品久久久久久久久| 欧美精品色一区二区三区| 国产精品白丝jk黑袜喷水| 一区二区三区精品| 2020国产精品| 在线观看免费成人| 国产乱人伦偷精品视频不卡| 亚洲黄色免费电影| www国产精品av| 欧美主播一区二区三区美女| 国产在线一区观看| 亚洲一区二区精品视频| 欧美精品一区男女天堂| 欧日韩精品视频| 国产乱人伦偷精品视频不卡| 亚洲国产日日夜夜| 国产午夜亚洲精品午夜鲁丝片| 97超碰欧美中文字幕| 久久99国内精品| 亚洲黄色小视频| 国产视频一区在线观看 | 粉嫩一区二区三区性色av| 亚洲影院在线观看| 国产欧美视频一区二区| 欧美日韩第一区日日骚| 99久久综合精品| 久久精品国产99久久6| 一区二区三区欧美日韩| 久久精品视频在线看| 欧美性猛交xxxxxx富婆| 国产成人日日夜夜| 免费高清不卡av| 亚洲自拍偷拍九九九| 国产精品欧美精品| 精品国产一区久久| 欧美视频一区在线观看| 国产成人精品亚洲777人妖| 日本欧美一区二区在线观看| 亚洲摸摸操操av| 国产日本欧美一区二区| 欧美日韩国产大片| 久久se精品一区精品二区| 亚洲综合色噜噜狠狠| 国产精品大尺度| 国产三级一区二区三区| 日韩亚洲欧美中文三级| 欧美日韩一本到| 日本韩国精品一区二区在线观看| 成人免费毛片aaaaa**| 国产精品亚洲综合一区在线观看| 奇米影视在线99精品| 午夜在线成人av| 亚洲国产综合人成综合网站| 亚洲色图欧美激情| 成人欧美一区二区三区黑人麻豆| 久久久久久久久岛国免费| 欧美va天堂va视频va在线| 在线91免费看| 欧美日本一区二区| 欧美系列亚洲系列| 在线观看国产日韩| 91黄色免费版| 91麻豆国产在线观看| 成人av电影在线网| 不卡一卡二卡三乱码免费网站| 国产.欧美.日韩| 成人在线视频一区二区| 懂色av一区二区在线播放| 粉嫩aⅴ一区二区三区四区五区| 国产精品一区二区三区99| 国精产品一区一区三区mba桃花 | 91精品91久久久中77777| av高清不卡在线| 波多野结衣在线一区| 粗大黑人巨茎大战欧美成人| 成人午夜免费电影| www.亚洲人| 97se亚洲国产综合自在线| 色综合中文字幕国产| 9色porny自拍视频一区二区| 99久久99久久综合| 91网页版在线| 欧美性色黄大片| 91.麻豆视频| 欧美变态口味重另类| 久久久久久一级片| 亚洲国产精品二十页| 亚洲欧洲www| 亚洲国产精品久久久久秋霞影院 | 男男视频亚洲欧美| 人禽交欧美网站| 久草中文综合在线| 国产精品综合二区| 99久久综合狠狠综合久久| 91精品福利在线| 欧美一级日韩不卡播放免费| 精品国产污网站| 中文字幕巨乱亚洲| 亚洲精品中文字幕乱码三区| 亚洲综合999| 久久精工是国产品牌吗| 粉嫩aⅴ一区二区三区四区| 99精品视频一区二区| 欧美日韩一级片网站| 欧美一级高清大全免费观看| 久久亚洲综合色一区二区三区| 国产清纯白嫩初高生在线观看91| 亚洲欧美日韩在线| 日本伊人午夜精品| 国产美女精品人人做人人爽| 91亚洲国产成人精品一区二三| 在线观看视频一区二区欧美日韩| 91精品国产综合久久精品app| 精品免费国产二区三区| 中文字幕国产一区| 亚洲午夜三级在线| 韩国av一区二区三区在线观看| 成人精品国产福利| 欧美在线播放高清精品| 日韩欧美一级二级三级| 亚洲国产精品t66y| 亚洲成av人片观看| 国产精品资源网站| 色综合中文字幕国产 | 6080国产精品一区二区| 国产亚洲一区二区三区四区| 一区二区三区中文字幕电影| 午夜亚洲国产au精品一区二区 | 秋霞国产午夜精品免费视频| 国产大陆亚洲精品国产| 欧美日韩黄色一区二区| 久久久久9999亚洲精品| 亚洲国产人成综合网站| 国产精品99久久久久久似苏梦涵| 欧洲激情一区二区| 国产亚洲人成网站| 亚洲成a人v欧美综合天堂| 国产精品99久久久久| 欧美日韩一区二区三区视频| 国产欧美精品一区二区色综合 | 成人一道本在线| 91精品蜜臀在线一区尤物| 国产精品免费视频一区| 蜜桃视频在线观看一区二区| 91免费看片在线观看| 久久婷婷久久一区二区三区| 亚洲国产精品精华液网站| 成人小视频免费观看| 日韩欧美国产一区二区三区|