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

📄 activatefunction.java

📁 数据挖掘。数据仓库
💻 JAVA
字号:
package org.scut.DataMining.Algorithm.NeuralNetwork.Core;

import org.scut.DataMining.Algorithm.NeuralNetwork.Core.ActivateFunctions.*;
public abstract class ActivateFunction 
{
	
	public enum Type
	{
		Sigmoid,
		Linear,
	}
	public ActivateFunction() 
	{
		super();
		// TODO Auto-generated constructor stub
	}
	/** function on value input */
	public abstract double function(double value);
	/** reverse function on value input */
	public abstract double reverseFunction(double value);
	/** first derivation function on input */
	public abstract double derivation(double value);
	/**
	 * Gets instance of the specified activate funciton object
	 * @param type type of the activate function
	 * @return
	 */
	public static ActivateFunction getActivateFunction(Type type)
	{
		if(type == Type.Sigmoid)
			return new Sigmoid();
		if(type == Type.Linear)
			return new Linear();
		return new Sigmoid(); //: default
	}
}

⌨️ 快捷键说明

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