⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trainingset.java

📁 神经网络源代码,实现了一个BP神经网络,可以完成基于BP的神经网络算法.
💻 JAVA
字号:
package net.openai.ai.nn.training;import java.util.*;public class TrainingSet {    //  the training elements for this set.    private Vector elements = null;    //  A list of the categories for the input data    private Vector inputCategories = null;    //  A list of the categories for the output data    private Vector outputCategories = null;    public TrainingSet() {	elements = new Vector();	inputCategories = new Vector();	outputCategories = new Vector();    }    /**     * Adds a new training element to the system.     *     * @param Vector The training elements to add to the set/     */    public final void addElement(TrainingElement element) {	elements.add(element);    }    /**     * Returns an Enumeration of TrainingElements.     *     * @return Enumeration The training elements for this set.     */    public final Enumeration getElements() {	return elements.elements();    }    /**     * Returns a vector containing the names of the categories for     * the input data.     *     * @return Vector The names of the categories/columns for this     * training set.     */    public final Vector getInputCategories() {	return inputCategories;    }    /**     * Sets the categories for thhe input data.     *     * @param Vector The list of categories.     */    public final void setInputCategories(Vector inputCategories) {	this.inputCategories = inputCategories;    }    /**     * Returns a vector containing the names of the categories for     * the output data.     *     * @return Vector The names of the categories/columns for the     * output data.     */    public final Vector getOutputCategories() {	return outputCategories;    }    /**     * Sets the categories for the output data..     *     * @param Vector The list of categories.     */    public final void setOutputCategories(Vector outputCategories) {	this.outputCategories = outputCategories;    }    /**     * Returns whether this training set contains any elements.     *     * @return boolean Whether this set contains any elements.     */    public final boolean isEmpty() {	return elements.isEmpty();    }    /**     * Returns the number of elements in this set.     *     * @return int The number of elements in this set.     */    public final int size() {	return elements.size();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -