How to process the mining model and get predicted data from c#

Answered How to process the mining model and get predicted data from c#

  • Friday, September 07, 2012 11:18 PM
     
     

    Hi,

    I have built a mining structure and model in sql 2012 from VS2010 to rpedict my company sales data. Everything works fine but now the company wants to use this with new data and see predictiion.

    I have to be able to process the mining model with new data and read predicted values from c# to display on a web page.

    My questions are:

    • How can I process the mining model from c#
    • How can I read the predictions from c# by providing data to the mining model.

    I know it is easy to log in to sql server and process / predict by I need to do thsi through code.

    Any code sample will be appreciated. I have seen the microsoft articles on adomd but it does not help me much.


    • Edited by Graham1135 Friday, September 07, 2012 11:20 PM
    •  

All Replies

  • Saturday, September 08, 2012 1:16 PM
     
     
    I like this
  • Sunday, September 09, 2012 3:23 AM
     
     
    Is your c# program reading from SQL Server? And you would like to display the results in a webpage?

    ClayM

  • Sunday, September 09, 2012 9:12 PM
     
     
    The c# program can read from SQL server but I need to read from Analysis Services DB. How can I do this?
  • Monday, September 10, 2012 5:08 AM
    Moderator
     
     Answered

    Have you seen this article? http://msdn.microsoft.com/en-US/library/ms345148(v=SQL.90).aspx

    The sample code shows exactly how to execute the predictions. Can be used to send arbitrary DMX statements (such as INSERT INTO etc)


    bogdan crivat / http://www.bogdancrivat.net/dm

  • Monday, September 10, 2012 5:45 AM
    Moderator
     
     Answered

    Hi Graham1135,

    ADOMD.NET provides an object model for viewing the cubes and subordinate objects contained by an analytical data source. In the ADOMD.NET object model, the AdomdConnection object provides access to information on the online analytical processing (OLAP) cubes and mining models defined on an analytical data source, and related objects such as dimensions, named sets, and mining algorithms.

    Each AdomdConnection object has several collections that provide information about the data mining capabilities of the data source:

    1. The MiningModelCollection contains a list of every mining model in the data source.
    2. The MiningServiceCollection provides information about the available mining algorithms.
    3. The MiningStructureCollection exposes information about the mining structures on the server

    For more information about it, please see: http://msdn.microsoft.com/en-us/library/ms123461.aspx 

    Please feel free to ask if you have any question.

    Thanks,
    Eilee

    TechNet Subscriber Support


    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

    • Marked As Answer by Graham1135 Monday, September 10, 2012 11:42 PM
    •