I am training a group lasso model with time series data, which means rho=0 in my model. In every month, I train the model with the data in the past 24 months. The parameter alpha is very stable, around 0.0005. However, in several months, when I move ahead by one month, which means that I replace the data of month t-24 with the data of the latest month, the model do not converge. In this case, I need a far more larger parameters, which is aroung 0.002 to make the model converge. I am wondering why this happens. Because I only replace a small portion(less than 5%) of the training data, but the parameters change sharply. This may cause instability of the model, as in the previous month, I may choose 30 features, however in the current month, I can only choose 16 features.
Traceback (most recent call last):
File "D:\Program Files\Python\Python36\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 4, in
model = model.fit(p, y)
File "D:\Program Files\Python\Python36\lib\site-packages\sparsereg\model\group_lasso.py", line 33, in fit
max_iter=self.max_iter, rtol=self.tol)
File "D:\Program Files\Python\Python36\lib\site-packages\sparsereg\vendor\group_lasso\group_lasso.py", line 92, in sparse_group_lasso
delta = linalg.norm(tmp - w_new[group])
File "D:\Program Files\Python\Python36\lib\site-packages\scipy\linalg\misc.py", line 137, in norm
a = np.asarray_chkfinite(a)
File "D:\Program Files\Python\Python36\lib\site-packages\numpy\lib\function_base.py", line 1233, in asarray_chkfinite
"array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs