com.github.chen0040.glm.links.InverseLinkFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-glm Show documentation
Show all versions of java-glm Show documentation
Generalized linear models implemented in Java
package com.github.chen0040.glm.links;
/**
* Created by xschen on 14/8/15.
*/
///
/// Generally applicable to the following distribution:
/// 1. Exponential / Gamma : Exponential-response shrinkedData, scale parameters
///
public class InverseLinkFunction extends AbstractLinkFunction {
@Override
public LinkFunction makeCopy(){
return new InverseLinkFunction();
}
@Override
public double GetLink(double b)
{
return -1.0 / b;
}
@Override
public double GetInvLink(double a)
{
return -1.0 / a;
}
@Override
public double GetInvLinkDerivative(double a)
{
return -1.0 / (a * a);
}
}