All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.chen0040.mlp.functions.LogSig Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
package com.github.chen0040.mlp.functions;



public class LogSig extends AbstractTransferFunction
{
	@Override
	public double calculate(double x)
	{
		return 1/(Math.exp(-x)+1);
	}


	@Override public double gradient(double hx, double y) {
		y = calculate(hx);
		return y * (1-y);
	}


	@Override
	public Object clone(){
		return new LogSig();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy