| |
- group_fs(X, y, z1, z2, idx, **kwargs)
- This function implements supervised sparse group feature selection with least square loss, i.e.,
min_{w} ||Xw-y||_2^2 + z_1||w||_1 + z_2*sum_{i} h_{i}||w_{G_{i}}|| where h_i is the weight for the i-th group
Input
-----
X: {numpy array}, shape (n_samples, n_features)
input data
y: {numpy array}, shape (n_samples,)
input class labels or regression target
z1: {float}
regularization parameter of L1 norm for each element
z2: {float}
regularization parameter of L2 norm for the non-overlapping group
idx: {numpy array}, shape (3, n_nodes)
3*nodes matrix, where nodes denotes the number of groups
idx[1,:] contains the starting index of a group
idx[2,: contains the ending index of a group
idx[3,:] contains the corresponding weight (w_{j})
kwargs: {dictionary}
verbose: {boolean}
True if user want to print out the objective function value in each iteration, false if not
Output
------
w: {numpy array}, shape (n_features, )
weight matrix
obj: {numpy array}, shape (n_iterations, )
objective function value during iterations
value_gamma: {numpy array}, shape (n_iterations, )
suitable step size during iterations
Reference
---------
Liu, Jun, et al. "Moreau-Yosida Regularization for Grouped Tree Structure Learning." NIPS. 2010.
Liu, Jun, et al. "SLEP: Sparse Learning with Efficient Projections." http://www.public.asu.edu/~jye02/Software/SLEP, 2009.
|