SlideShare a Scribd company logo
Microsoft Time Series Algorithm
overviewUnderstanding Microsoft Time Series algorithmTime Series ScenariosDMXCreating the QueryAltering the Query Executing the Query
Microsoft Time Series algorithmThe Microsoft Time Series algorithm provides regression algorithms that are optimized for the forecasting of continuous values, such as product sales, over time.A time series consists of a series of data collected over successive increments of time or other sequence indicator.  A time series model can predict trends based only on the original dataset that is used to create the model.
Microsoft Time Series algorithmshows a typical model for forecasting sales of a product in four different sales regions over time.Historical information appears to the left of the vertical line and represents the data that the algorithm uses to create the model.Predicted information appears to the right of the vertical line and represents the forecast that the model makes
Time Series ScenariosPerforming a Simple ForecastThis step involvescreating a model, showing it some data, and asking it for predictions of future values.Predicting Interdependent SeriesThe Microsoft implementation finds relationships where they exist between series and will use these relationships in forecasting.Marking a series as INPUT indicates that it cannot be forecasted and will be considered only as to its impact on other series. Marking a series as PREDICT_ONLY, on the other hand, indicates that the series can be forecasted, but will not be considered by other series.
Time Series ScenariosUnderstanding Your Time SeriesYou can explore the individual patterns that are being used for prediction and see if the previous sales have a larger impact on future behavior.you can get more descriptive rules about your data, because the Time Series algorithm is based on the decision tree implementation used in the Microsoft Decision Trees algorithm.
DMXThe main element that differentiates a mining structure used for time series from other structures is the inclusion of a KEY TIME column. The KEY TIME content type indicates that a column is a KEY as well as the time slice representing the row.
DMXCREATE MINING MODEL statement:CREATE MINING MODEL [<Mining Structure Name>]   (                    <key columns>,                         <predictable attribute columns>    ) USING <algorithm name>([parameter list]) WITH DRILLTHROUGHThe code defines the key column for the mining model, which in the case of a time series model uniquely identifies a time step in the source data. The time step is identified with the KEY TIME keywords after the column name and data types.  You can have multiple predictable attributes in a single mining model. When there are multiple predictable attributes, the Microsoft Time Series algorithm generates a separate analysis for each series:
DMX(Creating the Query )To create a new DMX query in SQL Server Management StudioOpen SQL Server Management Studio.In the Connect to Server dialog box, for Server type, select Analysis Services. In Server name, type LocalHost, or the name of the instance of Analysis Services that you want to connect to for this lesson. Click Connect.In Object Explorer, right-click the instance of Analysis Services, point to New Query, and then click DMX.Query Editor opens and contains a new, blank query.
DMX(Altering the Query )In Query Editor, copy the generic example of the CREATE MINING MODEL statement into the blank query.Replace the following: 1. [mining model name]  with [Forecasting_MIXED] 2.  <key columns>             with          [Reporting Date] DATE KEY TIME,          [Model Region] TEXT KEY The TIME KEY keyword indicates that the ReportingDate column contains the time step values used to order the values. The TEXT and KEY keywords indicate that the ModelRegion column contains an additional series key.
DMX(Altering the Query ) Replace the following:3. < predictable attribute columns> )         with:       [Quantity] LONG CONTINUOUS PREDICT,                                     [Amount] DOUBLE CONTINUOUS PREDICT       )4. USING <algorithm name>([parameter list])    WITH DRILLTHROUGH        with:USING Microsoft_Time_Series(AUTO_DETECT_PERIODICITY = 0.8, FORECAST_METHOD = 'MIXED') WITH DRILLTHROUGH
DMX(Altering the Query )The complete statement should now be as follows:CREATE MINING MODEL [Forecasting_MIXED]     ( [Reporting Date] DATE KEY TIME,     [Model Region] TEXT KEY,      [Quantity] LONG CONTINUOUS PREDICT,     [Amount] DOUBLE CONTINUOUS PREDICT )      USING Microsoft_Time_Series (AUTO_DETECT_PERIODICITY = 0.8, FORECAST_METHOD = 'MIXED')       WITH DRILLTHROUGH On the File menu, click Save DMXQuery1.dmx As.In the Save As dialog box, browse to the appropriate folder, and name the file Forecasting_MIXED.dmx.
After a query is created and saved, it needs to be executed to create the mining model and its mining structure on the server. In Query Editor, on the toolbar, click ExecuteA new structure named        Forecasting_MIXED_Structure now exists on the server, together with the related mining model      Forecasting_MIXED.DMX(Executing the Query )
Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net

