A
A
Alexander2015-06-10 15:09:03
data mining
Alexander, 2015-06-10 15:09:03

How to set rule for predicted (Predict) field in Microsoft Linear Regression?

Good afternoon!
How to specify in Microsoft Analysis Services, for the Microsoft Linear Regression algorithm, that the predicted (Predict) field should be greater than zero?
Tried like this:

ALTER MINING STRUCTURE TMCRegression
ADD MINING MODEL LogisticRegression
(
    [GROUP],
    [PriceDeliver],
    [PriceSale] PREDICT,
    [PriceReestr],
    [PrPriceSale] ,
    [PrPriceDeliver]
)
USING Microsoft_Logistic_Regression
WITH FILTER ([PriceSale] > 0)

Did not help. Request:
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

Returns records for which Predict(LogisticRegression.[PriceSale])<0

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question