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 Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by