how to train the datas in "svmtrain"....?

조회 수: 1 (최근 30일)
Dhines
Dhines 2013년 2월 14일
i extract the features from ten images.. and i constructs this feature in vector form in X0(got 1242 features)..also class labeled(y) related images +1 for authentic -1 for spliced image. now i am having x0 and y. keep this training samples and class labels apply to "svmtrain". how to apply xo and y to svmtrain.
  댓글 수: 2
the cyclist
the cyclist 2013년 2월 14일
Have you read the documentation for svmtrain?
>> doc svmtrain
What code have you written so far? It helps if you show us what you've done.
Dhines
Dhines 2013년 2월 15일
편집: Walter Roberson 2013년 2월 15일
Algorithm: R-SVM
1: input:
Training examples: x0 =[x1, x2 . . . xk . . .X_l ]^T,
Class labels: y = [y1, y2 . . . yk . . . y_l ]^T
2: Subset of surviving features: s= [1, 2 . . . n]
3: Feature ranked list: r= [ ]
4: repeat
5: Restrict training examples to good feature indices: x = x0(:,s)
6: Train the classifier: α= SVM-train(x,y)
7: Compute the weight vector of dimension length(s): W=Σ_k α_k y_k X_k
8: Compute the ranking criteria: c_i= W_i (m_i^+-m_i^- ),i
9: Find the feature with smallest ranking criterion: f = arg min(c)
10: Update feature ranked list: r =[s (f), r]
11: Eliminate the feature with smallest ranking criterion:
s = s (1: f-1, f +1: length(s))
12: until s= = [ ]
13: return Feature ranked list r.
so far i written extract the features from images using DCT and DWT tool. ordered this features as i said above algorithm first step. Xo and gave lables for y=[+1,+1,+1,+1,+1.-1,-1,-1,-1,-1]^T. i taken for further estimation all right. but the prob when i apply this svmtrain in svmtrain the syntax is svmtrain(training,grouping). is it correct? i took X0 for training and grouping i took y.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by