How to create a binary svm classifier?

조회 수: 10 (최근 30일)
Somaia Ahmadi
Somaia Ahmadi 2017년 7월 18일
댓글: Walter Roberson 2017년 7월 18일
I have 5 sets of data each with 3 runs of eeg signal acquisitions, and I'm to create a classifier that will distinguish between the rest and mental activity in each run. So first ten seconds are mental activity and then rest for 20s. The class labels are given but its just [1 2 1 2 1 2 1 2 1 2 1 2] for class 1 being mental activity and 2 being rest, for all runs and subjects? To use fitcsvm I need the Y labels array but am not sure how to get that

답변 (2개)

Walter Roberson
Walter Roberson 2017년 7월 18일
The Y labels vector is the same as the class labels vector.
  댓글 수: 4
Somaia Ahmadi
Somaia Ahmadi 2017년 7월 18일
편집: Somaia Ahmadi 2017년 7월 18일
Nope it should still be mental activity or rest, but I'm worried that if I put all the runs from each subjects together in one matrix the class labels won't apply..
Walter Roberson
Walter Roberson 2017년 7월 18일
As long as you keep columns separate you will be fine. (Each column is an individual sample.)

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 7월 18일
Did you try the Classification Learner app, on the Apps tab, and have the wizard export the code for you?
  댓글 수: 1
Somaia Ahmadi
Somaia Ahmadi 2017년 7월 18일
Yeah I did, but it wasn't able to find the response variable (which I assume is the class label vectors in the cell array containing the signals)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Classification Learner App에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by