Seemingly a bug in lassoglm?

2 visualizaciones (últimos 30 días)
Timothy Scharf
Timothy Scharf el 19 de Ag. de 2014
Respondida: Timothy Scharf el 19 de Ag. de 2014
Hello all,
Using the lassoglm example from the documentation lasooglm doc, we are receiving an error -
rng('default') % for reproducibility
X = randn(100,20);
mu = exp(X(:,[5 10 15])*[.4;.2;.3] + 1);
y = poissrnd(mu);
[B FitInfo] = lassoglm(X,y,'poisson','CV',10);
Error using zscore
Too many input arguments.
Error in lassoglm>computeLambdaMax (line 1509)
[X0,~,~] = zscore(X,1);
Error in lassoglm (line 246)
[lambdaMax, nullDev, nullIntercept] =
computeLambdaMax(X, Y, pwts, alpha, standardize, ...
It looks as if the internal call to zscore is using an improper number of arguments
the call
zscore(X,1)
should be
zscore(X, flag, 1)
if I set the 'Standardize' to false, it runs fine
[B FitInfo] = lassoglm(X,y,'poisson','CV',10,'Standardize',false);
I am using student R2013a and this error occurs the same way on all three examples
Thanks if anyone does a sanity check and confirms -

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 19 de Ag. de 2014
which -all zscore
More than likely you have your own zscore function shadowing the builtin. Please rename this one and the above should work.

Más respuestas (1)

Timothy Scharf
Timothy Scharf el 19 de Ag. de 2014
thank you - I knew it wasn't MATLAB's fault... thanks!

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by