Saving data after Running Classification Learner App on HPC with no display

3 views (last 30 days)
Hi,
I am looking to run the Classification Learner app on an HPC running Linux Red Hat Enterprise with no GUI display to use multiple cores without running out of memory. I know I can invoke to run with;
classificationLearner(Tbl,ResponseVarName);
However I cannot figure out how to return the output of the classification learner app. The documentation seems to suggest that you can run, save and open the saved file.
"opens the Classification Learner app with the previously saved session in filename"
classificationLearner(filename)
Is this poissable? If so, how can the classification learner session be saved via the command line after running all selected models?

Accepted Answer

Drew
Drew on 31 Oct 2023
Operating Classification Learner
The command:
classificationLearner(Tbl,ResponseVarName);
will open Classification Learner with the provided data table and response variable. In general, to perform operations such as completing the "Start Session" dialogue, selecting models, and running training, users need to interact with the Classification Learner GUI.
Loading and saving Sessions using R2022a or higher
The sidebar on the right indicates you are using R2021b. The save and load session capability was added to Classification Learner in R2022a. Classification Learner sessions can be saved and re-loaded as described here or https://www.mathworks.com/help/stats/classificationlearner-app.html . Classification Learner sessions can be saved using the GUI interface. The option to save the session is on the toolstrip. Classification Learner sessions can be loaded using the GUI interface, or using the commandline
classificationLearner(filename)
Generate Code from Classification Learner in order to run on HPC machine
If you want to run training on an HPC machine with no GUI, one option would be to generate code from Classification Learner, and then run that m-file code on the HPC machine.
  • Open Classification Learner on a machine with GUI access.
  • Load a subset of your data in order to run a small training successfully on the machine with a GUI
  • Use the Classification Learner "Generate Function" option to generate m-file code for the desired model training/s.
  • Run the training code on the HPC machine with the small dataset to confirm things are working, then run training with the the big dataset on the HPC machine
If this answer helps you, please remember to accept the answer.
  1 Comment
Christopher McCausland
Christopher McCausland on 1 Nov 2023
Hi Drew,
Thank you for the answer, the HPC is running 2021b, however I have 2021b and 2023b side by side on my local machine.
I hadn't thought about using the app to generate the code, that’s a good idea. As you know it's not difficult to write, however quite monotonous. This afternoons problem is then to figure out a nice way to get multiple training functions running via a parfor loop or similar!
Christopher

Sign in to comment.

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!