all groups > sql server data mining > february 2005 >
You're in the

sql server data mining

group:

Scripting data mining



Scripting data mining B.J.
2/10/2005 11:25:02 AM
sql server data mining: Hi,

Can I execute from code refreshing of data and full processing of Mining
Model ?
And also execute prediction query on this mining model with client input ?

Re: Scripting data mining Bogdan Crivat [MSFT]
2/10/2005 2:43:30 PM
I assume you are using Data Mining coming with Microsoft Analysis Services.
Yes, you can do that. Open an OLEDB (or ADO, or ADO.Net) connection to the
Analysis Services server.
On that connection, you can execute INSERT INTO to fully reprocess a data
mining model
A singleton prediction query is most likely the best solution for predicting
based on client input:

Something like:

SELECT [College Plans] -- the column to predict
FROM [CPModel] -- the model to predict from
NATURAL PREDICTION JOIN
( SELECT 50000 AS [Parent Income], -- client input here
120 AS [IQ] -- client input here
) AS T

--
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.

thanks,
bogdan

[quoted text, click to view]

Re: Scripting data mining B.J.
2/11/2005 11:01:06 AM
Thank you. I have one additional question (becuase I never worked with MS SQL
Analysis server, only with MS SQL 2000 Database server).
I want to code it in C#.NET. Should I used classical SqlConnection and
SqlCommand objects (as when connecting relational database) also for
connecting to analysis server ?
And can I somehow run this query in Query Analyzer or some other tool
respectively in Visual Studio .NET for quick testing ?

Yet one more thanks.

[quoted text, click to view]
Re: Scripting data mining Bogdan Crivat [MSFT]
2/11/2005 8:19:29 PM
SqlConnection only works with SQL Server.
For Analysis Services you should use the generic OleDb classes in ADO.Net:
System.Data.OleDb.OleDbConnection and System.Data.OleDb.OleDbCommand
The connection string should look like:
"Provider=MSOLAP; Data Source=<Your Server Name>; Initial Catalog=<Your
Database>";


A query analyzer-like tool for Analysis Services Data Mining is available as
a sample at:
http://www.sqlserverdatamining.com/DMCommunity/SQLServer2000/Links_LinkRedirector.aspx?id=109


If you have Analysis Services 2000 installed, most likely you have the
FoodMart 2000 sample database installed as well.
Once you connect to that database, you can issue a query like below, for
test purposes:

select [member card] FROM [Member Card RDBMS] NATURAL PREDICTION JOIN
(SELECT 'M' AS [marital status]) AS T



--
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.

thanks,
bogdan

[quoted text, click to view]

AddThis Social Bookmark Button