fhirschmann / rdp

Python/Numpy implementation of the Ramer-Douglas-Peucker algorithm
https://pypi.python.org/pypi/rdp
MIT License
244 stars 117 forks source link

Makes no difference in reducing the number of points #10

Open akkolwalkar opened 4 years ago

akkolwalkar commented 4 years ago

I have a dataframe which I want to reduce the number of points of every feature,

This is my dataframe

  recency frequency money
0 8.353111 1.625226 20.943134
1 2.934699 4.013015 26.170988
2 5.703040 4.013015 31.328091
3 4.958268 4.529335 42.014511
4 4.291614 5.502551 31.964992

Shape is 793,3 before rdp

After using RDP [ 8.35311112, 1.62522615, 20.94313392], [ 2.93469946, 4.01301524, 26.17098815], [ 5.70303988, 4.01301524, 31.32809134], ...,

Shape is 793,3 after rdp no change in output

Joshua-IRT commented 4 years ago

The simplify_coords function did not work for me (see #11 ) but I found simpify_coords_vw returned the same number of points as were passed to it, regardless of how much I varied the second parameter.