Answered DMDecisionTreeViewer

  • Friday, May 01, 2009 2:25 PM
     
     
    Ok, thanks.
    Another problem: I followed all steps from http://msdn.microsoft.com/en-us/library/ms160727.aspx and have 2 of the three web controls working, however, the DMDecisionTreeViewer shows nothing, just two buttons "Zoom In" and "Zoom Out" and an empty drop-down box "Shading".
    Can anyone tell me what am I doing wrong?
    Note that both TargetTree and TargetNode mdx statements, when run within Mgmt Studio, return something about Bike Buyer.

    Here is the code snippet (surrounding <form> and <asp:Table> omitted):

    <%-- DMNaiveBayesViewer shows some data: --%>
            <asp:TableRow Height="400px" BackColor="Green" HorizontalAlign="Center"><asp:TableCell>
                <cc1:DMNaiveBayesViewer ID="DMNaiveBayesViewer1" runat="server"
                        Server="localhost\alex2k5" Database="Adventure Works DW Standard Edition" Model="TM Naive Bayes" />
            </asp:TableCell></asp:TableRow>
    <%-- DMClusterViewer shows some data: --%>
            <asp:TableRow BackColor="Yellow" HorizontalAlign="Center"><asp:TableCell>
                <cc1:DMClusterViewer ID="DMClusterViewer1" runat="server"
                        Server="localhost\alex2k5" Database="Adventure Works DW Standard Edition" Model="Customer Clusters" />
            </asp:TableCell></asp:TableRow>
    <%-- DMDecisionTreeViewer shows nothing: --%>
            <asp:TableRow Height="300px" BackColor="Red" HorizontalAlign="Center"><asp:TableCell>
                <cc1:DMDecisionTreeViewer ID="DMDecisionTreeViewer1" runat="server"
                        Server="localhost\alex2k5" Database="Adventure Works DW Standard Edition" Model="TM Decision Tree"
                        TargetTree="SELECT ATTRIBUTE_NAME FROM [TM Decision Tree].CONTENT WHERE NODE_TYPE=2"
                        TargetNode="SELECT NODE_UNIQUE_NAME, ATTRIBUTE_NAME FROM [TM Decision Tree].CONTENT WHERE NODE_TYPE=3 OR NODE_TYPE=4"
                />
            </asp:TableCell></asp:TableRow>

    Thanks in advance.

All Replies

  • Saturday, May 02, 2009 11:56 AM
     
     Answered
    Ok, problem solved, here is the whole picture, if anyone is interested.

    1. The readme for DMDecisionTreeViewer at http://msdn.microsoft.com/en-us/library/ms160727.aspx gives not the values of TargetTree and/or TargetNode attributes but queries to get them (two sentences to that effect in that readme would not hurt...), so to get the TargetTree you run

    SELECT ATTRIBUTE_NAME FROM [TM Decision Tree].CONTENT WHERE NODE_TYPE=2

    in, let's say, Mgmt Studio and receive "Bike Buyer" which should be used as TargetTree value.
    So you get
                <cc1:DMDecisionTreeViewer ID="DMDecisionTreeViewer1" runat="server"
                        Server="localhost\alexv2k8" Database="Adventure Works DW 2008 SE" Model="TM Decision Tree"
                        TargetTree="Bike Buyer" ViewType="Tree"
                />

    2. Trick #2 is that this control in a Tree mode (as opposed to a NodeDetails mode) works in IE but not in Firefox (did not try other browsers). This was the hardest one, honestly, and the hint came from "Data Mining Web Controls Library" home page

    http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005!Data%20Mining%20Web%20Controls%20Library&referringTitle=SS2005!Readme%20for%20SQL%20Server%20Plug-In%20Algorithms

    as "you can browse complex mining models from any computer that has Microsoft Internet Explorer installed".

    3.  As in #1, for a case ViewType is set to NodeDetails you run the sample query

    SELECT NODE_UNIQUE_NAME, ATTRIBUTE_NAME FROM [TM Decision Tree].CONTENT WHERE NODE_TYPE=3 OR NODE_TYPE=4

    _independently_ and use any of the values that are listed in the result as a value for a TargetNode, as in

                <cc1:DMDecisionTreeViewer ID="DMDecisionTreeViewer1" runat="server"
                        Server="localhost\alexv2k8" Database="Adventure Works DW 2008 SE" Model="TM Decision Tree"
                        TargetTree="Bike Buyer" ViewType="NodeDetails" TargetNode="00000000100"
                />

    These two work, both work in IE and NodeDetails - in Firefox (and actually NodeDetails look better in FF).

    Done.

    Yet again, just three lines in a readme, like

                        TargetTree="Bike Buyer" ViewType="Tree" <%-- ViewType="Tree" is the default and can be omitted --%>
                        <%-- works in IE only --%>

    and

                        TargetTree="Bike Buyer" ViewType="NodeDetails" TargetNode="00000000100"

    would have helped a lot.


  • Wednesday, June 06, 2012 1:35 PM
     
     

    I get exactly the same effect however I also get a JavaScript warning popup...

            Error: 'DMDecisionTreeViewer1NodeData' is undefined

    No matter what I try all I see is a Zoom In/out buttons and a blank shading drop down.

  • Wednesday, June 06, 2012 5:48 PM
    Answerer
     
     

    Microsoft haven't released any updates to the data mining web controls and I don't know if you will get support from Microsoft.

    If you want to be able to explore and share mining models on the web, you can look at solution from Microsoft parter Predixion Software.

    Here is a short video demonstrating its features http://www.youtube.com/watch?v=rgz3LZRS_AY


    Tatyana Yakushev [PredixionSoftware.com]

  • Monday, June 25, 2012 7:03 PM
    Answerer
     
     

    Tatyana is correct. Most of the older samples are not being updated, as we found we couldn't afford to maintain multiple versions and check backward compatibility for all our samples.

    So all of the samples that are not used in product tutorials were moved to CodePlex, to make the code available to the public. (CodePlex is also easier to update than content on MSDN.)

    https://msftasprodsamples.codeplex.com/

    However, detailed feedback like this is very useful to others. So I strongly encourage anyone who finds missing steps in content or tips on how to improve it to use the Community Content feature to add specific instructions or notes right in the topic.

    For example, on the page you cited, scroll all the way to the bottom of the page, and just below the bright green bar, click Add Content. Plus, we have a tool that collects these comments so that way it gets visibility a little quicker than forum posts.

    http://msdn.microsoft.com/en-us/library/ms160727(SQL.105).aspx

    BTW, if people really would like to see an update to this sample or others, PLEASE go to MSCONNECT and log a bug so that management knows customers want this content. If we get enough votes, we can do the cool fun stuff :-)

    https://connect.microsoft.com/Connect/SearchResults.aspx?FeedbackType=2&Status=1&Scope=0&SortOrder=5


    SQL Server UE, Data Mining