Friday, September 8, 2017

Coding For Slope

This is a covariance[0] plot for a no-kidnapping data collection trial:





I first implemented what I talked about in the last post: I took 3 windows of 3 prior points a piece and averaged each window into a number.  If the previous window's average was bigger, I coded this as a 0. Otherwise, it was a 1.

This didn't work so well - there were more 1's than I wanted to see in a normal, no-kidnapping dataset. 

The next thing I tried was taking the same 9 previous points and comparing them consecutively - if prev_point9 > prev_point8, it's a 0, and otherwise a 1.  That resulted in the dataset below. 


I like this one because it represents short-lived spikes and longer-term increases.

Weaknesses of this modeling approach:
1. Doesn't represent the intensity of the increase (magnitude of the slope). I think it's mostly the degree of the slope that differentiates a kidnapping instance's covariance spike from a regular localization covariance spike. 
2. I'd like a way of identifying "This timestep and the 5 previous timesteps were ALL 1's" - somehow, that needs to make it into the model.


Time/Covariance[0]  t9>8 t 8>7  t7>6 t 6>5 t 5>4 t 4>3  t 3>2 t 2>1
32.68 0 0 0 0 0 0 0 0
43 0 0 0 0 0 0 0 1
43.36 0 0 0 0 0 0 1 0
43.64 0 0 0 0 0 1 0 0
44.18 0 0 0 0 1 0 0 0
50.3 0 0 0 1 0 0 0 0
50.57 0 0 1 0 0 0 0 0
54 0 1 0 0 0 0 0 0
56.17 1 0 0 0 0 0 0 0
57.52 0 0 0 0 0 0 0 0
58.44 0 0 0 0 0 0 0 0
61.6 0 0 0 0 0 0 0 0
62.4 0 0 0 0 0 0 0 0
65.14 0 0 0 0 0 0 0 0
69.98 0 0 0 0 0 0 0 1
73.63 0 0 0 0 0 0 1 0
73.93 0 0 0 0 0 1 0 0
74.33 0 0 0 0 1 0 0 0
77.55 0 0 0 1 0 0 0 0
80.56 0 0 1 0 0 0 0 1
81.55 0 1 0 0 0 0 1 1
85.61 1 0 0 0 0 1 1 1
86.2 0 0 0 0 1 1 1 1
88.1 0 0 0 1 1 1 1 1
89.54 0 0 1 1 1 1 1 0
91.81 0 1 1 1 1 1 0 0
93.91 1 1 1 1 1 0 0 1
94.47 1 1 1 1 0 0 1 1
95.91 1 1 1 0 0 1 1 0
97.32 1 1 0 0 1 1 0 0
102.73 1 0 0 1 1 0 0 1
104.1 0 0 1 1 0 0 1 1
104.61 0 1 1 0 0 1 1 1
105.72 1 1 0 0 1 1 1 1
107.29 1 0 0 1 1 1 1 0
108.7 0 0 1 1 1 1 0 1
110.17 0 1 1 1 1 0 1 1
111.98 1 1 1 1 0 1 1 1
113.45 1 1 1 0 1 1 1 0
114.23 1 1 0 1 1 1 0 0
114.82 1 0 1 1 1 0 0 0
118.75 0 1 1 1 0 0 0 0
120.1 1 1 1 0 0 0 0 0
123.97 1 1 0 0 0 0 0 0
126.51 1 0 0 0 0 0 0 0
129.75 0 0 0 0 0 0 0 1
130 0 0 0 0 0 0 1 1
130.29 0 0 0 0 0 1 1 0
130.56 0 0 0 0 1 1 0 0
131.8 0 0 0 1 1 0 0 0
131.28 0 0 1 1 0 0 0 1
131.59 0 1 1 0 0 0 1 1
132.75 1 1 0 0 0 1 1 0
133.5 1 0 0 0 1 1 0 0
134.2 0 0 0 1 1 0 0 1
134.76 0 0 1 1 0 0 1 0
135.62 0 1 1 0 0 1 0 1
136.23 1 1 0 0 1 0 1 0
137.76 1 0 0 1 0 1 0 0
138.89 0 0 1 0 1 0 0 1
140.61 0 1 0 1 0 0 1 1
141.88 1 0 1 0 0 1 1 1
143.37 0 1 0 0 1 1 1 1
144.71 1 0 0 1 1 1 1 1

No comments:

Post a Comment