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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? multilayerperceptron.java

?? Weka
?? JAVA
?? 第 1 頁 / 共 5 頁
字號(hào):
/* *    This program is free software; you can redistribute it and/or modify *    it under the terms of the GNU General Public License as published by *    the Free Software Foundation; either version 2 of the License, or *    (at your option) any later version. * *    This program is distributed in the hope that it will be useful, *    but WITHOUT ANY WARRANTY; without even the implied warranty of *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *    GNU General Public License for more details. * *    You should have received a copy of the GNU General Public License *    along with this program; if not, write to the Free Software *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* *    MultilayerPerceptron.java *    Copyright (C) 2000 University of Waikato, Hamilton, New Zealand */package weka.classifiers.functions;import weka.classifiers.Classifier;import weka.classifiers.functions.neural.LinearUnit;import weka.classifiers.functions.neural.NeuralConnection;import weka.classifiers.functions.neural.NeuralNode;import weka.classifiers.functions.neural.SigmoidUnit;import weka.core.Capabilities;import weka.core.FastVector;import weka.core.Instance;import weka.core.Instances;import weka.core.Option;import weka.core.OptionHandler;import weka.core.Utils;import weka.core.WeightedInstancesHandler;import weka.core.Capabilities.Capability;import weka.filters.Filter;import weka.filters.unsupervised.attribute.NominalToBinary;import java.awt.BorderLayout;import java.awt.Color;import java.awt.Component;import java.awt.Dimension;import java.awt.FontMetrics;import java.awt.Graphics;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseAdapter;import java.awt.event.MouseEvent;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;import java.util.Enumeration;import java.util.Random;import java.util.StringTokenizer;import java.util.Vector;import javax.swing.BorderFactory;import javax.swing.Box;import javax.swing.BoxLayout;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JTextField;/**  <!-- globalinfo-start --> * A Classifier that uses backpropagation to classify instances.<br/> * This network can be built by hand, created by an algorithm or both. The network can also be monitored and modified during training time. The nodes in this network are all sigmoid (except for when the class is numeric in which case the the output nodes become unthresholded linear units). * <p/> <!-- globalinfo-end --> * <!-- options-start --> * Valid options are: <p/> *  * <pre> -L &lt;learning rate&gt; *  Learning Rate for the backpropagation algorithm. *  (Value should be between 0 - 1, Default = 0.3).</pre> *  * <pre> -M &lt;momentum&gt; *  Momentum Rate for the backpropagation algorithm. *  (Value should be between 0 - 1, Default = 0.2).</pre> *  * <pre> -N &lt;number of epochs&gt; *  Number of epochs to train through. *  (Default = 500).</pre> *  * <pre> -V &lt;percentage size of validation set&gt; *  Percentage size of validation set to use to terminate *  training (if this is non zero it can pre-empt num of epochs. *  (Value should be between 0 - 100, Default = 0).</pre> *  * <pre> -S &lt;seed&gt; *  The value used to seed the random number generator *  (Value should be &gt;= 0 and and a long, Default = 0).</pre> *  * <pre> -E &lt;threshold for number of consequetive errors&gt; *  The consequetive number of errors allowed for validation *  testing before the netwrok terminates. *  (Value should be &gt; 0, Default = 20).</pre> *  * <pre> -G *  GUI will be opened. *  (Use this to bring up a GUI).</pre> *  * <pre> -A *  Autocreation of the network connections will NOT be done. *  (This will be ignored if -G is NOT set)</pre> *  * <pre> -B *  A NominalToBinary filter will NOT automatically be used. *  (Set this to not use a NominalToBinary filter).</pre> *  * <pre> -H &lt;comma seperated numbers for nodes on each layer&gt; *  The hidden layers to be created for the network. *  (Value should be a list of comma separated Natural  *  numbers or the letters 'a' = (attribs + classes) / 2,  *  'i' = attribs, 'o' = classes, 't' = attribs .+ classes) *  for wildcard values, Default = a).</pre> *  * <pre> -C *  Normalizing a numeric class will NOT be done. *  (Set this to not normalize the class if it's numeric).</pre> *  * <pre> -I *  Normalizing the attributes will NOT be done. *  (Set this to not normalize the attributes).</pre> *  * <pre> -R *  Reseting the network will NOT be allowed. *  (Set this to not allow the network to reset).</pre> *  * <pre> -D *  Learning rate decay will occur. *  (Set this to cause the learning rate to decay).</pre> *  <!-- options-end --> * * @author Malcolm Ware (mfw4@cs.waikato.ac.nz) * @version $Revision: 1.11 $ */public class MultilayerPerceptron   extends Classifier   implements OptionHandler, WeightedInstancesHandler {    /** for serialization */  static final long serialVersionUID = 572250905027665169L;    /**   * Main method for testing this class.   *   * @param argv should contain command line options (see setOptions)   */  public static void main(String [] argv) {    runClassifier(new MultilayerPerceptron(), argv);  }    /**    * This inner class is used to connect the nodes in the network up to   * the data that they are classifying, Note that objects of this class are   * only suitable to go on the attribute side or class side of the network   * and not both.   */  protected class NeuralEnd     extends NeuralConnection {        /** for serialization */    static final long serialVersionUID = 7305185603191183338L;      /**      * the value that represents the instance value this node represents.      * For an input it is the attribute number, for an output, if nominal     * it is the class value.      */    private int m_link;        /** True if node is an input, False if it's an output. */    private boolean m_input;    /**     * Constructor     */    public NeuralEnd(String id) {      super(id);      m_link = 0;      m_input = true;          }      /**     * Call this function to determine if the point at x,y is on the unit.     * @param g The graphics context for font size info.     * @param x The x coord.     * @param y The y coord.     * @param w The width of the display.     * @param h The height of the display.     * @return True if the point is on the unit, false otherwise.     */    public boolean onUnit(Graphics g, int x, int y, int w, int h) {            FontMetrics fm = g.getFontMetrics();      int l = (int)(m_x * w) - fm.stringWidth(m_id) / 2;      int t = (int)(m_y * h) - fm.getHeight() / 2;      if (x < l || x > l + fm.stringWidth(m_id) + 4 	  || y < t || y > t + fm.getHeight() + fm.getDescent() + 4) {	return false;      }      return true;          }       /**     * This will draw the node id to the graphics context.     * @param g The graphics context.     * @param w The width of the drawing area.     * @param h The height of the drawing area.     */    public void drawNode(Graphics g, int w, int h) {            if ((m_type & PURE_INPUT) == PURE_INPUT) {	g.setColor(Color.green);      }      else {	g.setColor(Color.orange);      }            FontMetrics fm = g.getFontMetrics();      int l = (int)(m_x * w) - fm.stringWidth(m_id) / 2;      int t = (int)(m_y * h) - fm.getHeight() / 2;      g.fill3DRect(l, t, fm.stringWidth(m_id) + 4		   , fm.getHeight() + fm.getDescent() + 4		   , true);      g.setColor(Color.black);            g.drawString(m_id, l + 2, t + fm.getHeight() + 2);    }    /**     * Call this function to draw the node highlighted.     * @param g The graphics context.     * @param w The width of the drawing area.     * @param h The height of the drawing area.     */    public void drawHighlight(Graphics g, int w, int h) {            g.setColor(Color.black);      FontMetrics fm = g.getFontMetrics();      int l = (int)(m_x * w) - fm.stringWidth(m_id) / 2;      int t = (int)(m_y * h) - fm.getHeight() / 2;      g.fillRect(l - 2, t - 2, fm.stringWidth(m_id) + 8		 , fm.getHeight() + fm.getDescent() + 8);       drawNode(g, w, h);    }        /**     * Call this to get the output value of this unit.      * @param calculate True if the value should be calculated if it hasn't      * been already.     * @return The output value, or NaN, if the value has not been calculated.     */    public double outputValue(boolean calculate) {           if (Double.isNaN(m_unitValue) && calculate) {	if (m_input) {	  if (m_currentInstance.isMissing(m_link)) {	    m_unitValue = 0;	  }	  else {	    	    m_unitValue = m_currentInstance.value(m_link);	  }	}	else {	  //node is an output.	  m_unitValue = 0;	  for (int noa = 0; noa < m_numInputs; noa++) {	    m_unitValue += m_inputList[noa].outputValue(true);	   	  }	  if (m_numeric && m_normalizeClass) {	    //then scale the value;	    //this scales linearly from between -1 and 1	    m_unitValue = m_unitValue * 	      m_attributeRanges[m_instances.classIndex()] + 	      m_attributeBases[m_instances.classIndex()];	  }	}      }      return m_unitValue;                }        /**     * Call this to get the error value of this unit, which in this case is     * the difference between the predicted class, and the actual class.     * @param calculate True if the value should be calculated if it hasn't      * been already.     * @return The error value, or NaN, if the value has not been calculated.     */    public double errorValue(boolean calculate) {            if (!Double.isNaN(m_unitValue) && Double.isNaN(m_unitError) 	  && calculate) {		if (m_input) {	  m_unitError = 0;	  for (int noa = 0; noa < m_numOutputs; noa++) {	    m_unitError += m_outputList[noa].errorValue(true);	  }	}	else {	  if (m_currentInstance.classIsMissing()) {	    m_unitError = .1;  	  }	  else if (m_instances.classAttribute().isNominal()) {	    if (m_currentInstance.classValue() == m_link) {	      m_unitError = 1 - m_unitValue;	    }	    else {	      m_unitError = 0 - m_unitValue;	    }	  }	  else if (m_numeric) {	    	    if (m_normalizeClass) {	      if (m_attributeRanges[m_instances.classIndex()] == 0) {		m_unitError = 0;	      }	      else {		m_unitError = (m_currentInstance.classValue() - m_unitValue ) /		  m_attributeRanges[m_instances.classIndex()];		//m_numericRange;			      }	    }	    else {	      m_unitError = m_currentInstance.classValue() - m_unitValue;	    }	  }	}      }      return m_unitError;    }            /**     * Call this to reset the value and error for this unit, ready for the next     * run. This will also call the reset function of all units that are      * connected as inputs to this one.     * This is also the time that the update for the listeners will be      * performed.     */    public void reset() {            if (!Double.isNaN(m_unitValue) || !Double.isNaN(m_unitError)) {	m_unitValue = Double.NaN;	m_unitError = Double.NaN;	m_weightsUpdated = false;	for (int noa = 0; noa < m_numInputs; noa++) {	  m_inputList[noa].reset();	}      }    }            /**      * Call this function to set What this end unit represents.     * @param input True if this unit is used for entering an attribute,     * False if it's used for determining a class value.     * @param val The attribute number or class type that this unit represents.     * (for nominal attributes).     */    public void setLink(boolean input, int val) throws Exception {      m_input = input;            if (input) {	m_type = PURE_INPUT;      }      else {	m_type = PURE_OUTPUT;      }      if (val < 0 || (input && val > m_instances.numAttributes()) 	  || (!input && m_instances.classAttribute().isNominal() 	      && val > m_instances.classAttribute().numValues())) {	m_link = 0;      }      else {	m_link = val;      }    }        /**     * @return link for this node.     */    public int getLink() {      return m_link;    }      }     /** Inner class used to draw the nodes onto.(uses the node lists!!)    * This will also handle the user input. */  private class NodePanel     extends JPanel {        /** for serialization */    static final long serialVersionUID = -3067621833388149984L;    /**     * The constructor.     */    public NodePanel() {            addMouseListener(new MouseAdapter() {	  	  public void mousePressed(MouseEvent e) {	    	    if (!m_stopped) {	      return;	    }	    if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK && 		!e.isAltDown()) {	      Graphics g = NodePanel.this.getGraphics();	      int x = e.getX();	      int y = e.getY();	      int w = NodePanel.this.getWidth();	      int h = NodePanel.this.getHeight();	      FastVector tmp = new FastVector(4);	      for (int noa = 0; noa < m_numAttributes; noa++) {		if (m_inputs[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_inputs[noa]);		  selection(tmp, 			    (e.getModifiers() & MouseEvent.CTRL_MASK) == MouseEvent.CTRL_MASK

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美精品电影三级在线| 91精选在线观看| 国产精品久久久久婷婷| 国产成人鲁色资源国产91色综| 日韩三级电影网址| 麻豆精品视频在线观看视频| 91精品久久久久久久91蜜桃| 免费高清在线一区| 精品欧美一区二区久久| 久久精品久久久精品美女| 日韩精品在线一区二区| 国产乱码精品一区二区三区av| 日韩一区二区精品| 尤物视频一区二区| 久久99久久久欧美国产| 国产区在线观看成人精品| 91亚洲精华国产精华精华液| 国产精品嫩草久久久久| 91丨九色丨国产丨porny| 国产精品成人网| 色婷婷综合久久久久中文一区二区 | 亚洲高清免费一级二级三级| 欧美伊人精品成人久久综合97| 亚洲国产日韩a在线播放| 91精品国产综合久久精品app| 奇米亚洲午夜久久精品| 精品久久五月天| 99精品1区2区| 亚洲制服欧美中文字幕中文字幕| 欧美肥妇free| 成人app下载| 婷婷六月综合网| 中文字幕av一区二区三区免费看 | 538prom精品视频线放| 精彩视频一区二区三区| 亚洲色图清纯唯美| 欧美变态凌虐bdsm| 成人黄色国产精品网站大全在线免费观看 | 国产乱色国产精品免费视频| 一区二区在线免费观看| 精品国产乱码久久| 99精品视频在线观看| 久久国产夜色精品鲁鲁99| 综合电影一区二区三区| 精品国产3级a| 欧美日韩在线播放三区四区| 国产一区二区在线看| 亚洲一区二区av电影| 2014亚洲片线观看视频免费| 在线观看免费亚洲| av不卡免费在线观看| 国产综合一区二区| 日本欧美久久久久免费播放网| 中文字幕精品三区| 欧美sm美女调教| 欧美精品在线视频| 欧美性大战久久| 丰满少妇久久久久久久| 国产福利精品一区| 精品在线你懂的| 美女视频黄久久| 日韩高清在线观看| 轻轻草成人在线| 日韩av不卡一区二区| 三级成人在线视频| 午夜精彩视频在线观看不卡| 亚洲亚洲人成综合网络| 一区二区三区四区亚洲| 亚洲女厕所小便bbb| 亚洲精品中文在线观看| 亚洲三级电影全部在线观看高清| 国产精品卡一卡二卡三| 亚洲视频香蕉人妖| 一区二区免费在线播放| 夜夜精品视频一区二区| 丝袜亚洲精品中文字幕一区| 日韩高清不卡一区二区| 毛片av一区二区| 成人永久aaa| 欧美亚洲一区二区三区四区| 91精品国产综合久久久蜜臀粉嫩 | 欧美日韩久久一区| 精品日韩成人av| 国产精品久久久久久久浪潮网站 | 蜜桃av噜噜一区二区三区小说| 韩国三级中文字幕hd久久精品| 国产福利一区二区三区视频在线| 国产激情一区二区三区桃花岛亚洲| 成人精品国产一区二区4080| 大胆亚洲人体视频| 欧美午夜精品一区二区三区| 91精品综合久久久久久| 久久综合五月天婷婷伊人| 亚洲天堂av老司机| 琪琪久久久久日韩精品| 成人午夜免费av| 欧美三级中文字幕| 国产亚洲一区二区三区四区 | 色国产综合视频| 欧美大片在线观看| 亚洲人123区| 国产福利视频一区二区三区| 欧美最猛黑人xxxxx猛交| 精品久久久久一区| 亚洲影院理伦片| 国产成人av电影在线观看| 欧美剧情电影在线观看完整版免费励志电影| 久久亚洲一区二区三区明星换脸| 亚洲国产成人av| 成人app在线| 国产日韩欧美综合在线| 老司机精品视频在线| 欧美丰满少妇xxxbbb| 一区二区三区免费观看| 色综合天天综合网天天狠天天| 国产亚洲1区2区3区| 麻豆专区一区二区三区四区五区| 在线视频一区二区免费| 中文在线免费一区三区高中清不卡| 五月综合激情日本mⅴ| 99精品视频一区二区| 国产亚洲欧美日韩日本| 韩国精品主播一区二区在线观看 | 高清国产一区二区| 欧美韩国日本综合| 国产乱人伦偷精品视频免下载| 欧美浪妇xxxx高跟鞋交| 亚洲影视资源网| 美女尤物国产一区| 欧美大片日本大片免费观看| 天堂va蜜桃一区二区三区| 欧美精品日日鲁夜夜添| 日本伊人色综合网| 精品久久国产97色综合| 国产成人啪免费观看软件| 国产日韩精品一区二区浪潮av| 丁香激情综合国产| 国产精品国模大尺度视频| 99免费精品视频| 中文一区一区三区高中清不卡| 不卡的电影网站| 亚洲男人天堂av| 欧美午夜精品久久久久久超碰| 午夜精品免费在线观看| 日韩你懂的在线播放| 卡一卡二国产精品 | 91精选在线观看| 国产在线精品免费| 国产嫩草影院久久久久| 99久久综合色| 天堂一区二区在线| 久久中文字幕电影| 91久久精品网| 国产一区二区电影| 亚洲一卡二卡三卡四卡五卡| 日韩欧美三级在线| 91亚洲精品久久久蜜桃网站| 奇米777欧美一区二区| 综合久久久久综合| 久久先锋影音av鲁色资源| 色婷婷激情综合| 国产·精品毛片| 蜜桃传媒麻豆第一区在线观看| 亚洲欧美日韩在线| 国产亚洲一区二区在线观看| 欧美乱妇23p| 色综合久久久久综合体桃花网| 黄色资源网久久资源365| 亚洲成人av免费| 依依成人精品视频| 国产精品婷婷午夜在线观看| 日韩久久精品一区| 欧美精品久久一区| 欧美日韩午夜影院| 99国产精品99久久久久久| 国产精品综合二区| 精品午夜久久福利影院| 香蕉加勒比综合久久| 亚洲综合色噜噜狠狠| 伊人色综合久久天天人手人婷| 亚洲国产精品精华液2区45| 久久综合久久综合亚洲| 69久久夜色精品国产69蝌蚪网| 欧美丝袜自拍制服另类| 在线中文字幕一区| 欧美日韩高清一区二区不卡 | 一区二区三区欧美| 亚洲人妖av一区二区| 亚洲欧洲制服丝袜| 一区二区三区丝袜| 亚洲成av人片在线| 日韩电影在线一区| 国产伦精品一区二区三区视频青涩| 久久爱www久久做| 福利视频网站一区二区三区| 岛国av在线一区| 欧美亚州韩日在线看免费版国语版| 在线精品亚洲一区二区不卡| 欧美剧情电影在线观看完整版免费励志电影| 欧美日韩国产综合久久|