Is anyone aware of a scikit-compatible network Lasso (nLasso) implementation?
These papers have source code as well:
Code: https://riken-yamada.github.io/localizedlasso.html
Code: https://github.com/davidhallac/NetworkLasso
But these particular implementations are not very general and can't be used as a part of the pipelines.
I would like to use nLasso to do something like this (the example picked from the scikit tutorial):
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_boston
from sklearn.feature_selection import SelectFromModel
from sklearn.linear_model import LassoCV
# Load the boston dataset.
boston = load_boston()
X, y = boston['data'], boston['target']
# We use the base estimator LassoCV since the L1 norm promotes sparsity of features.
clf = LassoCV(cv=5)
# Set a minimum threshold of 0.25
sfm = SelectFromModel(clf, threshold=0.25)
sfm.fit(X, y)
n_features = sfm.transform(X).shape[1]