Добрый день!
Как задать в Microsoft Analysis Services, для алгоритма Microsoft Linear Regression, что предсказываемое (Predict) поле, должно быть больше нуля?
Попытался так:
ALTER MINING STRUCTURE TMCRegression
ADD MINING MODEL LogisticRegression
(
[GROUP],
[PriceDeliver],
[PriceSale] PREDICT,
[PriceReestr],
[PrPriceSale] ,
[PrPriceDeliver]
)
USING Microsoft_Logistic_Regression
WITH FILTER ([PriceSale] > 0)
Не, помогло. Запрос:
SELECT
t.[Group], t.[NAME], Predict(LogisticRegression.[PriceSale]) AS [Predict PriceSale], t.[PriceSale],
(100.0*Abs(Predict(LogisticRegression.[PriceSale])-t.[PriceSale]))/t.[PriceSale] AS Quality,
t.PriceDeliver, t.PriceReestr, t.PrPriceSale, t.PrPriceDeliver
FROM LogisticRegression
PREDICTION JOIN
OPENQUERY([ForecastDS],'SELECT * FROM dbo.TMCIncome') AS t
ON
t.[Group] = LogisticRegression.[Group] AND
t.PriceDeliver = LogisticRegression.[PriceDeliver] AND
t.PriceReestr = LogisticRegression.[PriceReestr] AND
t.PrPriceSale = LogisticRegression.[PrPriceSale] AND
t.PrPriceDeliver = LogisticRegression.[PrPriceDeliver]
ORDER BY (100.0*Abs(Predict(LogisticRegression.[PriceSale])-t.[PriceSale]))/t.[PriceSale] DESC
Возвращает записи для которых Predict(LogisticRegression.[PriceSale])<0