Results of DMX queries in MovieClick association rules model<p>Hi,<br/><br/>I'm trying to practice DMX on association rules. I have deceloped the MovieAssociation model on MovieClick database as per &quot;data mining with SQL Server 2008&quot; book. I tried the DMX provided by the book as well as the DMX simillar to what has been recommended in a posting here. I get no errors but I get odd results for any of the queries below. It sounds like it's giving just the 5 top purchased movie regardless of what I query. Am I missing something here?<br/><br/>Thanks<br/><br/><br/><br/><br/>// (here Outcome recommendation is same for all customers)</p> <p>SELECT T.CustomerID, Predict(Movies, 5) AS Recommendation<br/>FROM MovieAssociation<br/>NATURAL PREDICTION JOIN<br/>  OPENQUERY([Chapter 11],<br/>  'SELECT CustomerID, Gender, [Marital Status] FROM Customers') AS T <br/><br/><br/>//Result: (for all customrt IDs)<br/><br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The<br/>//A beautiful mind<br/>//Star Wars Episode V: Empire Strikes Back</p> <p> </p> <p>//(here I get same result below for queries regardless of gender type I mention)</p> <p><br/><br/>SELECT Predict(Movies, 5) FROM MovieAssociation PREDICTION JOIN</p> <p>( SELECT 'Female' AS gender) AS T</p> <p>ON MovieAssociation.gender = T.gender</p> <p>//Result: (for both male or female options)<br/><br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The<br/>//A beautiful mind<br/>//Star Wars Episode V: Empire Strikes Back</p> <p><br/><br/><br/>SELECT Predict(Movies, 5) FROM MovieAssociation</p> <p>PREDICTION JOIN</p> <p>(select 'male' as gender, (SELECT 'star wars' AS movie union select  'big' AS Movie) as Movies)  as T</p> <p>ON MovieAssociation.gender = T.gender</p> <p>and MovieAssociation.Movies.Movie= T.Movies.movie<br/></p> <p>//Result: (for both male or female options)<br/><br/>//Star Wars Episode V: Empire Strikes Back<br/>//Star Wars Episode VI: Return of the Jedi<br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The</p>© 2009 Microsoft Corporation. All rights reserved.Mon, 29 Jun 2009 15:35:56 Zfb741b38-4b01-4b4a-9f93-153d4d620962http://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/fb741b38-4b01-4b4a-9f93-153d4d620962#fb741b38-4b01-4b4a-9f93-153d4d620962http://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/fb741b38-4b01-4b4a-9f93-153d4d620962#fb741b38-4b01-4b4a-9f93-153d4d620962Jeff06http://social.msdn.microsoft.com/Profile/en-US/?user=Jeff06Results of DMX queries in MovieClick association rules model<p>Hi,<br/><br/>I'm trying to practice DMX on association rules. I have deceloped the MovieAssociation model on MovieClick database as per &quot;data mining with SQL Server 2008&quot; book. I tried the DMX provided by the book as well as the DMX simillar to what has been recommended in a posting here. I get no errors but I get odd results for any of the queries below. It sounds like it's giving just the 5 top purchased movie regardless of what I query. Am I missing something here?<br/><br/>Thanks<br/><br/><br/><br/><br/>// (here Outcome recommendation is same for all customers)</p> <p>SELECT T.CustomerID, Predict(Movies, 5) AS Recommendation<br/>FROM MovieAssociation<br/>NATURAL PREDICTION JOIN<br/>  OPENQUERY([Chapter 11],<br/>  'SELECT CustomerID, Gender, [Marital Status] FROM Customers') AS T <br/><br/><br/>//Result: (for all customrt IDs)<br/><br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The<br/>//A beautiful mind<br/>//Star Wars Episode V: Empire Strikes Back</p> <p> </p> <p>//(here I get same result below for queries regardless of gender type I mention)</p> <p><br/><br/>SELECT Predict(Movies, 5) FROM MovieAssociation PREDICTION JOIN</p> <p>( SELECT 'Female' AS gender) AS T</p> <p>ON MovieAssociation.gender = T.gender</p> <p>//Result: (for both male or female options)<br/><br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The<br/>//A beautiful mind<br/>//Star Wars Episode V: Empire Strikes Back</p> <p><br/><br/><br/>SELECT Predict(Movies, 5) FROM MovieAssociation</p> <p>PREDICTION JOIN</p> <p>(select 'male' as gender, (SELECT 'star wars' AS movie union select  'big' AS Movie) as Movies)  as T</p> <p>ON MovieAssociation.gender = T.gender</p> <p>and MovieAssociation.Movies.Movie= T.Movies.movie<br/></p> <p>//Result: (for both male or female options)<br/><br/>//Star Wars Episode V: Empire Strikes Back<br/>//Star Wars Episode VI: Return of the Jedi<br/>//Star wars<br/>//Matrix, The<br/>//Lord of the Rings: The Fellowship of the Ring, The</p>Mon, 15 Jun 2009 21:18:56 Z2009-06-15T21:18:56Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/fb741b38-4b01-4b4a-9f93-153d4d620962#144383bf-e1de-4eb9-9565-54109914d1a4http://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/fb741b38-4b01-4b4a-9f93-153d4d620962#144383bf-e1de-4eb9-9565-54109914d1a4Allan Mitchellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Allan%20MitchellResults of DMX queries in MovieClick association rules modelHi Jeff <div><br/></div> <div>What results do you get for </div> <div><br/></div> <div> <pre lang=x-sql>SELECT Predict(Movies, 5) FROM MovieAssociation</pre> <br/></div> <div>I am going to guess the exact same as you have currently.  The above query should give you most probable 5 movies selected in the model</div> <div><br/></div> <div>What your query is telling you I think is &quot;look I couldn't really find anything interesting for you with the data you gave me so i am going to give you the model's most likely movies instead&quot;</div> <div><br/></div> <div>Allan</div> <div><br/></div>Mon, 29 Jun 2009 15:35:55 Z2009-06-29T15:35:55Z