Graph identifier - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Graph identifier (/thread-30080.html) |
Graph identifier - samuelbachorik - Oct-04-2020 Hello guys i have question about identification graph movements. Lets imagine movement like this in graph. As we can see we have some points that represents this movement. Please what algorithm can help me to identify same movement at lower numbers of graph. For example graph will be like this and algorithm will still know this is same movement. Do i need machine learning for this or is it possible to make some function for this ? Is it possible to define these movements generally ? Thank you a lot. RE: Graph identifier - Gribouillis - Oct-04-2020 What is the meaning of the numbers? RE: Graph identifier - samuelbachorik - Oct-04-2020 (Oct-04-2020, 08:24 AM)Gribouillis Wrote: What is the meaning of the numbers? For example it can be dollars. For example price of real estate in dollars. These values are still same right. But what if this will not be same numbers. ? RE: Graph identifier - hshivaraj - Oct-04-2020 This is jjst a brut force method with no complications. Let for instance assume that movements are stores in a list mov1 = [10000, 10120, 10080, 9990, 10050, 10210] The next step is to find the differences between each element diff_mov1 = [0, 120, -40, -90, 60, 160] Now do the same for the other movement mov2 = [5000, 5120, 5080, 4990, 5050, 5210] diff_mov2 = [0, 120, -40, -90, 60, 160] diff_mov1 == diff_mov2 RE: Graph identifier - scidam - Oct-04-2020 I would do the following: 1) build interpolated (e.g. bezier interpolation) curves; 2) subsample interpolated curves: from this we would have data1 = [(x1, y1), ..., (xN, yN)] and data2 = [(p1, q1), ..., (pN, qN)]; 3) Compute procrustes distance between data1 and data2. Procrustes distance is a distance between two shapes only (it doesn't account curve sizes and relative rotations). |