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

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

?? basicneuraldataset.java

?? VHDL制作的ann的code
?? JAVA
字號:
/*
 * Encog Neural Network and Bot Library for Java v1.x
 * http://www.heatonresearch.com/encog/
 * http://code.google.com/p/encog-java/
 * 
 * Copyright 2008, Heaton Research Inc., and individual contributors.
 * See the copyright.txt in the distribution for a full listing of 
 * individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package org.encog.neural.data.basic;

import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.List;

import org.encog.neural.data.NeuralData;
import org.encog.neural.data.NeuralDataPair;
import org.encog.neural.data.NeuralDataSet;
import org.encog.neural.persist.EncogPersistedObject;
import org.encog.neural.persist.Persistor;
import org.encog.neural.persist.persistors.BasicNeuralDataSetPersistor;

/**
 * Basic implementation of the NeuralDataSet class. This class simply stores the
 * neural data in an ArrayList. This class is memory based, so large enough
 * datasets could cause memory issues. Many other dataset types extend this
 * class.
 * 
 * @author jheaton
 */
public class BasicNeuralDataSet implements NeuralDataSet, EncogPersistedObject {

	/**
	 * An iterator to be used with the BasicNeuralDataSet. This iterator does
	 * not support removes.
	 * 
	 * @author jheaton
	 */
	public class BasicNeuralIterator implements Iterator<NeuralDataPair> {

		/**
		 * The index that the iterator is currently at.
		 */
		private int currentIndex = 0;

		/**
		 * Is there more data for the iterator to read?
		 * 
		 * @return Returns true if there is more data to read.
		 */
		public boolean hasNext() {
			return this.currentIndex < BasicNeuralDataSet.this.data.size();
		}

		/**
		 * Read the next item.
		 * 
		 * @return The next item.
		 */
		public NeuralDataPair next() {
			if (!hasNext()) {
				return null;
			}

			return BasicNeuralDataSet.this.data.get(this.currentIndex++);
		}

		/**
		 * Removes are not supported.
		 */
		public void remove() {
			throw new UnsupportedOperationException();
		}
	}

	/**
	 * The serial id.
	 */
	private static final long serialVersionUID = -2279722928570071183L;

	/**
	 * The data held by this object.
	 */
	private List<NeuralDataPair> data = new ArrayList<NeuralDataPair>();

	/**
	 * The iterators that are currently open to this object.
	 */
	private final List<BasicNeuralIterator> iterators = 
		new ArrayList<BasicNeuralIterator>();

	/**
	 * The description for this object.
	 */
	private String description;

	/**
	 * The name for this object.
	 */
	private String name;

	/**
	 * Default constructor.
	 */
	public BasicNeuralDataSet() {
	}

	/**
	 * Construct a data set from an input and idea array.
	 * 
	 * @param input
	 *            The input into the neural network for training.
	 * @param ideal
	 *            The ideal output for training.
	 */
	public BasicNeuralDataSet(final double[][] input, final double[][] ideal) {
		if (ideal != null) {
			for (int i = 0; i < input.length; i++) {
				final BasicNeuralData inputData = new BasicNeuralData(input[i]);
				final BasicNeuralData idealData = new BasicNeuralData(ideal[i]);
				this.add(inputData, idealData);
			}
		} else {
			for (int i = 0; i < input.length; i++) {
				final BasicNeuralData inputData = new BasicNeuralData(input[i]);
				this.add(inputData);
			}
		}
	}

	/**
	 * Add input to the training set with no expected output. This is used for
	 * unsupervised training.
	 * 
	 * @param data
	 *            The input to be added to the training set.
	 */
	public void add(final NeuralData data) {
		this.data.add(new BasicNeuralDataPair(data));
	}

	/**
	 * Add input and expected output. This is used for supervised training.
	 * 
	 * @param inputData
	 *            The input data to train on.
	 * @param idealData
	 *            The ideal data to use for training.
	 */
	public void add(final NeuralData inputData, final NeuralData idealData) {
		if (!this.iterators.isEmpty()) {
			throw new ConcurrentModificationException();
		}
		final NeuralDataPair pair = new BasicNeuralDataPair(inputData,
				idealData);
		this.data.add(pair);
	}

