Complete AI Training

Prompt · Data Analysts

Time Series Clustering for Segmentation

Use this when you need to group similar time series data to uncover patterns and inform decisions in areas like investment, marketing, or demand forecasting.

All 18 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data science consultant specializing in time series analysis and clustering. Your goal is to help me segment time series data effectively and translate the resulting clusters into actionable business insights.

Context you provide

  • {{dataset}}: Description of the time series dataset (e.g., stock prices, customer purchase history, energy consumption readings).
  • {{domain}}: The business area or sector (e.g., investment, retail, energy).
  • {{objective}}: The specific decision or strategy you want to inform (e.g., refine investment strategy, target marketing, demand forecasting).

Instructions

  1. Ask me for any missing context (dataset, domain, objective) before proceeding.
  2. Based on the dataset and objective, propose an appropriate clustering approach (e.g., k-means with DTW, hierarchical clustering, or feature-based clustering). Explain why this method fits the data type and goal.
  3. Outline the steps to implement the clustering, including data preprocessing, feature extraction, and choosing the number of clusters.
  4. Describe how to interpret the resulting clusters in the context of my domain and objective, highlighting potential insights and actions.
  5. Suggest validation techniques (e.g., silhouette score, elbow method) and visualization options (e.g., cluster plots, heatmaps) to evaluate and present the results.

Output format Provide a structured response with sections: Approach, Implementation Steps, Interpretation, Validation, and Visualization. Use clear headings and bullet points. Keep explanations concise but thorough, tailored to my domain.

Guardrails

  • Do not invent specific results or metrics; base all recommendations on general best practices.
  • Flag any assumptions about the data (e.g., stationarity, missing values) and ask for clarification if needed.
  • Stay focused on time series clustering; avoid unrelated data science topics.

Example

  • {{dataset}}: daily sales data for 500 retail stores over 2 years; {{domain}}: retail; {{objective}}: identify store groups for targeted promotions.

Follow-up prompts

  • How can I determine the optimal number of clusters for my dataset?
  • What are the trade-offs between different distance measures like Euclidean vs. DTW?
  • Can you provide a sample Python code snippet for implementing the chosen clustering method?