com.github.chen0040.mlp.functions.LogSig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-ann-mlp Show documentation
Show all versions of java-ann-mlp Show documentation
Multi-Layer Perceptron with BP learning implemented in Java
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