# Load Profile Clustering Calculator AI Agent Connect

> Load Profile Clustering Calculator MCP lets your AI client perform advanced grouping of normalized energy or demand profiles. It handles the heavy lifting of time-series math, allowing you to identify patterns, find typical usage examples, and isolate anomalies using specific distance metrics like Euclidean, Manhattan, or DTW.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_FkqYtl70Y5hQHWv4SjQvvRZEoKyRqXTIw4zkIb6b/ai-agent-connect
- **Tags:** clustering, time-series, energy-profiles, data-science, statistics

## Description

You can now give your AI agent the ability to perform high-precision time-series clustering. This MCP provides the mathematical engine needed to group normalized energy or demand profiles based on how closely they match. Instead of your agent guessing at patterns, it uses rigorous distance metrics to find real similarities in data. You can choose between Euclidean, Manhattan, or DTW metrics to suit your specific data shape. If your profiles aren't perfectly aligned in time, you can use the optional time alignment feature to sync them before clustering. This makes it much easier to spot consistent usage behaviors or find the outliers that don't fit the mold. Whether you are looking for the most representative profile in a group or checking how tight a cluster actually is, this MCP handles the calculations so your agent can focus on the analysis.

## Tools

### analyze_cluster_cohesion
This tool evaluates how mathematically tight your existing clusters are. It checks the quality of the groupings to ensure they are well-defined.

### cluster_profiles
This is the primary tool for grouping a set of normalized profiles. It executes the clustering operation based on your chosen parameters.

### detect_outliers
This tool finds profiles that don't fit the established cluster structure. It isolates statistically anomalous data points for further review.

### find_representative_profiles
This tool pulls out the most typical examples from each cluster. It helps you identify the central profile that best represents a group.

## Prompt Examples

**Prompt:** 
```
Cluster these energy profiles: [[0.1, 0.5, 0.9], [0.12, 0.48, 0.88], [0.8, 0.2, 0.1]] into 2 groups using Euclidean distance.
```

**Response:** 
```
The profiles have been clustered into 2 groups. The first group contains the first two profiles, and the second group contains the third profile.
```

**Prompt:** 
```
Identify the most typical profile in a cluster where the centroid is [0.5, 0.5] and the members are [[0.4, 0.6], [0.5, 0.5], [0.6, 0.4]].
```

**Response:** 
```
[0.5, 0.5]
```

**Prompt:** 
```
Check the cohesion of these clusters with assignments [0, 0, 1], profiles [[0.1, 0.1], [0.1, 0.2], [0.9, 0.9]], and centroids [[0.1, 0.15], [0.9, 0.9]].
```

**Response:** 
```
The clusters are well-defined with a low total error.
```

## Capabilities

### Multi-Metric Clustering
Your agent uses Euclidean, Manhattan, or DTW to calculate distances between profiles.

### Temporal Synchronization
The agent applies time alignment to sync profiles before performing calculations.

### Anomaly Detection
Your agent identifies data points that deviate from the cluster structure.

### Cluster Quality Assessment
The agent calculates the mathematical tightness of any given group.

### Representative Extraction
Your agent finds the specific profiles that best represent a cluster's center.

## Use Cases

### Consumer Behavior Segmentation
Group residential energy users into distinct usage categories based on their daily demand curves.

### Grid Anomaly Detection
Isolate specific load profiles that deviate from standard patterns to find equipment malfunctions or theft.

### Demand Forecasting Prep
Create representative profiles for different time periods to build more accurate forecasting models.

### Data Cleaning
Use outlier detection to find and remove noisy data points from a time-series dataset.

## Benefits

- Calculates complex distance metrics like DTW without manual coding.
- Identifies statistical outliers within large datasets automatically.
- Provides mathematical validation for cluster tightness and quality.
- Extracts central profiles to simplify complex data groups.

## How It Works

Connect your client to Vinkius and start sending data to the agent.

1. Connect your MCP-compatible client to the Vinkius hosted MCP.
2. Provide your normalized time-series profiles to your agent.
3. Instruct your agent to use the clustering tools with your preferred distance metric.
4. Review the resulting groups, outliers, or representative profiles provided by the agent.

## Frequently Asked Questions

**What distance metrics does this MCP support?**
The MCP supports Euclidean, Manhattan, and Dynamic Time Warping (DTW) metrics for profile comparison.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any compatible client including Claude, Cursor, and Windsurf.

**Does it handle time-shifted data?**
Yes, the MCP includes an optional time alignment feature to synchronize profiles before clustering.

**How do I find the most common profile in a group?**
You can use the find_representative_profiles tool to identify the most typical example within a cluster.

**Is the data hosting handled by Vinkius?**
Yes, Vinkius hosts the MCP and manages the execution, so you only need to connect your client once.

**What kind of data should I provide to the clustering tool?**
You should provide normalized time-series profiles as a JSON array of number arrays. The values should be pre-scaled to ensure clustering is based on shape rather than absolute magnitude.

**How can I find anomalous profiles in my dataset?**
You can use the `detect_outliers` tool. By providing the profiles, assignments, centroids, and a sensitivity threshold, the tool will return the indices of profiles that are statistically distant from their assigned clusters.

**Does this support time-shifted data?**
Yes, by using the DTW (Dynamic Time Warping) metric and enabling the alignment parameter in `cluster_profiles`, the engine can account for temporal shifts in the profiles.
