I am a newcomer to Machine learning and classification. I am working for classification of two different type of image classes. I have calculated block-wise(overlapping,sliding(1px), size:3x3) features of every image in the dataset and stored them row wise. There are 800 images in one type of class (A) of dataset and 450 images in other type of class (B) in the dataset. so, basically i have an array of 800 rows and 90000(appx) column in one class and 450 rows and 90000(appx) column in other class.
now i want to train and test SVM classifier on these two classes. I have tried to perform 10 fold classification using some of following methods:
1. every alternative image from class A and first 400 from class B accuracy was around 70% (low TP, positive i am considering for minor class B)
2. all images from class A and all from class B, accuracy was around 80% average
3. in third case i have upsampled class B with basic repetition measure i.e all images from class A, all images from B + first 350 images again from class B which boosted accuracy to above 90% with high TP and high TN
i am using SVM as following:
SVMModel = fitcsvm(trained_data,gg,'Standardize',true,'KernelFunction','RBF','BoxConstraint', 32, 'KernelScale', 0.2008);
although i am getting nice accuracy but i am not sure about acceptability of my upsampling methodology.
question 1: am i using right method to upsample the feature set? if not what other suitable method i can use? any suggestions. (I have already tried SMOTE but it doesnt work because my data has very small values standard deviation and SMOTE perform addition/multiplication operation which causes major changes in the data, shifting to some other type class)
question 2: can i use SVM without manual upsampling in this case? If yes then what should i write in place of following to tune SVM?
SVMModel = fitcsvm(trained_data,gg,'Standardize',true,'KernelFunction','RBF','BoxConstraint', 32, 'KernelScale', 0.2008);
well, kernal scale i have decided according to misclassfication rate on crossvalidation (third case).
please guide me.....thanks in advance.