欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

dmx-sql server 数据挖掘简介1

更新时间: 2014-01-05 02:29:46 责任编辑: Author_N1

 

DMX-SQL SERVER 数据挖掘简介一

SQL SEVER中, DMX可以用于:

1 SSMS

2 SSDT

3 EXCEL DATAMINGING ADDIN

 

基本句法如下:

创建STRUCTURE

CREATE MINING STRUCTURE [People1]
(
[CustID] LONG KEY,
[Name] TEXT DISCRETE,
[Gender] TEXT DISCRETE,
[Age] LONG CONTINUOUS,
[CarMake] TEXT DISCRETE,
[CarModel] TEXT DISCRETE
)


创建MODEL

ALTER MINING STRUCTURE [People]
ADD MINING MODEL [PredictGender-Tree]
(
[CustID],
[Gender] PREDICT,
[Age],
[CarModel]
) USING Microsoft Decision Trees


进行TRAIN

INSERT INTO MINING STRUCTURE [People]
([CustID], [Name], [Gender], [Age], [CarMake],[CarModel])
OPENQUERY(Chapter3Data,
’SELECT [Key], Name, Gender, Age, CarMake, CarModel
FROM People’)


查询STRUCTURE

SELECT * FROM MINING STRUCTURE People.CASES WHERE IsTestCase()


查询MODEL

SELECT * FROM ClusterDrillthrough.CASES WHERE IsInNode(’001’)


 

预测查询

SELECT t.[Name], Predict([Gender]) AS PredictedGender
FROM [PredictGender-Bayes]
PREDICTION JOIN
OPENQUERY(Chapter3Data,
’SELECT [Key], [Name], [Age], [CarModel]
FROM [NewPeople]’) AS t
ON [PredictGender-Bayes].[Age] = t.[Age] AND
[PredictGender-Bayes].[CarModel] = t.[CarModel]


 

上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 02:29:46
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/10544/
本文WWW.DOC100.NET DOC100.NET版权所有。