ctmm-initiative / ctmmweb

Web app for analyzing animal tracking data, built upon ctmm R package
http://biology.umd.edu/movement.html
GNU General Public License v3.0
32 stars 21 forks source link

specify a standardized (HDOP=1) device error (UERE) in speed outlier detection #28

Closed chfleming closed 7 years ago

chfleming commented 7 years ago

Maybe I missed it, but I didn't see an input on the speed outlier detection page to specify a standardized (HDOP=1) device error (UERE). For GPS devices, these can easily scale from 2-20 meters.

xhdong-umd commented 7 years ago

I forgot to add this. I think we also need some error parameters input in variograms fine tuning page. Are they the same value? Where should we put this input?

So we just add

a numeric input with suggestions of 10 meters for GPS, 100 meters for VHF, 1000 meters for ARGOS.

right?

chfleming commented 7 years ago

Those are reasonable defaults for the outlier detection.

For the variogram it actually needs a slider to match the shape of the variogram. I still need to abstract the variogram.fit code...

xhdong-umd commented 7 years ago

I added a input field for UERE.

screen shot 2017-09-05 at 11 06 53 am screen shot 2017-09-05 at 11 07 01 am

I used a text input instead of numeric input, because the numeric input will respond to mouse wheel, so scrolling after input could trigger a series of unintended updates.

xhdong-umd commented 7 years ago

I further ensured the input to be numeric, and gave error messages when the provided UERE was too large (which will cause all speed values to be 0).

I updated the hosted app since nobody is using it now.

chfleming commented 7 years ago

Continuing from here: The telemetry error code is just being wrapped right now. There are a few possibilities as to how it works depending on what kind of data people have.

  1. Some data are pre-calibrated, and when imported will have an HERE or analogous column(s). Having UERE>0 in the filter and error>0 in the model will apply those errors with the incorporated device UERE being fixed. I.e., UERE/error being 1 or 10 makes no difference.
  2. Some people will have calibration data that they have to import into ctmm and run through the uere command to obtain a UERE estimate, which can then be applied to the data during as.telemetry or afterwards with the new uere()<- command. Again, once the UERE value is set in the data, it is treated as fixed in the filter and model fitting code, as long as its nonzero (and thus treated as TRUE).
  3. Some people will have no calibration data and in that case, model fitting can simultaneously estimate the movement & telemetry error parameters. This is not generally reliable but sometimes works well. In this case, the filter's UERE is interpreted as a best guessand the model fittingerrorthe initial guess. Here,UEREfor the filter anderror` for the initial model guess can/should be the same, though the variogram fitting may reveal a better initial guess than first thought, and after model fitting its value will also change according to likelihood.

Finally, all of this is complicated by the fact that UERE values are device specific and users could potentially have a mix of different devices in their CSV file.

xhdong-umd commented 7 years ago
  1. For case 1 with pre-calibrated data, is error automatically turned on or that should be an option in UI?

  2. Case 2 will become case 1 after user finished the processing, so there is no difference from web app perspective, right?

  3. For data without calibration, the UERE input in speed outlier page works as an initial guess, model fitting will give a better value if possible?

chfleming commented 7 years ago
  1. Error is not automatically turned on because the fitting/optimization becomes more finicky & slower, more sensitive to the initial guess, and often requiring a double check of the solution. For coarsely sampled large animals, the improvement is also not substantial.
  2. Yes, except the possibility of a calibration step.
  3. If the model fitting succeeds, then yes, it will be improved and have confidence intervals. Fitting both animal movement & telemetry error simultaneously is inherently dangerous though, from a statistical perspective, so sometimes it can come out with higher likelihood according to the model, but less realistic.
xhdong-umd commented 7 years ago

OK. So what kind of changes do we need in the app about these?

  1. Do we want an option to turn on error in model fitting, if data is available?
  2. Should the UERE input in speed outlier page have more impact on data and model fitting, or it should be limited for outlier detection only?
chfleming commented 7 years ago
  1. This should be automatically supported via the error slider in the variogram fit.
  2. It could potentially be copied over to the variogram fit as an initial value for the error. I'm not sure if that's a good idea for default behavior though.

As for other changes:

xhdong-umd commented 7 years ago

OK. I will put these on the list. Right now I think I should continue working on the work report feature, then revisit this later.

chfleming commented 7 years ago

Yes, the error work is not even published yet. Working on it now.