benfulcher / hctsa

Highly comparative time-series analysis
https://time-series-features.gitbook.io/hctsa-manual/
Other
734 stars 315 forks source link

TS_Classify produces an "Unrecognized function or variable 'foldLosses'" error when trying to save the classifier #65

Closed NeilwBailey closed 1 year ago

NeilwBailey commented 2 years ago

Hi Ben

I'm just trying to save the classifier produced by TS_Classify, and I'm getting an error saying both Unrecognized function or variable 'foldLosses', and Unrecognized function or variable 'whatLoss'. It looks like these variables are no longer produced by TS_Classify (when I use the find function to look for the variables within TS_Classify, they are not produced as outputs on any line). When I comment out the lines that require these variables, the function works.

It looks like the aspect of the TS_Classify function that utilizes these variables might have been removed at some stage, because I've noticed the following in the output description (I was also interested in the doPCs option, but couldn't work out how to perform it):

%---OUTPUTS: % Text output on classification rate using all features, and if doPCs = true, also % shows how this varies as a function of reduced PCs (text and as an output plot) % foldLosses, the performance metric across repeats of cross-validation % nullStats, the performance metric across randomizations of the data labels % jointClassifier, details of the saved all-features classifier

Kind regards,

Neil

benfulcher commented 2 years ago

Thanks mate. Yes, this was not properly implemented/tested by Oliver, but some parts remain remnant in the code base. Would be good to implement a function that trains on one (training) HCTSA file and tests the trained model on another (test) HCTSA file.

ghost commented 1 year ago

Hello,

I noticed that the recent version fixed the error with missing "foldLosses" but not the error with the missing variable 'whatLoss'. Is there another fix for that?

Kind regards Fabian

benfulcher commented 1 year ago

Thanks! The saving classifier functionality was never fully implemented by Oliver; I have added a warning about this being unsupported functionality, and a quick fix for the attempt to access the whatLoss variable.