covartech / PRT

Pattern Recognition Toolbox for MATLAB
http://covartech.github.io/
MIT License
144 stars 70 forks source link

Cross-validation in Matlab R2016b #50

Closed cratto closed 7 years ago

cratto commented 7 years ago

Seems odd that this is throwing an error in the latest version of Matlab. I verified that it runs without issue in R2015a.

ds = prtDataGenUnimodal; fld = prtClassFld; dsOut = fld.kfolds(ds);

Input arguments to function include colon operator. To input the colon character, use ':' instead.

Error in prtClass/maryOutput2binaryOutput (line 412) OutputDataSet = OutputDataSet.setObservations(OutputDataSet.getObservations(:,end));

Error in prtClass/postRunProcessing (line 360) dsOut = maryOutput2binaryOutput(self,dsOut);

Error in prtAction/run (line 254) dsOut = postRunProcessing(self, dsIn, dsOut);

Error in prtAction/crossValidate (line 369) outputDataSetCell{uInd} = trainedAction.run(testDs);

Error in prtAction/kfolds (line 553) [outputs{:}] = self.crossValidate(ds,keys);

kennethmorton commented 7 years ago

Hey,

I think you need to pull the latest version. In a recent version of MATLAB , around 2015b I think, they disallowed the use of colons as inputs to functions. This caused a number of these issues. I think we have found most of them by now. I have confirmed that the current version prtClass.m does not have the line in question.

Everything should be fine after a pull. Let me know if not. Kenny