[Traminer-users] Re : Re: longest common substring

Hadrien Commenges hc at parisgeo.cnrs.fr
Mon Mar 19 16:30:27 CET 2012


Thank you Chris. I checked the TraMineR Extras package, but there is no function to compute the longest common substring. I don't know if the developers could give me an easy way to modify the seqdist function in order to compute longest common substring. If not, I'm very interested in the ideas you mentioned to do that, although I'm not a good programmer and I don't know anything about C.
Thanks,
Hadrien



----- Mail d'origine -----
De: Chris Cameron <cjc73 at cornell.edu>
À: Users questions <traminer-users at r-forge.wu-wien.ac.at>
Envoyé: Sun, 18 Mar 2012 18:48:56 +0100 (CET)
Objet: Re: [Traminer-users] longest common substring

Hi Hadrien - 
I don't see a documented way to compute the greatest common substrings, so a custom function is probably necessary. (Maybe a dev can tell you if there is a hidden flag to indicate substring vs subsequence. The LCS code is implemented in C, so there is not an easy function to modify in the TraMineR package. I have some ideas about how you can make a custom function to do this if you want to talk about it. Before you go that route, it would be worth checking the "TraMineR Extras" package Matthias mentioned on the 16th. 
Good LuckChris



On Mar 17, 2012, at 3:02 PM, Hadrien Commenges wrote:
Hi,

I've a new question. I'd like to get a dissimilarity matrix based on the longest common substring. The longest prefix (computed with seqdist, method=LCS) doesn't work for me because I'd like to compare substrings anywhere in the sequence. And the notion of subsequence (computed with seqdist, method=LCS) doesn't serve my purpose neither. I'd like to compute something like the LCS method but with the stricter notion of substring. Is it possible?

Thanks,

Hadrien
_______________________________________________
Traminer-users mailing list
Traminer-users at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120319/cb66bb8a/attachment.html>


More information about the Traminer-users mailing list