Basic functionality for ElasticNet and LogNet.