title: Comparing Graphs (LineCharts)
body: <p>I am trying to compare a set of Graphs. <a href="https://i.stack.imgur.com/M85Jx.png" rel="nofollow noreferrer">Plot</a> I want to compare all the "thin" printed Graphs to to "thick"( -GoalGraphs) ones. </p>
  
  <p><strong>The Data</strong> 
  - All the Data is slightly different in lenght and amplitude (see below)</p>
  
  <blockquote>
    <p>Graph a: [315,92,60,46,36,33,29,28,26,24,23,22,20,21,19,19,18,17,18,17,16,17,16,16,17,16,16,17,16,17,16,17,15,17,16,17,16,17,17,16,16,16,16,17,17,16,17,16,16,16,15,16,17,17,16,16,17,16,17,16,17,16,16,17,16,16,16,16,17,16,17,16,17,18,16,18,18,18,18,19,19,20,20,23,30,40,56,69,62,59,55,59,66,78,79,75,84,77,72,73,79,83,86,586]</p>
    
    <p>Graph x: [302,88,56,45,38,34,30,28,25,25,22,22,20,20,18,19,17,18,17,16,17,16,16,16,16,16,16,15,16,17,16,16,17,16,16,17,16,16,16,16,17,16,17,17,16,17,17,17,17,17,18,17,18,19,19,19,20,23,27,37,49,69,64,61,56,55,60,71,79,75,78,87,73,75,78,79,81,590]</p>
  </blockquote>
  
  <p><strong>The Goal</strong> - I want to check if the shape of to "thinner" Graphs is the same as of the "thicker" Graphs. So even if the position of DataPoints do not match correctly i want the algorithm to recognise the Pattern.</p>
  
  <p><strong>Solutions</strong> </p>
  
  <ol>
  <li>I read about interpolating the thicker Graphs and comparing them to the others. I could find a Solution to Interpolate the Graph <a href="https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#id3" rel="nofollow noreferrer">scipy</a> but i couldn't found out how to campare it to other Graphs. I am also not sure if this would match a Graph where DataPoints are "missing" (e.q. The Grap is shorter then the Goal Graph)</li>
  <li><p>I tought about Maschin Lerning or Pattern Recognition and i tried to find some good stating Points but the field is huge. </p></li>
  <li><p>Mentioned by Yakov Dan i tried </p></li>
  </ol>
  
  <blockquote>
    <p>import numpy as np</p>
    
    <p>array_a = [315,92,60,46,36,33,29,28,26... ]</p>
    
    <p>array_b = [302,88,56,45,38,34,30,28,25... ]    </p>
    
    <p>print(np.correlate(array_a,array_b,'valid'),'valid')</p>
    
    <p>which results in [578559] valid</p>
  </blockquote>
  
  <p>Can you Explain what the Result is standing for?</p>
  
  <p><strong>The Question:</strong> - What is the best way to do this? Could someone give me a hint where to start, or how to solve this Problem?</p>