Clustering for segmented modeling¶
Availability information
Clustering for segmented modeling, available as a public preview feature, is off by default. Contact your DataRobot representative or administrator for information on enabling the feature.
Feature flag: Enable Clustering Project Type for Time Series
To perform time series segmented modeling, you need to define segments for your dataset. Instead of doing this yourself, you can create a DataRobot clustering model that discovers appropriate segments for you. To do this, you can:
-
Create a clustering model as part of a segmented modeling run.
-
Create a clustering model and save it to the Model Registry to be used for a later segmented modeling run.
Build a segmented model using clusters as segments¶
The following workflow shows how to build a clustering model and use the generated clusters as segments in a segmented modeling project:
-
Set up a time series project as normal, enter the target and series ID for the segmented project, then click the pencil next to Segmentation method.
-
Under How are the segments defined, click New clustering model and click time series clustering in the paragraph below.
DataRobot sets up a time-aware clustering project—an unsupervised project with the Clusters option enabled.
-
For Which feature should DataRobot use to segment the series, include the target feature for the segmented modeling project. In this example, the target feature is
Sales
. The required features—the date/time feature (Date
) and the series ID feature (Store
)—are populated in the text box, as well. -
Click Start to generate the clustering models. DataRobot leverages the clustering models to define segments in the segmented modeling project.
-
After the run completes, select a model from the Leaderboard and click Predict > Use for Segmentation. On this tab, you can create a segmented modeling project that uses the clusters to help define the segments.
-
For What would you like the new project to predict, enter the target feature for the segmented modeling project.
-
Click Create project and save to Model Registry.
To save the clustering model and create the project later
Instead of creating a segmentation project now, you can save the clustering model as a model package by selecting Save to Model Registry.
Later you can build a segmented modeling project using the clustering model.
-
Click Go to project.
Your segmentation method is configured with the clustering model.
-
Click Start to build your segmented model. At the prompt, confirm that you want to run a segmentation project.
After modeling is complete, a Combined Model displays on the Leaderboard. You can explore the results and the segment models.
Tip
This procedure saves the time series clustering model as a model package. You can later create new segmented modeling projects using the saved clustering model package.
Build a segmented model using a saved clustering model¶
After you save a time series clustering model as a model package, you can use it in a new segmented modeling project.
Note
You must use the same dataset for the segmented modeling project that you used to generate the clustering project.
-
Set up a time series project as normal, enter the target and series ID for the segmented project, then click the pencil next to Segmentation method.
-
Under How are the segments defined, click Existing clustering model and click + Browse model registry below.
-
Select a time series clustering model package from the list and click Select model package.
-
Click Set segmentation method.
-
Click Start to build your segmented model. At the prompt, confirm that you want to run a segmentation project.
After modeling is complete, a Combined Model displays on the Leaderboard. You can explore the results and the segment models.