More Related Content

PPT
AIA101.2.Access Queries Accelerated
PPTX
MS SQL SERVER: Data mining concepts and dmx
DOC
Crosstab query techniques
PPTX
PDF
Measure performance in JavaScript
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PPTX
MongoDB for Time Series Data Part 1: Setting the Stage for Sensor Management
PPTX
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
AIA101.2.Access Queries Accelerated
MS SQL SERVER: Data mining concepts and dmx
Crosstab query techniques
Measure performance in JavaScript
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
MongoDB for Time Series Data Part 1: Setting the Stage for Sensor Management
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...

Similar to MS SQL SERVER: Time series algorithm (20)

PPTX
Data mining by example forecasting and cross prediction using microsoft time ...
PPTX
Minería de Datos en Sql Server 2008
PDF
Analysis of Time Series Data & Pattern Sequencing
PPTX
Data mining-implementation-to-predict-sales-using-time-series-method By Raiha...
PPT
BI 2008 Simple
PPTX
D.M time series analysis
PPTX
Data Mining With SQL Server
PPT
SQL Server 2008 Data Mining
PPT
SQL Server 2008 Data Mining
PPTX
MS SQL Server: Data mining concepts and dmx
PDF
A Survey on Deep Learning for time series Forecasting
PDF
Microsoft Data Mining 2012
PPT
Excel Datamining Addin Intermediate
PPT
Excel Datamining Addin Intermediate
PPTX
Introduction To Sql Server Data Mining
PPTX
Data mining
PPTX
Anshita_Timeseries forcast_usecase_inAI.pptx
PPTX
01 Introduction to Data Mining
PPTX
SQL Server: Data Mining
PPTX
MS Sql Server: Datamining Introduction
Data mining by example forecasting and cross prediction using microsoft time ...
Minería de Datos en Sql Server 2008
Analysis of Time Series Data & Pattern Sequencing
Data mining-implementation-to-predict-sales-using-time-series-method By Raiha...
BI 2008 Simple
D.M time series analysis
Data Mining With SQL Server
SQL Server 2008 Data Mining
SQL Server 2008 Data Mining
MS SQL Server: Data mining concepts and dmx
A Survey on Deep Learning for time series Forecasting
Microsoft Data Mining 2012
Excel Datamining Addin Intermediate
Excel Datamining Addin Intermediate
Introduction To Sql Server Data Mining
Data mining
Anshita_Timeseries forcast_usecase_inAI.pptx
01 Introduction to Data Mining
SQL Server: Data Mining
MS Sql Server: Datamining Introduction
Ad

More from DataminingTools Inc (20)

PPTX
Terminology Machine Learning
PPTX
Techniques Machine Learning
PPTX
Machine learning Introduction
PPTX
Areas of machine leanring
PPTX
AI: Planning and AI
PPTX
AI: Logic in AI 2
PPTX
AI: Logic in AI
PPTX
AI: Learning in AI 2
PPTX
AI: Learning in AI
PPTX
AI: Introduction to artificial intelligence
PPTX
AI: Belief Networks
PPTX
AI: AI & Searching
PPTX
AI: AI & Problem Solving
PPTX
Data Mining: Text and web mining
PPTX
Data Mining: Outlier analysis
PPTX
Data Mining: Mining stream time series and sequence data
PPTX
Data Mining: Mining ,associations, and correlations
PPTX
Data Mining: Graph mining and social network analysis
PPTX
Data warehouse and olap technology
PPTX
Data Mining: Data processing
Terminology Machine Learning
Techniques Machine Learning
Machine learning Introduction
Areas of machine leanring
AI: Planning and AI
AI: Logic in AI 2
AI: Logic in AI
AI: Learning in AI 2
AI: Learning in AI
AI: Introduction to artificial intelligence
AI: Belief Networks
AI: AI & Searching
AI: AI & Problem Solving
Data Mining: Text and web mining
Data Mining: Outlier analysis
Data Mining: Mining stream time series and sequence data
Data Mining: Mining ,associations, and correlations
Data Mining: Graph mining and social network analysis
Data warehouse and olap technology
Data Mining: Data processing
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Machine Learning_overview_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Cloud computing and distributed systems.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Programs and apps: productivity, graphics, security and other tools
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Assigned Numbers - 2025 - Bluetooth® Document
Machine Learning_overview_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
Cloud computing and distributed systems.
gpt5_lecture_notes_comprehensive_20250812015547.pdf

