错误(数据挖掘):挖掘模型中未指定任何案例

时间:2014-10-17 12:13:20

标签: sql-server-2012 mdx data-mining

在使用SSDT之前处理了挖掘结构,模型和预测我试图使用MDX执行相同的操作,以期能够自动执行某些过程。

现在我在尝试将数据插入模型时遇到了问题。

INSERT INTO MINING STRUCTURE DumpForecasting_MIXED_Structure
(
   [TimeIndex],
   [DumpLocation_Id]
)
OPENQUERY 
(
[Data Analytics Test],
'SELECT [TimeIndex],
        [DumpLocation_Id],
        [TotalDumpCount]
FROM dbo.DailyDumpStatistics
ORDER BY [DumpLocation_Id],[TimeIndex]'
)

当尝试执行上述操作时,我遇到了错误:

Error (Data mining): No cases were specified in  the mining model, Forecasting_ARIMA.

为了澄清这里是我的创建查询:

CREATE MINING MODEL [DumpForecasting_MIXED]
(
[TimeIndex] date KEY TIME,
[DumpLocation_Id] long KEY,
[TotalDumpCount] long Continuous Predict
)
USING Microsoft_Time_Series(
                        AUTO_DETECT_PERIODICITY = 0.8,
                        FORECAST_METHOD = 'MIXED',
                        PREDICTION_SMOOTHING = 0.3
                        )
WITH DRILLTHROUGH

跟随ARIMA:

ALTER MINING STRUCTURE DumpForecasting_MIXED_Structure
ADD MINING MODEL Forecasting_ARIMA
(
    [TimeIndex],
    [DumpLocation_Id],      
    [TotalDumpCount] PREDICT

)
USING Microsoft_Time_Series(
                        AUTO_DETECT_PERIODICITY = 0.8,
                        FORECAST_METHOD = 'ARIMA'
                        )
WITH DRILLTHROUGH

和ARTXP:

ALTER MINING STRUCTURE DumpForecasting_MIXED_Structure
ADD MINING MODEL Forecasting_ARTXP
(
    [TimeIndex],
    [DumpLocation_Id],      
    [TotalDumpCount] PREDICT

)
USING Microsoft_Time_Series(
                        AUTO_DETECT_PERIODICITY = 0.8,
                        FORECAST_METHOD = 'ARTXP'
                        )
WITH DRILLTHROUGH

我可以根据要求提供更多细节。截至目前,我已经广泛搜索,但我找不到任何可以帮助我解决这个问题的好消息来源。非常感谢您的建议和想法。

1 个答案:

答案 0 :(得分:0)

我意识到我犯的错误就是忘记将预测列添加到我的insert语句中。 没有它,模型将只提供密钥而无需预测值。

[DumpLocation_id] 

之后应该是:

,[TotalDumpCount]