regularm function

Fit the gnm model