constraining sequence in SPSS

classic Classic list List threaded Threaded
16 messages Options
asm
Reply | Threaded
Open this post in threaded view
|

constraining sequence in SPSS

asm
Hi,

I am interested in frequent sequences with specific terminating value. For example, I am looking for 3-4 length sequence terminating with f (e.g. abcf, acdef). I cannot see any option to put constraints on sequence on interest in sequence node nugget. Wondering if it is possible in SPSS.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Art Kendall
Is this what you are looking for?

open a new instance of SPSS.  Paste the syntax below into a syntax window. Run it.

{thanks to David Marso for his help when my memory caused me to make a fundamnetal error in a draft version of this syntax.}

data list list /mystring (a100).
begin data
   anhhfbhtfvbknkngfhmknljgbhtufbkjnljb
   njnljhfhvnlbhgvhblbfgnbhfffgjfdlukn;kvctruyugcuhbkjc
   jhghfchbhjgctlhgfvvblkbugfcybhgfdjhbhjvcgycfbghgfc
   likljfknjhbhk nbhgvjhmbhgvnh gfvjghugfchjghvdgf
   hjhkhgtrcfjnjkyvgdkjhmbgfcdvhnbvygfchgbhgvtrjhfgf
end data.
compute LineNum=$casenum.
string seq3(a3) seq4(a4) WhichChar(a1).

LOOP position=3 TO 100.
   compute WhichChar = substr(mystring,position,1).
   compute IsAn_f= WhichChar eq 'f'.
   do if IsAn_f.
      compute seq3 = substr(mystring,position-2,3).
      do if position ge 4.
         compute seq4 =  substr(mystring,position-3,4).
      end if.
      xsave outfile='c:\project\snippets.sav'/keep= LineNum, position,seq3,seq4.
   end if.
end loop.
execute.

GET
  FILE='C:\project\snippets.sav'.
dataset name seqs.
dataset activate seqs.
list.
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Maguin, Eugene
In reply to this post by asm
Would you please give some specific examples of what you are talking about. Specifically, strings meeting whatever the criterion is and strings not meeting the criterion. Your terminology is extremely technical and therefore cryptic to anybody not in that little technology circle.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm
Sent: Wednesday, October 29, 2014 7:54 AM
To: [hidden email]
Subject: constraining sequence in SPSS

Hi,

I am interested in frequent sequences with specific terminating value. For example, I am looking for 3-4 length sequence terminating with f (e.g. abcf, acdef). I cannot see any option to put constraints on sequence on interest in sequence node nugget. Wondering if it is possible in SPSS.

Regards



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

David Marso
Administrator
In reply to this post by Art Kendall
This is somewhat more complicated but a bit more general.
It might be able to be simplified, but I'm not going to bother further with it.
-------------------------------------------------------------------------------------------
data list list /mystring (a100).
begin data
   anhhfbhtfvbknkngfhmknljgbhtufbkjnljb
   njnljhfhvnlbhgvhblbfgnbhfffgjfdlukn;kvctruyugcuhbkjc
   jhghfchbhjgctlhgfvvblkbugfcybhgfdjhbhjvcgycfbghgfc
   likljfknjhbhk nbhgvjhmbhgvnh gfvjghugfchjghvdgf
   hjhkhgtrcfjnjkyvgdkjhmbgfcdvhnbvygfchgbhgvtrjhfgf
end data.
STRING #ch (A1).
COMPUTE #ch="f".

COMPUTE LineNum=$casenum.
VECTOR seq (6,A8).
STRING WhichChar(a1).
STRING myCopy (A100).
COMPUTE myCopy=mystring.
COMPUTE cumpos=0.