MS SQL SERVER: Time series algorithm

  • 2. overviewUnderstanding Microsoft Time Series algorithmTime Series ScenariosDMXCreating the QueryAltering the Query Executing the Query
  • 3. Microsoft Time Series algorithmThe Microsoft Time Series algorithm provides regression algorithms that are optimized for the forecasting of continuous values, such as product sales, over time.A time series consists of a series of data collected over successive increments of time or other sequence indicator.  A time series model can predict trends based only on the original dataset that is used to create the model.
  • 4. Microsoft Time Series algorithmshows a typical model for forecasting sales of a product in four different sales regions over time.Historical information appears to the left of the vertical line and represents the data that the algorithm uses to create the model.Predicted information appears to the right of the vertical line and represents the forecast that the model makes
  • 5. Time Series ScenariosPerforming a Simple ForecastThis step involvescreating a model, showing it some data, and asking it for predictions of future values.Predicting Interdependent SeriesThe Microsoft implementation finds relationships where they exist between series and will use these relationships in forecasting.Marking a series as INPUT indicates that it cannot be forecasted and will be considered only as to its impact on other series. Marking a series as PREDICT_ONLY, on the other hand, indicates that the series can be forecasted, but will not be considered by other series.
  • 6. Time Series ScenariosUnderstanding Your Time SeriesYou can explore the individual patterns that are being used for prediction and see if the previous sales have a larger impact on future behavior.you can get more descriptive rules about your data, because the Time Series algorithm is based on the decision tree implementation used in the Microsoft Decision Trees algorithm.
  • 7. DMXThe main element that differentiates a mining structure used for time series from other structures is the inclusion of a KEY TIME column. The KEY TIME content type indicates that a column is a KEY as well as the time slice representing the row.
  • 8. DMXCREATE MINING MODEL statement:CREATE MINING MODEL [<Mining Structure Name>] ( <key columns>, <predictable attribute columns> ) USING <algorithm name>([parameter list]) WITH DRILLTHROUGHThe code defines the key column for the mining model, which in the case of a time series model uniquely identifies a time step in the source data. The time step is identified with the KEY TIME keywords after the column name and data types. You can have multiple predictable attributes in a single mining model. When there are multiple predictable attributes, the Microsoft Time Series algorithm generates a separate analysis for each series:
  • 9. DMX(Creating the Query )To create a new DMX query in SQL Server Management StudioOpen SQL Server Management Studio.In the Connect to Server dialog box, for Server type, select Analysis Services. In Server name, type LocalHost, or the name of the instance of Analysis Services that you want to connect to for this lesson. Click Connect.In Object Explorer, right-click the instance of Analysis Services, point to New Query, and then click DMX.Query Editor opens and contains a new, blank query.
  • 10. DMX(Altering the Query )In Query Editor, copy the generic example of the CREATE MINING MODEL statement into the blank query.Replace the following: 1. [mining model name] with [Forecasting_MIXED] 2. <key columns> with [Reporting Date] DATE KEY TIME, [Model Region] TEXT KEY The TIME KEY keyword indicates that the ReportingDate column contains the time step values used to order the values. The TEXT and KEY keywords indicate that the ModelRegion column contains an additional series key.
  • 11. DMX(Altering the Query ) Replace the following:3. < predictable attribute columns> ) with: [Quantity] LONG CONTINUOUS PREDICT, [Amount] DOUBLE CONTINUOUS PREDICT )4. USING <algorithm name>([parameter list]) WITH DRILLTHROUGH with:USING Microsoft_Time_Series(AUTO_DETECT_PERIODICITY = 0.8, FORECAST_METHOD = 'MIXED') WITH DRILLTHROUGH
  • 12. DMX(Altering the Query )The complete statement should now be as follows:CREATE MINING MODEL [Forecasting_MIXED] ( [Reporting Date] DATE KEY TIME, [Model Region] TEXT KEY, [Quantity] LONG CONTINUOUS PREDICT, [Amount] DOUBLE CONTINUOUS PREDICT ) USING Microsoft_Time_Series (AUTO_DETECT_PERIODICITY = 0.8, FORECAST_METHOD = 'MIXED') WITH DRILLTHROUGH On the File menu, click Save DMXQuery1.dmx As.In the Save As dialog box, browse to the appropriate folder, and name the file Forecasting_MIXED.dmx.
  • 13. After a query is created and saved, it needs to be executed to create the mining model and its mining structure on the server. In Query Editor, on the toolbar, click ExecuteA new structure named  Forecasting_MIXED_Structure now exists on the server, together with the related mining model  Forecasting_MIXED.DMX(Executing the Query )
  • 14. Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net