raghuprasad241 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to find modules for some advanced data mining projects in perl. In python they have iterator module with functions like pairwise etc. that does the task for me. However I need to do this perl. So trying to avoid reinventing the wheel. I am going to describe a sample problem so that it will give you an idea for any recommendations you may provide. I have a data set like below...
Now I need to find 5 consecutive records either increasing or decreasing by value next to date field. For e.g. I need the following 2 result sets in my output.10/01/2016 99.71 10/02/2016 99.53 10/03/2016 100.10 10/04/2016 100.96 10/05/2016 100.99 10/06/2016 101.38 10/07/2016 100.74 10/08/2016 100.70 10/09/2016 99.88 10/10/2016 97.62 10/11/2016 97.55 10/12/2016 99.12
Please note that I am looking for exactly 5 consecutive records with either increasing or decreasing patterns, any other number of consecutive records with those patterns should not qualify.10/02/2016 99.53 10/03/2016 100.10 10/04/2016 100.96 10/05/2016 100.99 10/06/2016 101.38 10/07/2016 100.74 10/08/2016 100.70 10/09/2016 99.88 10/10/2016 97.62 10/11/2016 97.55
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recommendations for perl modules to work on data sets ?
by choroba (Cardinal) on Oct 21, 2016 at 15:13 UTC | |
|
Re: Recommendations for perl modules to work on data sets ?
by talexb (Chancellor) on Oct 21, 2016 at 15:15 UTC | |
|
Re: Recommendations for perl modules to work on data sets ?
by tybalt89 (Monsignor) on Oct 21, 2016 at 18:41 UTC | |
by raghuprasad241 (Beadle) on Oct 21, 2016 at 20:22 UTC | |
by Laurent_R (Canon) on Oct 21, 2016 at 21:17 UTC | |
by tybalt89 (Monsignor) on Oct 21, 2016 at 20:25 UTC | |
|
Re: Recommendations for perl modules to work on data sets ?
by raghuprasad241 (Beadle) on Oct 21, 2016 at 16:22 UTC | |
by Discipulus (Canon) on Oct 21, 2016 at 17:07 UTC |