Memuat
Memuat
K-Means (kmeans) for Electrical Engineering
0 views
Predict load profile cluster from the features peak load and load factor using K-Means (kmeans). kmeans partitions data into k clusters by minimising the distance of points to cluster centres. It suits segmentation of numeric data when the number of clusters can be estimated, such as customer or regional segmentation.

Predict load profile cluster from the features peak load and load factor using K-Means (kmeans).
| Role | Variable | Unit |
|---|---|---|
| Main | load profile cluster | - |
| Supporting 1 | peak load | kW |
| Supporting 2 | load factor | - |
K-means splits the load profile cluster, peak load and load factor data into 3 clusters with a mean silhouette of 0.730 and a Calinski-Harabasz index of 506.2; the smallest cluster holds 30.4% of observations.
Computed from illustrative synthetic data, not from a real study.
kmeans partitions data into k clusters by minimising the distance of points to cluster centres. It suits segmentation of numeric data when the number of clusters can be estimated, such as customer or regional segmentation.
Report why k was chosen (silhouette or elbow), and the size and profile of each cluster. Stress that clusters are exploratory findings that depend on features and scaling.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
rng(8);
mu = [0 0; 4 4; 0 5; 5 0];
X = [];
for k = 1:4
X = [X; mvnrnd(mu(k,:), eye(2), 100)];
end
X = zscore(X);
peak_load = X(:, 1);
load_factor = X(:, 2);
ks = 2:8;
sil = zeros(size(ks)); sse = zeros(size(ks));
for i = 1:numel(ks)
[idx, ~, sumd] = kmeans(X, ks(i), 'Replicates', 10, 'Start', 'plus');
sil(i) = mean(silhouette(X, idx));
sse(i) = sum(sumd);
fprintf('k = %d silhouette = %.3f SSE = %.1f\n', ks(i), sil(i), sse(i));
end
[~, ib] = max(sil);
kbest = ks(ib);
[load_profile_cluster, C] = kmeans(X, kbest, 'Replicates', 10, 'Start', 'plus');
fprintf('Chosen k = %d, cluster sizes: %s\n', kbest, mat2str(accumarray(load_profile_cluster, 1)'));
figure;
subplot(1,2,1); plot(ks, sse, '-o'); xlabel('k'); ylabel('Total within-cluster SSE');
subplot(1,2,2); gscatter(peak_load, load_factor, load_profile_cluster); hold on;
plot(C(:,1), C(:,2), 'kx', 'MarkerSize', 12, 'LineWidth', 2);Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$22
excl. 11% VAT
Duration: 3 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$59
excl. 11% VAT
Duration: 7 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$131
excl. 11% VAT
Duration: 12-15 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. K-Means (kmeans) is commonly used at this level in Electrical Engineering. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output MATLAB gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$22, Package 2 (your data analysis and interpretation) US$59 and Package 3 (full guidance) US$131, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. MATLAB is a trademark of The MathWorks, Inc.
Back to MATLAB portfolio