Question on tau=0 in Elastic Net Subspace Clustering implementation
lizhenstat opened this issue · 1 comments
Hi, thanks for sharing your python version of your great work! I have one related question when tau=0,
as stated in the documentation.
If tau = 1.0, the method reduces to sparse subspace clustering with basis pursuit (SSC-BP).
If tau = 0.0, the method reduces to least squares regression (LSR).
However, when tau=0, python throws an error this the following line,
if gamma_nz == True:
coh = np.delete(np.absolute(np.dot(X, y.T)), i)
alpha0 = np.amax(coh) / tau # value for which the solution is zero
alpha = alpha0 / gamma
else:
alpha = 1.0 / gamma
Therefore I guess gamma_nz should be set to False when tau=0, right? However, the documentation of gamma_nz says
gamma_nz : boolean, default True
gamma and gamma_nz together determines the parameter alpha. If gamma_nz = False, then
alpha = gamma. If gamma_nz = True, then alpha = gamma * alpha0, where alpha0 is the largest
number that the solution to the optimization problem with alpha = alpha0 is zero vector
Then, should we change alpha = 1.0 / gamma
to alpha = gamma
?
Thanks for your time and any help would be appreciated!
Thanks for your interest and I hope this is not too late ...
Setting both tau = 0.0 and gamma_nz = True should be avoided. If you have tau = 0.0 then it is recommended to use the LSR instead of EnSC implementation.