필터 지우기
필터 지우기

how can I constrain weights of linear classifier in MATLAB?

조회 수: 2 (최근 30일)
Heeseung Lee
Heeseung Lee 2015년 12월 23일
답변: Rakesh Chavan 2016년 1월 4일
I am graduate student studying system neuroscience in Korea. I have a problem and need your help... problem is like below.
There are a number of neurons and we know their firing rates on -3s, -2s, -1s, like
neuron index :
1 2 3 4
firing rata
0s: 1 1 -1 1
-1s: -1 -1 0 -1
-2s: 0 0 0 0
-3s: 1 1 1 1
By using these fire rate history, I want to predict current(0s) firing rate of neurons whether it is 1 or -1. I am using linear SVM and varying weights of each time point. But, I want to constrain absolute value of weight of recent firing rate is always larger than that of past like
weight of
-1s: -0.8
-2s: 0.3
-3s: -0.1
How can I realize this idea on linear classifier like linear SVM on MATLAB? (of course, other linear classifier would be welcomed)
please help me...

답변 (1개)

Rakesh Chavan
Rakesh Chavan 2016년 1월 4일
Hi,
It is possible to create a linear SVM model using the 'fitcsvm' function based on the training data. http://www.mathworks.com/help/stats/fitcsvm.html
You can use the 'predict' function to for classifying new data using a trained SVM classifier: http://www.mathworks.com/help/stats/compactclassificationsvm.predict.html
A general overview of the process is given in the following link: http://www.mathworks.com/help/stats/support-vector-machines-svm.html
For generating a linear discriminant analysis classifier the 'fitcdiscr' can be used. The weights option for this function can be used to specify custom weights. Kindly refer to the following link: http://www.mathworks.com/help/stats/fitcdiscr.html

카테고리

Help CenterFile Exchange에서 Electrophysiology에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by