classification


Feature selection priority (Matlab)


I classify some data based on libsvm classifier. I used K-fold technique to evaluate the performance. Is this correct that I use Feature Selection technique in K-fold loop? I wrote a matlab code, I am feeling the priority of FS is wrong and it should be removed from this loop.
Please answer me. Thanks
for i=1:NumKfold
train_data=train{i}(:,1:end-1);
train_p_target=train{i}(:,end);
test_data=test{i}(:,1:end-1);
test_target=test{i}(:,end);
%======================Selecting Best Features=======================
------Feature Selection Based on Evolutionally Algorithm----
ind0=output; % The index of best features
str= '-c 1 -g 2 -b 1';
svmStruct = svmtrain(train_p_target, train_data(:,ind0) , str);
[predicted_label, accuracy, decision_values] = svmpredict(test_target,
C=confusionmat(test_target,predicted_label);
acc_Selected_LibSvm(i)=sum(diag(C))/sum(C(:));
end
No! You must select feature in out of K-fold loop. In fact, first select subset of feature by your Evolutionary Algorithm and then evaluate this subset. For evaluate any subset, pass this selected subset too your classifier and return average of accuracy on the k fold of your data. for example, if k = 10, your classifier run 10 time and average of this 10 run accuracy is fitness of input subset.

Related Links

GMM Fisher Vector
Can someone give me an example how to count probabilities using Complementary Naive Bayes in Mahout?
Classification results interpretation (TFlearn, Keras)
discretization for feature selection in weka
ROC result interpretation
Classification using Mallet and MaxEntropy
Measuring Error Correlation of Classifiers
caffe: Confused about regression
How to cut a dendrogram in r
Building weka classifier
Does Orange data mining software has multi-layer perceptron classification?
User Classification in RapidMiner - output should be the user based on a fed test data
Error in building mean image file(Caffe)
caffe: probability distribution for regression / expanding classification (softmax layer) to allow 3D output
Does MLE produce a generative or discriminative classifier?
Basic Hidden Markov Model, Viterbi algorithm

Categories

HOME
logging
sql-server-2014
sip
snappy
file-upload
glsl
bitbucket
crash
jshell
handlebars.js
google-api-oauth
vsixmanifest
cracking
ethereum
xmlhttprequest
derby
jsfiddle
openscad
reportlab
windows-phone
udeploy
bootstrap-datetimepicker
keystone
ejb-3.1
fastboot
uipath
akavache
stack-trace
restangular
choco
imdb
storefront
ports
openvms
n1ql
maven-2
console.readline
area
aspose.pdf
ng-lightning
ui-grid
rbac
sknode
google-chrome-console
jquery-ui-slider
superclass
taiga
smooth-streaming
python-venv
xmldom
confluent
noise
monaca
visualizer
intermediate-language
richtext
kendo-scheduler
multi-targeting
totalview
nsalert
recursive-query
vertex-shader
qudpsocket
scikit-image
jspx
foreground
cosign-api
init
normalisation
bytearray
sbt-proguard
archiva
instabug
app-data
overlapping
android-contentresolver
android-facebook
om
log4cxx
joomla3.3
page-refresh
esb-toolkit-2.1
httpmodule
data-quality-services
xcode5
drools-guvnor
diffmerge
api-eveonline
yosemite
worklight-appcenter
agent-based-modeling
nest-initiative
xpand
satisfiability
lettuce
sqldatasource
connections
imaplib
netbeans-plugins
infinity.js
nsautoreleasepool
string-length
brew
mmo
dnsbl
libx264
feincms
hypertable
android-memory
animationdrawable
idtabs
httppostedfilebase
digg
funambol
cinder
text-manipulation
oaw
miniport
glassfish-embedded
dynamic-scope
pkcs#7
mdd

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App