[R] pattern recognition with paths

David Winsemius dwinsemius at comcast.net
Wed Jan 5 23:51:32 CET 2011


On Jan 5, 2011, at 5:24 PM, Benjamin Polidore wrote:

> I'm trying to identify patterns among various "paths" like the  
> following:
>
> http://i.imgur.com/bQPI3.png
>
> If I plot these, I can observe intuitively two different patterns: a  
> front
> loaded (1 and 3) and a backloaded (2,4) progress path:
>
> http://i.imgur.com/L5qwZ.png
>
> I have thousands of observations like the above table, and I want to  
> use R
> to identify clusters of these paths.  I looked at spatstat, but it  
> seems
> more relevant to points than paths.

You need some sort of distance measure. Perhaps get signed maximum  
deviation from a diagonal progress = (1:13)/13,  Or you could classify  
by how wavy they were with max(dev.positive) - min(dev.negative)

Or for a two-D measure, you could divide the bin x Percentage space  
into boxes and see which ones get entered. progress1 and progress 2  
might enter mostly the digoanl boxes while progress 3 and 4 would be  
in the lower-right-hand corner. If you gave the boxes associated  
measures you could transform a trajectory back to the max(measure)  
paradigm.

Alas, as I think about the possibilities I am reminded that the set of  
possible functions on the interval [0, 1] is infinite. But perhaps  
some sort of functional data analysis approach can put the pieces of  
my dashed hopes back together. Come to think of it, there _is_  an fda  
package:

http://www.psych.mcgill.ca/misc/fda/

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list