none
API type conversion RRS feed

  • Question

  • How could I convert the mining model object of the type Microsoft.AnalysisServices.MiningModel to the mining model object of the type Microsoft.AnalysisServices.AdomdClient.MiningModel?  Please suggest.

    Thanks and regards.
    Monday, March 2, 2009 3:19 PM

Answers

  • You can use Adomd.Net's MiningContentNode class which represents a node in a model's content.
    The MiningModel object has a Content property, a collection of MiningContentNode objects, which represents the first content level (typically a single node)
    You can traverse the hierarchy by recursively accessing the Children collection of each content node, collection which contains the direct descendants of that node (as opposed to the Descendants collection, which contains all the descendants, direct or indirect)

    bogdan crivat [sql server data mining] / http://www.bogdancrivat.net/dm
    Tuesday, March 10, 2009 10:15 PM
    Moderator

All replies

  • You cannot perform such a conversion.
    Microsoft.AnalysisServices.MiningModel is an AMO (Analysis Management Objects) type. It represents the metadata of a mining model. The AMO library can only be used by an administrator and its purpose is to create/alter/delete such objects.

    Microsoft.AnalysisServices.AdomdClient.MiningModel is an Adomd.Net object -- Adomd.Net is a client side library and a MiningModel object in this library is just a descriptors of a model on the server, descriptor which does not allow you to perform any administrative tasks. An Adomd.Net model cannot be created from scratch and deployed on the server.

    Typically, you would create/alter models using the AMO library, in an administrative application and you would use Adomd.Net in a client application to query models and their properties.

    Once you create a model, say Foo, using AMO (and deploy the model on the server), you can get an Adomd.Net model representing the same Foo model like below:

    AdomdConnection conn = ...
    conn.Open();
    Microsoft.AnalysisServices.AdomdClient.MiningModel adomdNetModel = conn.MiningModels["Foo"];


    Hope this helps
    bogdan crivat [sql server data mining] / http://www.bogdancrivat.net/dm
    • Marked as answer by Jamie MacLennan Tuesday, March 3, 2009 7:09 PM
    • Unmarked as answer by GupMan Wednesday, March 4, 2009 2:10 PM
    Monday, March 2, 2009 7:53 PM
    Moderator
  • Thanks Bogdan.

    I am traversing the decision tree using Microsoft.AnalysisServices.AdomdClient.

    For the following pseudocode (that passes through each node, starting from the root node, stopping at the node that meets the criteria and retrieving the entire path/rule from the root to the leaf):
    foreach path P from the root of tree to a leaf node do
    .....
    end for

    the code for the root node of the tree (created and deployed using AMO) is MiningNodeType.Model
    However, it seems that the leaf node of tree can be specified using Analysis Services Stored Procedures ONLY. Please suggest.

    Thanks and regards.

    Tuesday, March 3, 2009 2:08 PM
  • Please suggest a way to specify a path (from root node to leaf node) of the decision tree (created and deployed using AMO). Thanks.
    • Marked as answer by GupMan Wednesday, March 4, 2009 2:10 PM
    • Unmarked as answer by GupMan Wednesday, March 4, 2009 2:10 PM
    Wednesday, March 4, 2009 2:09 PM
  • Can someone please look into this?
    Thursday, March 5, 2009 10:41 AM
  • You can use Adomd.Net's MiningContentNode class which represents a node in a model's content.
    The MiningModel object has a Content property, a collection of MiningContentNode objects, which represents the first content level (typically a single node)
    You can traverse the hierarchy by recursively accessing the Children collection of each content node, collection which contains the direct descendants of that node (as opposed to the Descendants collection, which contains all the descendants, direct or indirect)

    bogdan crivat [sql server data mining] / http://www.bogdancrivat.net/dm
    Tuesday, March 10, 2009 10:15 PM
    Moderator