Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NeilwBailey opened this issue Aug 31, 2022 · 3 comments

Comments

@NeilwBailey
Copy link

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
Copy link
Owner

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
Copy link

ghost commented Feb 7, 2023

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants