|
Hi Peter,
I am using this function:
fun=@PLSREGRESS;
vals = crossval(fun,x,y,2);
>> size (x)
ans =
50 18
>> size (y)
ans =
50 18
??? Error using ==> crossval at 213
Data arguments X,Y,... must have the same
number of rows.
But, I got this error. Do you have any idea?
Thanks,
Frank
Peter Perkins <Peter.Perkins@MathRemoveThisWorks.com> wrote in message <i5r2na$bua$1@fred.mathworks.com>...
> On 9/2/2010 9:09 PM, Frank Sabouri wrote:
> > Using this function "[XL,YL,XS,YS,B,PC,MSE,stats] =
> > PLSREGRESS(x,y,2,'CV',5)", in that number of cross-validation is five, I
> > would expect to get five different outputs for each output. For example
> > I would like to extract these outputs [XL1, XL2...., and XL5], [YL1,
> > YL2...., and YL5], and so on. Please let me know how I could extract
> > these replicates from the function.
>
> That's not how the CV input to PLSREGRESS works. You can, however, use
> the CROSSVAL function to do what you want, by passing it a function that
> calls PLSREGRESS and returns the outputs you want in a single vector.
> CROSSVAL will return a 5xn matrix, which you can then take apart and
> reshape to get the 5 sets of things you want.
>
> Hope this helps.
|