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

1 visualización (últimos 30 días)
Dhines
Dhines el 14 de Feb. de 2013
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 comentarios
the cyclist
the cyclist el 14 de Feb. de 2013
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 el 15 de Feb. de 2013
Editada: Walter Roberson el 15 de Feb. de 2013
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by