<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Hadrien,<br>
<br>
Actually, there is no function to compute the longest common
substring in TraMineR and, unfortunately, there is no easy way to
modify the seqdist function (which relies on C code for performance
reason). A custom function is thus needed. If you find a solution,
please post it to this list, as it may interest other (or future)
users. <br>
<br>
All the best,<br>
Matthias<br>
<br>
<br>
Le 19.03.2012 16:30, Hadrien Commenges a écrit :
<blockquote cite="mid:3bd6c548-c63b-4c3b-8be2-f512803bc6a6@clara"
type="cite">
<style> body {height: 100%; color:#000000; font-size:12pt; font-family:Arial, Helvetica, sans-serif;}</style>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.<br>
Thanks,<br>
Hadrien<br>
<br>
<br>
<br>
----- Mail d'origine -----<br>
De: Chris Cameron <a class="moz-txt-link-rfc2396E" href="mailto:cjc73@cornell.edu"><cjc73@cornell.edu></a><br>
À: Users questions <a class="moz-txt-link-rfc2396E" href="mailto:traminer-users@r-forge.wu-wien.ac.at"><traminer-users@r-forge.wu-wien.ac.at></a><br>
Envoyé: Sun, 18 Mar 2012 18:48:56 +0100 (CET)<br>
Objet: Re: [Traminer-users] longest common substring<br>
<br>
<div>Hi Hadrien - </div>
<br>
<div>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. </div>
<br>
<div>Good Luck</div>
<div>Chris</div>
<br>
<br>
<br>
<br>
<div>
<div>On Mar 17, 2012, at 3:02 PM, Hadrien Commenges wrote:</div>
<br>
<blockquote><span class="Apple-style-span"
style="border-collapse: separate; font-family: Helvetica;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; ">
<div>
<div style="font-family: Arial, Helvetica, sans-serif;
font-size: 12pt; color: #000000; ">Hi,<br>
<br>
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?<br>
<br>
Thanks,<br>
<br>
Hadrien<br>
</div>
_______________________________________________<br>
Traminer-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Traminer-users@lists.r-forge.r-project.org"
target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br>
<a moz-do-not-send="true"
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users"
target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a></div>
</span></blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Traminer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a>
</pre>
</blockquote>
<br>
</body>
</html>