question:How to compare two chart ranges, and get percentage as a result.
I want to compare two chart parts, (range of 60 values), and as a result get percentage of difference. So i can find very similar chart curves. (Example:Get all charts that are 90% similar to this one)
For every range, data is stored in 60 number array. Every range starts with 0 and all next numbers represent chart value from that moment.("+" chart goes up and "-" chart goes down)
$range1 = array(0.00,-0.90,2.10,0.10,-3.40,-4.30,-1.90,-0.30,0.00,0.10,-0.60,-0.20,-0.30,-0.30,1.00,-0.90,-0.50,1.00,2.80,5.00,5.50,5.20,6.70,5.50,5.70,7.30,6.00,5.10,5.30,11.10,10.90,9.00,7.10,6.60,7.00,5.50,5.50,12.60,15.60,14.30,18.50,16.60,16.60,20.30,20.60,18.10,16.10,19.10,14.40,18.70,17.40,17.80,17.20,19.90,20.60,17.70,17.00,17.50,16.70,14.70);
$range2 = array(0.00,-2.90,-3.60,-3.10,-3.90,-5.90,-11.80,-8.40,-8.00,-8.40,-8.20,-7.00,-7.60,-7.30,-5.10,-7.20,-7.30,-7.40,-7.70,-8.90,-9.30,-9.30,-9.90,-7.50,-11.70,-12.20,-19.80,-19.60,-19.90,-19.00,-22.10,-19.10,-20.10,-18.90,-19.70,-19.90,-16.50,-23.70,-26.60,-24.20,-28.30,-27.00,-28.60,-28.90,-22.90,-24.00,-25.10,-24.30,-18.40,-31.70,-29.80,-29.00,-29.50,-28.30,-35.50,-27.60,-34.00,-32.80,-36.00,-34.40,);
$result = some_specific_manual_written_function($range1, $range2);
//as a result i want get percentage or something else from what i can how similar charts are
I will do it reading csv files and then storing it to db, so it can be done with php or python.