Closed dimapitt closed 8 years ago
Ahhh. Yes. I think we knew this was coming. So TMW changed whats allowed in function calls and no longer string-ifies colons for you.... Unfortunately this is all over the place in the PRT.
I went through and found this or similar problems in the following files:
prtPreProcHistEqKde prtPreProcLogDiscPostPlsda prtDataGenContextDependent prtDataSetClass prtClass prtDataSetInMem prtPreProcLogDisc prtRvKde
prtClassSvmPegasos prtClassFld prtClassRvm prtClassSvmMcode prtPreProcHistEq prtRegressRvm
They should all be fixed now. If you find any more, please let us know. The easy fix is what you described - .getObservations --> .X and .getTargets --> .Y.
Thanks Dima!
I just found another example of the same issue popping up on line 116 of prtClassBinaryToMaryOneVsAll.
cDataSet = dataSet.setTargets(dataSet.getTargetsAsBinaryMatrix(:,iY));
As suggested by the resulting error, I just changed : to ':' to fix the issue.
Same issue on line 173 of prtClassBinaryToMaryOneVsAll
Weird - is your PRT up to date? Those lines don't have that code in my PRT (which I think is up to date)
Nope, it wasn't. Sorry about that! All works great now :).
No prob! Glad to know you're using it! And always feel free to report bugs or problems you find.
Breaks on line 762 of prtDataSetClass:
xLoc = sort(cat(1,xLoc(:),ds.getObservations(:,iFeature)),'ascend');
More specifically:
ds.getObservations(:,iFeature)
Not sure if it has something to do with using a newer version of MATLAB (breaks in 2015b and 2016a), or a change made in ds.getObservations.
Changing the line in question to:
xLoc = sort(cat(1,xLoc(:),ds.X(:,iFeature)),'ascend');
fixes the problem.