日期:2014-05-17 浏览次数:20389 次
CREATE MINING MODEL VotingRecords
(
[ID] LONG KEY,
[Party] TEXT DISCRETE PREDICT,
[Class Action Fairness Act] TEXT DISCRETE,
[Farm Security Act] TEXT DISCRETE,
[Highway Funding Restoration Act] TEXT DISCRETE,
[Homeland Security Act] TEXT DISCRETE
) USING Microsoft_Naive_Bayes
GO
// Listing 6.2 - Training a Na飗e Bayes mining model
//
// Train the predictive model using an INSERT INTO statement
// and specifying the columns used in the mining model
//
INSERT INTO VotingRecords
(
[ID],
[Party],
[Class Action Fairness Act],
[Farm Security Act],
[Highway Funding Restoration Act],
[Homeland Security Act]
)
OPENQUERY([Chapter 6],
'SELECT [ID],
[Party],
[Class Action Fairness Act],
[Farm Security Act],
[Highway Funding Restoration Act],
[Homeland Security Act]
FROM [Voting Record Report]')
GO