ridge function

fit a generalized linear model to compute adjacency matrix A