3.1. The CLSTR Algorithm
The TRACLUS trajectory clustering algorithm contains the three different phases. These are trajectory planning (line 2), Line Segments Clustering (line 4) and Trajectory generations. These phases execute in sequentially with minimum trajectory movement i.e. the first part we calculate the partitioning and then second phase we execute the trajectory clustering. We comprehensive clarify these algorithms below.
Algorithm Generation CLSTR (Clustering Trajectory)
Input: Find trajectories generation data T = {G1,···,Gnmln}
Output: (1) set prediction data data R = {S1,···,Snunclr}
(2) A S={set of trajectories moving set of data}
Algorithm:
/* CLSTR clustering prediction */
01: ∀ (G ∈ T ) recursive until termination ;
02: Predictive generation Trajectory clustering;
find Ls and Nε (L) ;
03: Accumulate Ls into a set E;
/* Grouping Phase */
04: Execute Line Segment Clustering for E;
Find value of R clusters ;
05: search belong ( S∈ R ) do;
06: Repeat Predictive generation Trajectory clustering;;
3.2 Partitioning Trajectory (Partitioning Phase)
This portion covers the Approximate Trajectory Partitioning algorithm for trajectory clustering for data. The algorithm Approximate Trajectory Partitioning shows below. This work computed MDLnopar and MDLpar for respectively argument in a trajectory. Compare actual value of each MDLpar and MDLnopar, out of them find out maximum value then put in the instantly value to MDLpar(pmdlstaIndex, pmdlcurrentIndex). Set the current appxomately value in stating and repeat CPi as startmdlP1.
Algorithm Prediction generation Trajectory MDL
Input: A prediction generation PGi = g1g2.···gn ···ppgini
Output: Prediction generate upto last Cp ={ C1,c2……..C ppgini }
Algorithm:
/* stating : Prediciton Generation */
01: Initialize the value CPi in srt P1,p2, ..;
02: set Indexvaluestr:= 1, maximumlength := MDLpar miminum= Pcurr+currIndex;
03: for (maxIndex start+ maximunvalue ≤ currentIndxggu); repeat unitl termination
04: maxcuurrvalue= pccgggstart + current start;
05: maxpar := CDMDL total par(maxcuur srart, max curr index);
06: minnopar := CDMDLtotalnopar (maxcuur sart, max curr index);
/*Find max and min patterned the separating existing argument that generation as CDMDL totalnonpa */
07: CDMDL total par= pccgggstart -1
/* Prediciton generation of previous point */
08: Average= pccgggstart -1;fing generation each;
09: pccgggstart := pcccurrIndexst−1, maxlength :=1;
10: recursive
11: total max := pccgggstart-1;
12: Assign the value plenii nto Cp /* the last */
3.3 Clustering Trajectory (Grouping Phase)
This portion, we recommend a different line algorithm, especially emphasis on line segment clustering algorithm for moving data trajectory clustering. We also focus on trajectory density prediction generation algorithm for trajectory clustering. Suppose a there are segmentation of line belong to S and produces a set of clusters that is O. For defining the cluster set parameter we need index value cluster Id two data set i.e. is Sε(L )nd Lnr1,···,Lnmcls. These approaches suggest clustering trajectory algorithm provides different appearances of algorithm DBSCAN with many parts in trajectory clustering.
Algorithm: K- nearest prediction generation density Clustering
Input: (1) K-nearest Line prediction generation segments D = {G1,···,Gnmln},
(2) set K-nearest prediction Sε(L ) nd Lnr1,···,Lnmcls .
Output: K-nearest Line prediction generation segments S = {s1,···,snmcls}.
Algorithm:
/* prediction starting point generation */
01: Assign generation cluster Id to be -1;
02: Identify all unbrokable cline and setcluster Id value;
03: iterative belong (L ∈ D) until
04: go (S each unbroken Id) jump
05: assign Sε (D);
06: put (|Sε (D)| ≥ GNmax) repeat
07: provide sum of rS {A}∈ Sr(D)on Id;
08: Addition Nε(I) − {A};
/* 2 Step prediction generation*/
09: assign cluster Id (S, cluster Id, r , MLmax);
10: put cluster Id as GNmax; /* generate new id */
11: do;
12: drop unstasidied generation(remark);
/* 3 Step prediction generation */
13: Assign r Gs∈ D ,Sclusterid ;
/* Cluster predication trajectory */
14: if (D∈ G) till
/* from stating check clusterid*/
15: for (| KCN (G) | > MLmax )
16: check unsatisfied value and remove from cluder id;
17: Increase value(S, D , G , MLins) {
18: for each (D=g) till
19: each pass value assign in Sg;
20: add G α (S);
21: for {A}∈ Sr(D)on Id) do
22: ITERATION ( NSα (g\ D) reperat
23: set (G is actual cluster value) print
24: value of cluster Id to G;
25 : set (S is removed cluster id) print
26: value of cluster Id to D;
27: Stop removing value from G to value p1,p2…Pn;
28: Stop prediction generation from S;
29: }
Algorithm: DBSCAN Trajectory partitioning clustering
Input: (1) Create new cluster generation predication Pi
(2) Find MLins value for cluster generation
(3) Set prediction φ.
Output: Set demonstrative trajectory Ti prediction generation for maximum Pi.
Algorithm:
01: Find max value of direction vector field ;
02: Alternate the hatchets X axis is equivalent to;
03: Now set starting and ending value for cluster Pi;
/* coordinate of the c´ axis donation */
04: average value G with new generation p´-values;
05: if (T ∈ G) recursive
/* calculate all cluster predicitionp */
06: sum movp segments that contain the p´- value of the predication r;
07: if (movp ≥ pLincuus) then
08: rel in p´- values between t and its immediately previous point f;
09: put (max ≥ r) get
10: total max generation movavgCp;
11: get max and min value movp;
12: Append avgp to the end of RTRi;
3.4 Formalization Using the MDL Principle
This area suggests a formalization trajectory prediction of optimum trade between precision versus terseness. This portion also emphasis the accept the minimum prediction generation description density length (MDL) standard extensively.
The MDL classify into two different parts, these are G(P) and L(G|T) where T emphasis trajectory movement and G belongs maximum prediction data. There binary apparatuses are casually stated as follows [ if (diff ≥ α)]: we formulate G(P) by Formula (1). Here, len (pcj+1) denotes the length of a line segment pcj+1, i.e., the Euclidean distance between pcj and pcj+1. Hence, L(H) signifies the amount of the distance of all trajectory partitions.
![](https://myfiles.space/user_files/58853_cdc0f79cc190fa60/58853_custom_files/img1618847740.png)
Approximate Solution
The algorithm Approximate Trajectory Partitioning shows below. Here we calculate GTR for cluster prediction of moving data. Here value of CLCSTRpar is assign maximum trajectory area i.e. belong {A}∈ Sr(D)on Id nopar, assign actual data with its adjacent value of moving data , for every point {A}∈ Sr(D)on Id . Then, we recurrence generation data practice for approximate solution i.e. start with initial point (startInex: = currIndx−1, length: = 1). Representative CLCSTRpar present provides best generation approximation clustering.
Algorithm: New Representative CLCSTRpar present Generation
Input: (1) Consider PLTi as CLCSTRpar present ={c1,c2…Cnindexstart);
(2) MLins (3) A smoothing parameter α
Output: The demonstrative PLRi as CLCSTRpar present ={p1,p2…pnindexstart);
Algorithm:
01: Find max value of direction vector field ;
02: Replace the hatchets X axis is equivalent to ;
03: set value CLCSTRpar present =currentindex;
04: iterative belong (L ∈ D) until;
05: if (G ∈ r) repeat
06: Let nump be the number of the line segments that contain the X´- value of the point p;
07: if (nump ≥G MLins) then
08: calu difference in X´- values between p and its nearest point;
09: if (diff ≥ α) then
10: Compute the average coordinate avgˊp;
11: Unwrap the spin and find out avgp;
12: Append avgp to the end of RTRi;
Clustering Neighbors K-Clustering (NK-CN)
The set od points (p, int k, real num α)
// where α is greater than zero (α>0).
BEGIN
p = Find out core value P (int p, k, α);
if pointp <> null then
Cul 1 set = Set1 (int p, k, α) set at initial point;
Clu1 = Set and GetCluId1 ( );
C1 = Set and GetInitial valueClu1 (for p, tp, Set1, k, cluID1);
Release Cluster1 (p, C1 , Core1, α,K);
Start clusterting;
D =D ∪ nk-distance (point) (point);
CoreSet1 = Coreset1 (object); Release clur1 (Set p, C1,Set1, int k, float α)
BEGIN
Seedset1 = CoreSet1;
while not SeedSet1.empty() DO
Pointp = GetOutPointp1 (SeedSet1);
CoreSet1(object1) = D
SeedSet1 = SeedSet1 ∪ (object};
CoreSet1 = Coreset1 ∪ (object);
terminating;
close each iteration;
D =D ∪ nk-distance (point) (point);
terminate loop;
end Expandclus1.
The TRCLS trajectory clustering algorithm contains the three different phases. These are trajectory planning (line 2), Line Segments Clustering (line 4) and Trajectory generations. These phases execute in sequentially with minimum trajectory movement i.e. the first part we calculate the partitioning and then second phase we execute the trajectory clustering. We comprehensive clarify these algorithms below.
Algorithm Prediction generation Trajectory MDL
Input: A prediction generation PGi = g1g2.···gn ···ppgini
Output: Prediction generate upto last Cp ={ C1,c2……..C ppgini }
Algorithm:
/* stating : Prediciton Generation */
01: Initialize the value CPi in srt P1,p2, ..;
02: set Indexvaluestr:= 1, maximumlength := MDLpar miminum= Pcurr+currIndex;
03: for (maxIndex start+ maximunvalue ≤ currentIndxggu); repeat unitl termination
04: maxcuurrvalue= pccgggstart + current start;
05: maxpar := CDMDL total par(maxcuur srart, max curr index);
06: minnopar := CDMDLtotalnopar (maxcuur sart, max curr index);
/*Find max and min patterned the separating existing argument that generation as CDMDL totalnonpa */
07: CDMDL total par= pccgggstart -1
/* Prediciton generation of previous point */
08: Average= pccgggstart -1;fing generation each;
09: pccgggstart := pcccurrIndexst−1, maxlength :=1;
10: recursive
11: total max := pccgggstart-1;
12: Assign the value plenii nto Cp /* the last */
Algorithm: DBSCAN Trajectory partitioning clustering
Input: (1) Create new cluster generation predication Pi
(2) Find MLins value for cluster generation
(3) Set prediction φ.
Output: Set demonstrative trajectory Ti prediction generation for maximum Pi.
Algorithm:
01: Find max value of direction vector field ;
02: Alternate the hatchets X axis is equivalent to;
03: Now set starting and ending value for cluster Pi;
/* coordinate of the c´ axis donation */
04: average value G with new generation p´-values;
05: if (T ∈ G) recursive
/* calculate all cluster predicitionp */
06: sum movp segments that contain the p´- value of the predication r;
07: if (movp ≥ pLincuus) then
08: rel in p´- values between t and its immediately previous point f;
09: put (max ≥ r) get
10: total max generation movavgCp;
11: give max and min value movp;
12: Append avgp to the end of RTRi;