From 14cc8780e52ee529a7632e57cb2e063d5f067f4c Mon Sep 17 00:00:00 2001 From: Anurag Agarwal <92269948+Anurag19101996@users.noreply.github.com> Date: Sun, 21 Jul 2024 13:12:00 -0700 Subject: [PATCH 1/2] Update MAWfwk.md Added documentation for Stay Duartion --- docs/MAWfwk.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/MAWfwk.md b/docs/MAWfwk.md index db49bc5..987ae64 100644 --- a/docs/MAWfwk.md +++ b/docs/MAWfwk.md @@ -192,7 +192,29 @@ refer the above paper section 4.3 and the algorithms itself ### STAYCAL: Update stays (Anurag: 4 hours) -update stays and duration. +Based on the algorithm used for identifying the stays, once the stay clusters are formed, i.e., traces having a value of `stay_lat` and `stay_long`, it is important to identify those clusters which are greater than a given duration threshold (referred to here as the duration constraint). + +For a given cluster, the stay duration is calculated by finding the time difference between the first trace and the last trace belonging to the cluster. + +#### Inputs + +The algorithm takes the following inputs: + +1. **Traces**: GPS coordinates with timestamps for user(s). +2. **Duration Constraint**: The minimum duration which the existing stay duration of the identified clusters should be more than for them to be considered as stay clusters. + +#### Algorithm + +1. **Calculate Stay Duration**: + - If the stay duration is already calculated by other algorithms, use that value. Otherwise, calculate it as the time difference between the first and last trace ordered by time. + +2. **Filter Clusters by Duration**: + - Keep those clusters whose stay duration is greater than the duration constraint. + +3. **Mark Transient Points**: + - Points that do not meet the duration constraint are assigned as transient. + +This algorithm ensures that only valid stays with durations meeting the specified threshold are retained ### STAY_INC_THRESHOLDS: Identifying suitable spatial thresholds for stay identification (incremental clustering) (km) (Anurag: 1 day) From f79481cb3e297edad44ebf20d061f56f65e7f5b6 Mon Sep 17 00:00:00 2001 From: Anurag Agarwal <92269948+Anurag19101996@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:11:47 -0700 Subject: [PATCH 2/2] Update MAWfwk.md --- docs/MAWfwk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MAWfwk.md b/docs/MAWfwk.md index 987ae64..a7862c4 100644 --- a/docs/MAWfwk.md +++ b/docs/MAWfwk.md @@ -206,7 +206,7 @@ The algorithm takes the following inputs: #### Algorithm 1. **Calculate Stay Duration**: - - If the stay duration is already calculated by other algorithms, use that value. Otherwise, calculate it as the time difference between the first and last trace ordered by time. + - Calculate it as the time difference between the first and last trace ordered by time. If there is a value of stay duration already present it the last trace of the given cluster (from say a previous run algorithm), add it to the stay duration calculated in this step. 2. **Filter Clusters by Duration**: - Keep those clusters whose stay duration is greater than the duration constraint.