	/**
	 * Add a neural data pair to the list.
	 * 
	 * @param inputData
	 *            A NeuralDataPair object that contains both input and ideal
	 *            data.
	 */
	public void add(final NeuralDataPair inputData) {
		this.data.add(inputData);
	}

	/**
	 * Close this data set.
	 */
	public void close() {
		// nothing to close

	}

	/**
	 * Create a persistor for this object.
	 * @return A persistor for this object.
	 */
	public Persistor createPersistor() {
		return new BasicNeuralDataSetPersistor();
	}

	/**
	 * Get the data held by this container.
	 * 
	 * @return the data
	 */
	public List<NeuralDataPair> getData() {
		return this.data;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return this.description;
	}

	/**
	 * Get the size of the ideal dataset. This is obtained from the first item
	 * in the list.
	 * 
	 * @return The size of the ideal data.
	 */
	public int getIdealSize() {
		if (this.data.isEmpty()) {
			return 0;
		}
		final NeuralDataPair first = this.data.get(0);
		if (first.getIdeal() == null) {
			return 0;
		}

		return first.getIdeal().size();
	}

	/**
	 * Get the size of the input dataset. This is obtained from the first item
	 * in the list.
	 * 
	 * @return The size of the input data.
	 */
	public int getInputSize() {
		if (this.data.isEmpty()) {
			return 0;
		}
		final NeuralDataPair first = this.data.get(0);
		return first.getInput().size();
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * Determine if this neural data set is supervied.  All of the pairs
	 * should be either supervised or not, so simply check the first pair.
	 * If the list is empty then assume unsupervised.
	 * @return True if supervised.
	 */
	public boolean isSupervised() {
		if (this.data.size() == 0) {
			return false;
		}
		return this.data.get(0).isSupervised();
	}

	/**
	 * Create an iterator for this collection.
	 * 
	 * @return An iterator to access this collection.
	 */
	public Iterator<NeuralDataPair> iterator() {
		final BasicNeuralIterator result = new BasicNeuralIterator();
		this.iterators.add(result);
		return result;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(final List<NeuralDataPair> data) {
		this.data = data;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(final String description) {
		this.description = description;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(final String name) {
		this.name = name;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本免费电影| 欧美极品美女视频| 日本欧美韩国一区三区| 欧美一级久久久| 精品在线视频一区| 国产欧美日韩视频一区二区| 懂色av一区二区夜夜嗨| 亚洲免费资源在线播放| 欧美日韩一级片网站| 日本成人超碰在线观看| 久久精品欧美日韩| 99re成人精品视频| 午夜精品123| 欧美tickling挠脚心丨vk| 岛国精品在线观看| 亚洲国产成人高清精品| 日韩三级.com| 国产激情一区二区三区四区 | 欧美一区二区视频在线观看2020| 美洲天堂一区二卡三卡四卡视频 | 国产精品伦一区| 欧美日韩一区二区三区在线看 | 久久99精品国产.久久久久 | 国产午夜亚洲精品理论片色戒| 国产激情偷乱视频一区二区三区| 亚洲天堂2016| 国产视频911| 中文字幕一区二区三中文字幕| 一个色在线综合| 国产一区999| 欧洲国产伦久久久久久久| 欧美xxxx在线观看| 最新成人av在线| 久草精品在线观看| 一本在线高清不卡dvd| 日韩欧美一级二级三级久久久| 国产欧美日韩麻豆91| 亚洲电影你懂得| 成人一区二区三区| 欧美精选一区二区| 中文字幕欧美一区| 老司机免费视频一区二区| 99vv1com这只有精品| 日韩欧美中文字幕制服| 亚洲欧美日韩精品久久久久| 九九久久精品视频| 91麻豆精品国产91久久久更新时间 | 久久女同性恋中文字幕| 亚洲va国产天堂va久久en| 不卡的av网站| 国产人伦精品一区二区| 日本免费新一区视频| 欧洲在线/亚洲| 日韩一区有码在线| 成人永久aaa| 久久免费精品国产久精品久久久久| 亚洲一区二区五区| 91丨porny丨在线| 国产精品久久久久婷婷二区次| 老司机午夜精品| 日韩欧美国产一区二区在线播放 | 亚洲一区二区三区三| 91麻豆免费看| 亚洲人精品午夜| 97久久精品人人做人人爽50路| 久久人人超碰精品| 国产美女一区二区| 久久久久久久久一| 国产一区二区三区高清播放| 欧美一三区三区四区免费在线看 | 成人app网站| 国产精品久久毛片| av一二三不卡影片| 亚洲欧美日韩一区二区| 欧美最新大片在线看| 亚洲综合久久久久| 欧美久久久久久蜜桃| 日韩av一区二区三区| 日韩一级免费一区| 精品一区二区免费| 中文字幕成人av| 色噜噜狠狠色综合欧洲selulu| 亚洲欧美在线另类| 欧美日韩久久久| 日本特黄久久久高潮 | 成人动漫av在线| 综合激情成人伊人| 欧美在线观看一区二区| 午夜一区二区三区视频| 欧美成人官网二区| 成人精品小蝌蚪| 亚洲午夜精品17c| 精品久久久久久无| av一区二区三区| 日韩国产在线观看| 国产欧美日韩麻豆91| 日本道在线观看一区二区| 免费在线观看视频一区| 国产欧美精品日韩区二区麻豆天美| www.av亚洲| 日韩av一区二区在线影视| 国产欧美精品一区二区色综合| 91黄视频在线| 精彩视频一区二区三区| 亚洲精品美国一| 精品福利在线导航| 在线精品视频一区二区三四| 免费观看91视频大全| 亚洲欧洲一区二区在线播放| 91精品免费在线观看| 成人a免费在线看| 日韩av一级片| 亚洲另类中文字| 国产亚洲欧美色| 欧美日韩不卡一区二区| 粉嫩嫩av羞羞动漫久久久| 视频一区欧美日韩| 成人欧美一区二区三区| 久久综合狠狠综合久久综合88| 91久久精品一区二区三区| 国产成人av一区| 男女男精品视频| 午夜久久久久久久久久一区二区| 亚洲国产精品精华液2区45| 日韩精品中文字幕在线不卡尤物| 91蝌蚪国产九色| 成人午夜在线播放| 韩国在线一区二区| 日韩国产欧美视频| 亚洲成人第一页| 一区二区在线观看av| 欧美激情一区二区三区四区| 欧美大黄免费观看| 91精品国产黑色紧身裤美女| 色哟哟国产精品免费观看| 岛国av在线一区| 国产精品白丝jk白祙喷水网站| 日本不卡123| 日韩激情一二三区| 日韩精品视频网站| 日日噜噜夜夜狠狠视频欧美人| 亚洲色大成网站www久久九九| 国产丝袜欧美中文另类| 国产视频一区不卡| 国产精品午夜免费| 亚洲欧洲另类国产综合| 日韩一区在线播放| 亚洲男人的天堂av| 一区二区三区四区不卡在线| 最新久久zyz资源站| 亚洲欧美日本韩国| 亚洲午夜国产一区99re久久| 亚洲电影你懂得| 免费成人你懂的| 国产一区二区三区免费播放| 国产一区二区三区视频在线播放| 韩国av一区二区三区| 国产精品99久久久| 成人激情免费视频| 91福利在线导航| 9191国产精品| 久久人人97超碰com| 国产精品无圣光一区二区| 亚洲欧美日韩国产另类专区| 亚洲综合激情另类小说区| 日本中文字幕一区二区视频| 精品在线一区二区三区| 成人福利电影精品一区二区在线观看| 91亚洲精品一区二区乱码| 欧美在线一二三四区| 欧美成人一区二区三区片免费| 久久蜜桃av一区二区天堂| 亚洲男同1069视频| 美女视频黄免费的久久| 国产福利91精品一区二区三区| 色综合色狠狠综合色| 欧美一区永久视频免费观看| 久久久国产午夜精品| 亚洲男女一区二区三区| 蜜桃视频在线一区| 99久久精品国产精品久久| 日韩一区二区不卡| 亚洲欧洲精品一区二区精品久久久 | 国产日产欧美一区二区视频| 国产精品传媒视频| 日本不卡在线视频| 91在线国产观看| 欧美大片在线观看| 一区二区三区精品| 国产激情视频一区二区在线观看| 在线视频你懂得一区二区三区| 精品国一区二区三区| 亚洲宅男天堂在线观看无病毒| 美腿丝袜在线亚洲一区| 在线精品观看国产| 日本一区二区三区高清不卡| 首页欧美精品中文字幕| 99久久精品国产观看| 久久精品一二三| 日本成人在线电影网|