LOOP.
/* Locate first instance of character */.
+  COMPUTE pos=CHAR.INDEX(myCopy,#ch).
+  COMPUTE cumpos=cumpos+pos.
+  COMPUTE #vecIndex=1.
+  LOOP ##=1 TO 6.
+    COMPUTE seq(##)="".
+  END LOOP.
/* Extract previous characters and store in vector */.
+  LOOP #=pos-1 TO MAX(1,pos-6) BY -1.
+    COMPUTE seq(#vecindex)=CHAR.SUBSTR(mycopy,#,pos-#+1).
/*   Get rid of collisions */.
+    COMPUTE #flag= pos GT 1 AND CHAR.INDEX(seq(#vecindex),#ch) EQ 1.
+    IF #flag seq(#vecindex)="".
+    COMPUTE #vecIndex=#vecIndex + 1.
+    XSAVE OUTFILE 'C:\TEMP\seq.sav' / KEEP Linenum seq1 TO seq6 cumpos.
+  END LOOP IF #flag.
/* Store remainder and parse on... */.
+  COMPUTE myCopy=CHAR.SUBSTR(myCopy,pos+1).
END LOOP IF pos=0.
EXECUTE.
GET FILE 'C:\TEMP\seq.sav' .
AGGREGATE OUTFILE * / BREAK linenum cumpos /seq1 TO seq6 = LAST(seq1 TO seq6 ).

1.00 5.00 hf hhf nhhf anhhf
1.00 9.00 tf htf bhtf
1.00 17.00 gf ngf kngf nkngf knkngf bknkngf
1.00 29.00 uf tuf htuf bhtuf gbhtuf jgbhtuf
2.00 7.00 hf jhf ljhf nljhf jnljhf njnljhf
2.00 20.00 bf lbf blbf hblbf vhblbf gvhblbf
2.00 25.00 hf bhf nbhf gnbhf
2.00 30.00 jf gjf
3.00 5.00 hf ghf hghf jhghf
3.00 17.00 gf hgf lhgf tlhgf ctlhgf gctlhgf
3.00 26.00 gf ugf bugf kbugf lkbugf blkbugf
3.00 32.00 gf hgf bhgf ybhgf cybhgf
3.00 44.00 cf ycf gycf cgycf vcgycf jvcgycf
3.00 49.00 gf hgf ghgf bghgf
4.00 6.00 jf ljf kljf ikljf likljf
5.00 10.00 cf rcf trcf gtrcf hgtrcf khgtrcf
5.00 25.00 gf bgf mbgf hmbgf jhmbgf kjhmbgf
5.00 35.00 gf ygf vygf bvygf nbvygf hnbvygf
5.00 47.00 hf jhf rjhf trjhf vtrjhf gvtrjhf
5.00 49.00 gf


Art Kendall wrote
Is this what you are looking for?

open a new instance of SPSS.  Paste the syntax below into a syntax window. Run it.

{thanks to David Marso for his help when my memory caused me to make a fundamnetal error in a draft version of this syntax.}

data list list /mystring (a100).
begin data
   anhhfbhtfvbknkngfhmknljgbhtufbkjnljb
   njnljhfhvnlbhgvhblbfgnbhfffgjfdlukn;kvctruyugcuhbkjc
   jhghfchbhjgctlhgfvvblkbugfcybhgfdjhbhjvcgycfbghgfc
   likljfknjhbhk nbhgvjhmbhgvnh gfvjghugfchjghvdgf
   hjhkhgtrcfjnjkyvgdkjhmbgfcdvhnbvygfchgbhgvtrjhfgf
end data.
compute LineNum=$casenum.
string seq3(a3) seq4(a4) WhichChar(a1).

LOOP position=3 TO 100.
   compute WhichChar = substr(mystring,position,1).
   compute IsAn_f= WhichChar eq 'f'.
   do if IsAn_f.
      compute seq3 = substr(mystring,position-2,3).
      do if position ge 4.
         compute seq4 =  substr(mystring,position-3,4).
      end if.
      xsave outfile='c:\project\snippets.sav'/keep= LineNum, position,seq3,seq4.
   end if.
end loop.
execute.

GET
  FILE='C:\project\snippets.sav'.
dataset name seqs.
dataset activate seqs.
list.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Jon K Peck
In reply to this post by Maguin, Eugene
Here is a simple Python-based solution.

data list list/x(a10).
begin data
abcdef
abcd
abcdefg
end data.
dataset name f.

begin program.
def endchar(x, ch):
  return x.rstrip().endswith(ch)
end program.
spssinc trans result=endswithf /formula "endchar(x, 'f')".


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        "Maguin, Eugene" <[hidden email]>
To:        [hidden email]
Date:        10/29/2014 11:23 AM
Subject:        Re: [SPSSX-L] constraining sequence in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Would you please give some specific examples of what you are talking about. Specifically, strings meeting whatever the criterion is and strings not meeting the criterion. Your terminology is extremely technical and therefore cryptic to anybody not in that little technology circle.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [
[hidden email]] On Behalf Of asm
Sent: Wednesday, October 29, 2014 7:54 AM
To: [hidden email]
Subject: constraining sequence in SPSS

Hi,

I am interested in frequent sequences with specific terminating value. For example, I am looking for 3-4 length sequence terminating with f (e.g. abcf, acdef). I cannot see any option to put constraints on sequence on interest in sequence node nugget. Wondering if it is possible in SPSS.

Regards



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

David Marso
Administrator
Here is an SPSS one liner which does what Jon's python function does.
COMPUTE endwithf=CHAR.RINDEX(x,'f') EQ CHAR.LENGTH(x).

Jon,
Art and I responded to the question we inferred from using our eSPSS !
Within an arbitrary string, parse out all subsequences ending with an 'f' and for each of these enumerate the immediately prior sequences of length 2:k.

Jon K Peck wrote
Here is a simple Python-based solution.

data list list/x(a10).
begin data
abcdef
abcd
abcdefg
end data.
dataset name f.

begin program.
def endchar(x, ch):
  return x.rstrip().endswith(ch)
end program.
spssinc trans result=endswithf /formula "endchar(x, 'f')".


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:   "Maguin, Eugene" <[hidden email]>
To:     [hidden email]
Date:   10/29/2014 11:23 AM
Subject:        Re: [SPSSX-L] constraining sequence in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Would you please give some specific examples of what you are talking
about. Specifically, strings meeting whatever the criterion is and strings
not meeting the criterion. Your terminology is extremely technical and
therefore cryptic to anybody not in that little technology circle.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
asm
Sent: Wednesday, October 29, 2014 7:54 AM
To: [hidden email]
Subject: constraining sequence in SPSS

Hi,

I am interested in frequent sequences with specific terminating value. For
example, I am looking for 3-4 length sequence terminating with f (e.g.
abcf, acdef). I cannot see any option to put constraints on sequence on
interest in sequence node nugget. Wondering if it is possible in SPSS.

Regards



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
asm
Reply | Threaded
Open this post in threaded view
|

RE: constraining sequence in SPSS

asm
In reply to this post by Maguin, Eugene
Sorry, about the confusion.

I am interested in mining frequent sequences. But not interested in all such frequent sequences.  I  require only those sequences which has the last character as "f" (say). 

If I use "sequence" node, it searches for all frequent sequences. I would like to limit the search to sequences ending with "f".

My question was about whether there is a possibility to do this using the "sequence"  node.

Regards




Would you please give some specific examples of what you are talking about. Specifically, strings meeting whatever the criterion is and strings not meeting the criterion. Your terminology is extremely technical and therefore cryptic to anybody not in that little technology circle.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm
Sent: Wednesday, October 29, 2014 7:54 AM
To: [hidden email]
Subject: constraining sequence in SPSS

Hi,

I am interested in frequent sequences with specific terminating value. For example, I am looking for 3-4 length sequence terminating with f (e.g. abcf, acdef). I cannot see any option to put constraints on sequence on interest in sequence node nugget. Wondering if it is possible in SPSS.

Regards



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html
To unsubscribe from constraining sequence in SPSS, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: constraining sequence in SPSS

David Marso
Administrator
Maybe you should be CLEAR about what software you are using!
There are no nodes in SPSS!
We have shown you how to parse in SPSS.
Surely there is something you can do with that!
--
asm wrote
Sorry, about the confusion.

I am interested in mining frequent sequences. But not interested in all such frequent sequences.  I  require only those sequences which has the last character as "f" (say).  

If I use "sequence" node, it searches for all frequent sequences. I would like to limit the search to sequences ending with "f".

My question was about whether there is a possibility to do this using the "sequence"  node.

Regards







        Would you please give some specific examples of what you are talking about. Specifically, strings meeting whatever the criterion is and strings not meeting the criterion. Your terminology is extremely technical and therefore cryptic to anybody not in that little technology circle.

Gene Maguin


-----Original Message-----

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm

Sent: Wednesday, October 29, 2014 7:54 AM

To: [hidden email]

Subject: constraining sequence in SPSS


Hi,


I am interested in frequent sequences with specific terminating value. For example, I am looking for 3-4 length sequence terminating with f (e.g. abcf, acdef). I cannot see any option to put constraints on sequence on interest in sequence node nugget. Wondering if it is possible in SPSS.


Regards




--

View this message in context: http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.


=====================

To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


=====================

To manage your subscription to SPSSX-L, send a message to

[hidden email] (not to SPSSX-L), with no body text except the

command. To leave the list, send the command

SIGNOFF SPSSX-L

For a list of commands to manage subscriptions, send the command

INFO REFCARD



       
       
       
       

       

       
       
                If you reply to this email, your message will be added to the discussion below:
                http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html
       
       
               
                To unsubscribe from constraining sequence in SPSS, click here.

                NAML
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Mark Webb-5
Look at Library(arules) [Association Analysis] in R - you can this there.
Mark Webb

Line +27 (21) 786 4379
Cell +27 (72) 199 1000 [Poor reception]
Fax  +27 (86) 260 1946 

Skype       tomarkwebb 
Email       [hidden email] 
On 2014/10/30 12:27 PM, David Marso wrote:
Maybe you should be CLEAR about what software you are using!
There are no nodes in SPSS!
We have shown you how to parse in SPSS. 
Surely there is something you can do with that!
--

asm wrote
Sorry, about the confusion.

I am interested in mining frequent sequences. But not interested in all
such frequent sequences.  I  require only those sequences which has the
last character as "f" (say).  

If I use "sequence" node, it searches for all frequent sequences. I would
like to limit the search to sequences ending with "f". 

My question was about whether there is a possibility to do this using the
"sequence"  node.

Regards







	Would you please give some specific examples of what you are talking
about. Specifically, strings meeting whatever the criterion is and strings
not meeting the criterion. Your terminology is extremely technical and
therefore cryptic to anybody not in that little technology circle. 

Gene Maguin


-----Original Message-----

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm

Sent: Wednesday, October 29, 2014 7:54 AM

To: [hidden email]

Subject: constraining sequence in SPSS


Hi,


I am interested in frequent sequences with specific terminating value. For
example, I am looking for 3-4 length sequence terminating with f (e.g.
abcf, acdef). I cannot see any option to put constraints on sequence on
interest in sequence node nugget. Wondering if it is possible in SPSS.


Regards




--

View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.


=====================

To manage your subscription to SPSSX-L, send a message to [hidden email]
(not to SPSSX-L), with no body text except the command. To leave the list,
send the command SIGNOFF SPSSX-L For a list of commands to manage
subscriptions, send the command INFO REFCARD


=====================

To manage your subscription to SPSSX-L, send a message to

[hidden email] (not to SPSSX-L), with no body text except the

command. To leave the list, send the command

SIGNOFF SPSSX-L

For a list of commands to manage subscriptions, send the command

INFO REFCARD



	
	
	
	

	

	
	
		If you reply to this email, your message will be added to the discussion
below:
	
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html
	
	
		
		To unsubscribe from constraining sequence in SPSS, click here.

		NAML




-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727738.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Art Kendall
In reply to this post by asm
Jon posted a response to one interpretation of your post.

David and I posted solutions to another reading of your post.

Did either of these solutions answer your question?

If not, please post a small example of what the input might look like and what the output would be.

I had in mind something like DNA sequencing but nucleotides are coded G,A, T, C bu they are customarily in caps and there is no "f". RNa use G,U, A C.  
The other example I could think of was various forms of encryption where 'f' would be some sort of marker.

Perhaps something about the context, e.g., sequences of what, would help others help you.
Art Kendall
Social Research Consultants
asm
Reply | Threaded
Open this post in threaded view
|

RE: constraining sequence in SPSS

asm
Thanks for your reply.  You can think of "f" as failure/breakdown for machine, and hence I am trying to find pattern leading to breakdown of machines.

I was asking about where "sequence" node (read nugget under modelling pallete) can be programmed for such constraint.

I checked arulesSequences in R too. Does not seem that it has a provision to specify such constraints.

Regards



Subject: Re: constraining sequence in SPSS

Jon posted a response to one interpretation of your post.

David and I posted solutions to another reading of your post.

Did either of these solutions answer your question?

If not, please post a small example of what the input might look like and what the output would be.

I had in mind something like DNA sequencing but nucleotides are coded G,A, T, C bu they are customarily in caps and there is no "f". RNa use G,U, A C.  
The other example I could think of was various forms of encryption where 'f' would be some sort of marker.

Perhaps something about the context, e.g., sequences of what, would help others help you.
Art Kendall
Social Research Consultants



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727740.html
To unsubscribe from constraining sequence in SPSS, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Anton Balabanov-2
In reply to this post by David Marso
In fact, asm's question was, probably, about SPSS Modeler - another IBM SPSS product, which does have Sequence node for detecting patterns in sequences of events. I wish I could help, but don't have ready access to Modeler.
 
Best regards,
Anton Balabanov
 
30.10.2014, 13:32, "David Marso" <[hidden email]>:

Maybe you should be CLEAR about what software you are using!
There are no nodes in SPSS!
We have shown you how to parse in SPSS.
Surely there is something you can do with that!
--

asm wrote

 Sorry, about the confusion.

 I am interested in mining frequent sequences. But not interested in all
 such frequent sequences.  I  require only those sequences which has the
 last character as "f" (say).  

 If I use "sequence" node, it searches for all frequent sequences. I would
 like to limit the search to sequences ending with "f".

 My question was about whether there is a possibility to do this using the
 "sequence"  node.

 Regards







         Would you please give some specific examples of what you are talking
 about. Specifically, strings meeting whatever the criterion is and strings
 not meeting the criterion. Your terminology is extremely technical and
 therefore cryptic to anybody not in that little technology circle.

 Gene Maguin


 -----Original Message-----

 From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm

 Sent: Wednesday, October 29, 2014 7:54 AM

 To: [hidden email]

 Subject: constraining sequence in SPSS


 Hi,


 I am interested in frequent sequences with specific terminating value. For
 example, I am looking for 3-4 length sequence terminating with f (e.g.
 abcf, acdef). I cannot see any option to put constraints on sequence on
 interest in sequence node nugget. Wondering if it is possible in SPSS.


 Regards




 --

 View this message in context:
 http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
 Sent from the SPSSX Discussion mailing list archive at Nabble.com.


 =====================

 To manage your subscription to SPSSX-L, send a message to [hidden email]
 (not to SPSSX-L), with no body text except the command. To leave the list,
 send the command SIGNOFF SPSSX-L For a list of commands to manage
 subscriptions, send the command INFO REFCARD


 =====================

 To manage your subscription to SPSSX-L, send a message to

 [hidden email] (not to SPSSX-L), with no body text except the

 command. To leave the list, send the command

 SIGNOFF SPSSX-L

 For a list of commands to manage subscriptions, send the command

 INFO REFCARD












                 If you reply to this email, your message will be added to the discussion
 below:

 http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html



                 To unsubscribe from constraining sequence in SPSS, click here.

                 NAML

-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727738.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

RE: constraining sequence in SPSS

Art Kendall
In reply to this post by asm
did the solutions in either set of syntax work for you?
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Jon K Peck
In reply to this post by David Marso
This question was about SPSS Modeler not SPSS Statistics.  The solution there would be to use a Select node containing the function hasendstring or isendstring to choose the cases.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        David Marso <[hidden email]>
To:        [hidden email]
Date:        10/30/2014 04:32 AM
Subject:        Re: [SPSSX-L] constraining sequence in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Maybe you should be CLEAR about what software you are using!
There are no nodes in SPSS!
We have shown you how to parse in SPSS.
Surely there is something you can do with that!
--

asm wrote
> Sorry, about the confusion.
>
> I am interested in mining frequent sequences. But not interested in all
> such frequent sequences.  I  require only those sequences which has the
> last character as "f" (say).  
>
> If I use "sequence" node, it searches for all frequent sequences. I would
> like to limit the search to sequences ending with "f".
>
> My question was about whether there is a possibility to do this using the
> "sequence"  node.
>
> Regards
>
>
>
>
>
>
>
>                  Would you please give some specific examples of what you are talking
> about. Specifically, strings meeting whatever the criterion is and strings
> not meeting the criterion. Your terminology is extremely technical and
> therefore cryptic to anybody not in that little technology circle.
>
> Gene Maguin
>
>
> -----Original Message-----
>
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm
>
> Sent: Wednesday, October 29, 2014 7:54 AM
>
> To: [hidden email]
>
> Subject: constraining sequence in SPSS
>
>
> Hi,
>
>
> I am interested in frequent sequences with specific terminating value. For
> example, I am looking for 3-4 length sequence terminating with f (e.g.
> abcf, acdef). I cannot see any option to put constraints on sequence on
> interest in sequence node nugget. Wondering if it is possible in SPSS.
>
>
> Regards
>
>
>
>
> --
>
> View this message in context:
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
>
> =====================
>
> To manage your subscription to SPSSX-L, send a message to [hidden email]
> (not to SPSSX-L), with no body text except the command. To leave the list,
> send the command SIGNOFF SPSSX-L For a list of commands to manage
> subscriptions, send the command INFO REFCARD
>
>
> =====================
>
> To manage your subscription to SPSSX-L, send a message to
>
> [hidden email] (not to SPSSX-L), with no body text except the
>
> command. To leave the list, send the command
>
> SIGNOFF SPSSX-L
>
> For a list of commands to manage subscriptions, send the command
>
> INFO REFCARD
>
>
>
>                  
>                  
>                  
>                  
>
>                  
>
>                  
>                  
>                                   If you reply to this email, your message will be added to the discussion
> below:
>                  
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html
>                  
>                  
>                                  
>                                   To unsubscribe from constraining sequence in SPSS, click here.
>
>                                   NAML





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727738.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

David Marso
Administrator
Oh really?
Hardly!
Since when is straight old SPSS syntax code verboten?
Have you developed some sort of allergy?
--
Jon K Peck wrote
This question was about SPSS Modeler not SPSS Statistics.  The solution
there would be to use a Select node containing the function hasendstring
or isendstring to choose the cases.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:   David Marso <[hidden email]>
To:     [hidden email]
Date:   10/30/2014 04:32 AM
Subject:        Re: [SPSSX-L] constraining sequence in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Maybe you should be CLEAR about what software you are using!
There are no nodes in SPSS!
We have shown you how to parse in SPSS.
Surely there is something you can do with that!
--

asm wrote
> Sorry, about the confusion.
>
> I am interested in mining frequent sequences. But not interested in all
> such frequent sequences.  I  require only those sequences which has the
> last character as "f" (say).
>
> If I use "sequence" node, it searches for all frequent sequences. I
would
> like to limit the search to sequences ending with "f".
>
> My question was about whether there is a possibility to do this using
the
> "sequence"  node.
>
> Regards
>
>
>
>
>
>
>
>                Would you please give some specific examples of what you
are talking
> about. Specifically, strings meeting whatever the criterion is and
strings
> not meeting the criterion. Your terminology is extremely technical and
> therefore cryptic to anybody not in that little technology circle.
>
> Gene Maguin
>
>
> -----Original Message-----
>
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm
>
> Sent: Wednesday, October 29, 2014 7:54 AM
>
> To: [hidden email]
>
> Subject: constraining sequence in SPSS
>
>
> Hi,
>
>
> I am interested in frequent sequences with specific terminating value.
For
> example, I am looking for 3-4 length sequence terminating with f (e.g.
> abcf, acdef). I cannot see any option to put constraints on sequence on
> interest in sequence node nugget. Wondering if it is possible in SPSS.
>
>
> Regards
>
>
>
>
> --
>
> View this message in context:
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html

> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
>
> =====================
>
> To manage your subscription to SPSSX-L, send a message to [hidden email]
> (not to SPSSX-L), with no body text except the command. To leave the
list,
> send the command SIGNOFF SPSSX-L For a list of commands to manage
> subscriptions, send the command INFO REFCARD
>
>
> =====================
>
> To manage your subscription to SPSSX-L, send a message to
>
> [hidden email] (not to SPSSX-L), with no body text except the
>
> command. To leave the list, send the command
>
> SIGNOFF SPSSX-L
>
> For a list of commands to manage subscriptions, send the command
>
> INFO REFCARD
>
>
>
>
>
>
>
>
>
>
>
>
>                                If you reply to this email, your message
will be added to the discussion
> below:
>
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html

>
>
>
>                                To unsubscribe from constraining sequence
in SPSS, click here.
>
>                                NAML





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to
email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos
ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in
abyssum?"
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727738.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: constraining sequence in SPSS

Jon K Peck
Well, if you are using the SPSS Modeler product, you have to use Modeler code.  Really.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        David Marso <[hidden email]>
To:        [hidden email]
Date:        10/30/2014 08:55 AM
Subject:        Re: [SPSSX-L] constraining sequence in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Oh really?
Hardly!
Since when is straight old SPSS syntax code verboten?
Have you developed some sort of allergy?
--

Jon K Peck wrote
> This question was about SPSS Modeler not SPSS Statistics.  The solution
> there would be to use a Select node containing the function hasendstring
> or isendstring to choose the cases.
>
>
> Jon Peck (no "h") aka Kim
> Senior Software Engineer, IBM

> peck@.ibm

> phone: 720-342-5621
>
>
>
>
> From:   David Marso &lt;

> david.marso@

> &gt;
> To:    

> SPSSX-L@.UGA

> Date:   10/30/2014 04:32 AM
> Subject:        Re: [SPSSX-L] constraining sequence in SPSS
> Sent by:        "SPSSX(r) Discussion" &lt;

> SPSSX-L@.UGA

> &gt;
>
>
>
> Maybe you should be CLEAR about what software you are using!
> There are no nodes in SPSS!
> We have shown you how to parse in SPSS.
> Surely there is something you can do with that!
> --
>
> asm wrote
>> Sorry, about the confusion.
>>
>> I am interested in mining frequent sequences. But not interested in all
>> such frequent sequences.  I  require only those sequences which has the
>> last character as "f" (say).
>>
>> If I use "sequence" node, it searches for all frequent sequences. I
> would
>> like to limit the search to sequences ending with "f".
>>
>> My question was about whether there is a possibility to do this using
> the
>> "sequence"  node.
>>
>> Regards
>>
>>
>>
>>
>>
>>
>>
>>                Would you please give some specific examples of what you
> are talking
>> about. Specifically, strings meeting whatever the criterion is and
> strings
>> not meeting the criterion. Your terminology is extremely technical and
>> therefore cryptic to anybody not in that little technology circle.
>>
>> Gene Maguin
>>
>>
>> -----Original Message-----
>>
>> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of asm
>>
>> Sent: Wednesday, October 29, 2014 7:54 AM
>>
>> To: [hidden email]
>>
>> Subject: constraining sequence in SPSS
>>
>>
>> Hi,
>>
>>
>> I am interested in frequent sequences with specific terminating value.
> For
>> example, I am looking for 3-4 length sequence terminating with f (e.g.
>> abcf, acdef). I cannot see any option to put constraints on sequence on
>> interest in sequence node nugget. Wondering if it is possible in SPSS.
>>
>>
>> Regards
>>
>>
>>
>>
>> --
>>
>> View this message in context:
>>
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715.html
>
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>>
>> =====================
>>
>> To manage your subscription to SPSSX-L, send a message to [hidden email]
>> (not to SPSSX-L), with no body text except the command. To leave the
> list,
>> send the command SIGNOFF SPSSX-L For a list of commands to manage
>> subscriptions, send the command INFO REFCARD
>>
>>
>> =====================
>>
>> To manage your subscription to SPSSX-L, send a message to
>>
>> [hidden email] (not to SPSSX-L), with no body text except the
>>
>> command. To leave the list, send the command
>>
>> SIGNOFF SPSSX-L
>>
>> For a list of commands to manage subscriptions, send the command
>>
>> INFO REFCARD
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>                                If you reply to this email, your message
> will be added to the discussion
>> below:
>>
>>
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727727.html
>
>>
>>
>>
>>                                To unsubscribe from constraining sequence
> in SPSS, click here.
>>
>>                                NAML
>
>
>
>
>
> -----
> Please reply to the list and not to my personal email.
> Those desiring my consulting or training services please feel free to
> email me.
> ---
> "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos
> ne forte conculcent eas pedibus suis."
> Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in
> abyssum?"
> --
> View this message in context:
>
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727738.html
>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/constraining-sequence-in-SPSS-tp5727715p5727747.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD