Thursday, July 18, 2013

Classification Results for the SVM of a single sensor

We tried to implement an SVM to classify positive and negative picks for a single sensor. We implemented the following algorithm in Python.

The data in the SAC files is divided at the point of the first pick. Suppose the first pick occurs at 34 seconds for some earthquake. The algorithm takes an FFT for each 5 second interval before and after the pick, i.e. 0-5, 5-10, 10-15, 15-20, 20-25, 25-30 seconds for non-quake period and 35-40, 40-45, 45-50, 50-55, 55-60 seconds for quake period (similarly for 10 second intervals). These are stored in an array and the array is then randomly sorted. 

One concern was that the SVM seemed to be heavily biased towards the side (positive/ negative) that has more training examples (even one more training example). 

We tried this for the following bin sizes.
  • 0-1, 1-2, 2-3, 3-4, 4-5, 5-6, 6-7, 7-8 Hz
  • 0-1, 1-2, 2-4, 4-8 Hz
  • 0-2, 2-4, 4-6, 6-8 Hz
These were all done for both 5 second and 10 second intervals, using both the linear and the RBF kernels. For obtaining the results, we kept the number of training examples for positive picks and negative picks exactly equal.

The table shows the results for the linear kernel for bins of interval 2 Hz and 5 second data intervals.


For bins: 0-2, 2-4, 4-6, 6-8 Hz
5 second intervals: 56 training samples, 8 test samples
Training Data

5 seconds- linear kernel 5 seconds- rbf kernel
True Positive 71.42 25
False Positive 7.2 0
True Negative 92.8 100
False Negative 28.58 75

Test Data

5 seconds- linear kernel 5 seconds- rbf kernel
True Positive 100 0
False Positive 0 0
True Negative 100 100
False Negative 0 100
10 second intervals: 24 training samples, 4 test samples
Training Data

10 seconds- linear kernel 10 seconds- rbf kernel
True Positive 71.42 25
False Positive 7.2 0
True Negative 92.8 100
False Negative 28.58 75

Test Data

10 seconds- linear kernel 10 seconds- rbf kernel
True Positive 50 100
False Positive 0 0
True Negative 100 100
False Negative 50 0

No comments:

Post a Comment