pip install aenet
from aenet import AdaptiveElasticNet
from aenet import AdaptiveElasticNetCV
X, y = ...
model = AdaptiveElasticNet().fit(X, y)
model.predict(X)
model.score(X, y)
model = AdaptiveElasticNetCV().fit(X, y)
model.alpha_
model.predict(X)
model.score(X, y)
- Zou, H. and Zhang, H. H. (2009). On the adaptive elastic net with a diverging number of parameters. Annals of Statistics 37, 1733-1751.