Re: Lift Table -or- Gains Table
- From: "Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx>
- Date: Thu, 19 Apr 2007 08:58:15 +0200
Check this tip at Sql Server Data Mining site:
http://www.sqlserverdatamining.com/DMCommunity/TipsNTricks/3066.aspx.
BTW, maybe all you need is a simple prediction query that joins the actual
and the predicted values like this example:
SELECT
FLATTENED t.[BikeBuyer] AS _Actual, (SELECT $PROBABILITY AS _Prob FROM
PredictHistogram([Lab03DT].[Bike Buyer]) WHERE [Bike Buyer] = 1),
[Lab03DT].[Bike Buyer] AS _Predicted
FROM
[Lab03DT]
PREDICTION JOIN
OPENQUERY([Adventure Works DW],
'SELECT
[HouseOwnerFlag],
[CommuteDistance],
[YearlyIncome],
[NumberCarsOwned],
[Region],
[MaritalStatus],
[EnglishEducation],
[Age],
[CustomerKey],
[EnglishOccupation],
[Gender],
[NumberChildrenAtHome],
[BikeBuyer],
[TotalChildren]
FROM
[dbo].[Lab02_TestSet]
') AS t
ON
[Lab03DT].[Customer Key] = t.[CustomerKey] AND
[Lab03DT].[Marital Status] = t.[MaritalStatus] AND
[Lab03DT].[Gender] = t.[Gender] AND
[Lab03DT].[Yearly Income] = t.[YearlyIncome] AND
[Lab03DT].[Total Children] = t.[TotalChildren] AND
[Lab03DT].[Number Children At Home] = t.[NumberChildrenAtHome] AND
[Lab03DT].[English Education] = t.[EnglishEducation] AND
[Lab03DT].[English Occupation] = t.[EnglishOccupation] AND
[Lab03DT].[House Owner Flag] = t.[HouseOwnerFlag] AND
[Lab03DT].[Number Cars Owned] = t.[NumberCarsOwned] AND
[Lab03DT].[Commute Distance] = t.[CommuteDistance] AND
[Lab03DT].[Region] = t.[Region] AND
[Lab03DT].[Age] = t.[Age] AND
[Lab03DT].[Bike Buyer] = t.[BikeBuyer]
--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/
.
- References:
- Lift Table -or- Gains Table
- From: Dave Smith
- Re: Lift Table -or- Gains Table
- From: Dejan Sarka
- Lift Table -or- Gains Table
- Prev by Date: Re: How useful is Sequence Clustering algorithm?
- Next by Date: Deployment and Processing Seems to be hanging
- Previous by thread: Re: Lift Table -or- Gains Table
- Next by thread: Deployment and Processing Seems to be hanging
- Index(es):