You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Classification Learner App准备语音识别多类SVM分类输入?

Hey there! Let's walk through exactly how to get your speech recognition data into MATLAB's Classification Learner App for Multiclass SVM, plus answer your questions about training/test data inputs:

Preparing & Importing Training Data

First, let's clear up a potential dimension mix-up you mentioned: your training input is a 11811×65 double matrix (so 11811 samples, each with 65 features), but you noted the corresponding response is 1×65 double. That doesn't fit standard classification workflows—each training sample needs a single class label, so your response should be a 11811×1 vector (one label per row in your input matrix). Double-check that your response data maps each training sample to its correct class (this is critical for the app to train the model properly).

Once you have that sorted:

  • Load your training feature matrix (let's call it train_features) and corrected label vector (train_labels) into your MATLAB workspace. If your labels are stored as doubles, convert them to categorical first with train_labels = categorical(train_labels);—this helps the app recognize it as a classification task.
  • Open the Classification Learner App by typing classificationLearner in the Command Window and hitting Enter.
  • On the Start Session screen, select From Workspace.
  • Pick train_features as your predictor data, and train_labels as your response data. Confirm the "Response variable is categorical" box is checked, then click Start Session.
Do You Only Need Training Data & Its Output?

Yep, you can absolutely start with just training data and its corresponding labels. The app will automatically let you split your training dataset into training/validation subsets (you can adjust the split ratio, like 70% train / 30% validation, in the app's settings). This is perfect for initial model tuning and checking performance on data the model hasn't seen during training.

Can You Provide Both Training & Test Data?

Absolutely—here's how to do it once your training data is imported:

  1. Go to the Test tab in the app.
  2. Click Import Test Data > From Workspace.
  3. Select your test matrix (5942×11 double). Wait, a quick critical note: your training samples have 65 features, but your test samples only have 11. Multiclass SVM (and all classification models) require test data to have the exact same number of features as training data. You'll need to fix this first—either adjust your feature extraction pipeline to generate 65 features for test samples, or reduce your training features to match the 11 in test (just make sure you're using the same set of features for both!).
  4. Once your test data matches the feature count, import it. The app will let you run your trained Multiclass SVM model on this held-out test set to get a realistic measure of its real-world performance. If you have labels for your test data, you can import those too to calculate accuracy, precision, etc.; if not, the app will still predict classes for all test samples.
Quick Bonus Tip

When you select Multiclass SVM from the app's model list, you can tweak settings like the multiclass strategy (one-vs-one or one-vs-all) and kernel type in the model options panel—play around with these to optimize performance for your speech recognition task.

内容的提问来源于stack exchange,提问作者Shweta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:10:31