Memuat
Memuat
K-Means (kmeans) for IoT and Embedded Systems
0 views
Cluster sensor nodes by energy consumption and traffic pattern with k-means and determine a suitable number of clusters. 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.

Cluster sensor nodes by energy consumption and traffic pattern with k-means and determine a suitable number of clusters.
| Role | Variable | Unit |
|---|---|---|
| Main | Node cluster | - |
| Supporting 1 | Energy consumption | mJ |
| Supporting 2 | Packets per hour | paket |
K-means splits the Node cluster, Energy consumption and Packets per hour data into 3 clusters with a mean silhouette of 0.741 and a Calinski-Harabasz index of 434.7; the smallest cluster holds 28.7% 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);
energy_consumption = X(:, 1);
packets_per_hour = 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);
[node_cluster, C] = kmeans(X, kbest, 'Replicates', 10, 'Start', 'plus');
fprintf('Chosen k = %d, cluster sizes: %s\n', kbest, mat2str(accumarray(node_cluster, 1)'));
figure;
subplot(1,2,1); plot(ks, sse, '-o'); xlabel('k'); ylabel('Total within-cluster SSE');
subplot(1,2,2); gscatter(energy_consumption, packets_per_hour, node_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 IoT and Embedded Systems. 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