PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Jan 2019 01:08 PM by  Mari Minari
Iterative SVM classification
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Prabha Rupasinghe



New Member


Posts:20
New Member


--
10 Jan 2019 09:43 AM
    Hello,
    I am trying to iterate SVM classification for 100 outputs and I need classification error matrices for all 100 outputs so that I can perform some statistical analysis to compare time series. I need to do this for several time series for two sites, so I guess my only option is using IDL as this is lots of work to be done manually. I used the IDL example given in the link; https://www.harrisgeospatial.com/do...jects.html for my images. I changed the maximum iterations to 100 and ran the code. But it gives me one output image and one error matrix. And also I do not understand how this error matrix is created by the program as I did not input separate set of ROI to perform the accuracy assessment. I am not experienced with programming so any help on this is greatly appreciated. thank you!

    Mari Minari



    Veteran Member


    Posts:2136
    Veteran Member


    --
    14 Jan 2019 02:52 PM
    If I understand your question, you want to iterate through your files but the 'iterations' in the Example Classification code is not iterating through files. It is an "iterative trainer" used for training the data as described here:
    https://www.harrisgeospatial.com/do...ainer.html

    To process files in a batch or loop, you can use IDL's FOR or FOREACH loop.

    Prabha Rupasinghe



    New Member


    Posts:20
    New Member


    --
    16 Jan 2019 10:02 AM
    Hi Mari,
    Thank you so much for getting back to me. I am so much stuck in this problem!
    Actually, I do not want to run SVM for many files/images at once in a loop. I want to run the classification for a one image for 100 times using a set of ROIs I have created. So I want to get 100 classified images using one same Landsat image (input). I am sorry, my question was not clear last time..
    I have 10 images in a time series and I want to find which image in the time series gives the highest classification accuracy and whether that accuracy is significantly higher than the accuracy of the rest of the images in the time series. A reviewer recommended to try 'iterative SVM' to generate 100 outputs per each image in my time series so that I have a set of accuracy values for each image and then I can perform some statistical analysis. Is it possible to do this with ENVI/IDL?
    As I understand, 100 iterations in the IDL program in ENVI tries to optimize the classification results through 100 repeats. It do not produce 100 outputs as my reviewer says. Please correct me if I understood this wrong.
    I found some method called 'ensemble SVM' which take sub-samples of ROIs and repeat the classification and then produce number of outputs for each subset of ROI. Is there any function in ENVI to do this?



    Mari Minari



    Veteran Member


    Posts:2136
    Veteran Member


    --
    16 Jan 2019 01:08 PM
    You are correct. The iterations that occurs is for training the classifier but it will only produce one classified output per image. Since your 10 images are contained in a single file, it will apply the trainer on the full 10-band data set and produce one classification. ENVI does not have a tool like you describe (ensemble SVM) but you might be able to split up your ROI samples using something like Generate Random Sample:
    http://www.harrisgeospatial.com/doc...ample.html

    Then use the different sets of ROIs in the trainer and then classify. It may require a significantly large ROI to generate an adequate number of samples for training.
    You are not authorized to post a reply.