Does the Classification Learner App save the data other than training data for testing in MATLAB?

Does the Classification Learner App save the data other than training data for testing in MATLAB?

 采纳的回答

The MATLAB Classification Learner app does not automatically save the test or validation data separately when you set aside a portion of your data for testing or validation within the app. The app primarily focuses on training models and evaluating them using the specified validation technique (such as cross-validation or holdout validation).
Here's what you can do to manage your test data:
  • Option 1: Manual Data Partitioning - Before importing data into the Classification Learner app, manually partition your dataset into training and test sets using MATLAB code. This way, you have control over how the data is split and can easily access both sets. For Example:
    % Assuming data and labels are your complete dataset and labels cv = cvpartition(labels, 'HoldOut', 0.15); % 15% for testing trainData = data(training(cv), :); trainLabels = labels(training(cv), :); testData = data(test(cv), :); testLabels = labels(test(cv), :);
  • Option 2: Using the App's Validation Data - If you used the app's built-in holdout validation, you can view the performance metrics and confusion matrix within the app, but the app does not export the validation data to the workspace.
To summarize, if you need to work with test data outside of the app, it's best to partition your data manually before using the app. 

更多回答(0 个)

类别

Community Treasure Hunt

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

Start Hunting!

Translated by