load(l,
k,
g,
beta,
M,
e,
A,
mu,
snr=None,
intercept=False)
| source code
|
Returns data generated such that we know the exact solution.
The data generated by this function is fit to the Linear regression + L1 +
L2 + Smoothed group total variation function, i.e.:
f(b) = (1 / 2).|Xb - y|² + l.|b|_1 + (k / 2).|b|² + g.GroupTVmu(b),
where |.|_1 is the L1 norm, |.|² is the squared L2 norm and TVmu is the
smoothed total variation penalty.
Parameters
----------
l : Non-negative float. The L1 regularisation parameter.
k : Non-negative float. The L2 regularisation parameter.
g : Non-negative float. The group total variation regularisation parameter.
beta : Numpy array (p-by-1). The regression vector to generate data from.
M : Numpy array (n-by-p). The matrix to use when building data. This
matrix carries the desired correlation structure of the generated
data. The generated data will be a column-scaled version of this
matrix.
e : Numpy array (n-by-1). The error vector e = Xb - y. This vector carries
the desired distribution of the residual.
A : Numpy or (usually) scipy.sparse array (K-by-p). The linear operator
for the Nesterov function.
mu : Positive float. The Nesterov smoothing regularisation parameter.
snr : Positive float. Signal-to-noise ratio between model and residual.
intercept : Boolean. Whether or not to include an intercept variable. This
variable is not penalised. Note that if intercept is True, then e
will be centred.
Returns
-------
X : Numpy array (n-by-p). The generated X matrix.
y : Numpy array (n-by-1). The generated y vector.
beta : Numpy array (p-by-1). The regression vector with the correct snr.
|