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

com.github.chen0040.glm.links.InverseSquaredLinkFunction Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
package com.github.chen0040.glm.links;

/**
 * Created by xschen on 14/8/15.
 */
/// 
/// Generally applicable to:
///   1. Inverse Gaussian
/// 
public class InverseSquaredLinkFunction extends AbstractLinkFunction {

    @Override
    public LinkFunction makeCopy(){
        return new InverseSquaredLinkFunction();
    }

    @Override
    public double GetLink(double b) {
        return -1.0 / (b * b);
    }

    @Override
    public double GetInvLink(double a) {
        return Math.sqrt(-a);
    }

    @Override
    public double GetInvLinkDerivative(double a) {
        return -1.0 / Math.sqrt(-a);
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy