How to create a binary svm classifier?
显示 更早的评论
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
2017-7-18
0 个投票
The Y labels vector is the same as the class labels vector.
4 个评论
Somaia Ahmadi
2017-7-18
Walter Roberson
2017-7-18
Do any of those operations change the column's identification as belonging to mental activity or rest?
Somaia Ahmadi
2017-7-18
编辑:Somaia Ahmadi
2017-7-18
Walter Roberson
2017-7-18
As long as you keep columns separate you will be fine. (Each column is an individual sample.)
Image Analyst
2017-7-18
0 个投票
Did you try the Classification Learner app, on the Apps tab, and have the wizard export the code for you?
类别
在 帮助中心 和 File Exchange 中查找有关 Classification Learner App 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!