Memuat
Memuat
K-Means (kmeans) for Robotics and Mechatronics
0 views
Build K-Means model to predict the movement pattern cluster from the operator hand speed and distance to robot features on synthetic data. 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.

Build K-Means model to predict the movement pattern cluster from the operator hand speed and distance to robot features on synthetic data.
| Role | Variable | Unit |
|---|---|---|
| Main | Movement pattern cluster | - |
| Supporting 1 | Operator hand speed | m/s |
| Supporting 2 | Distance to robot | m |
K-means splits the Movement pattern cluster, Operator hand speed and Distance to robot data into 5 clusters with a mean silhouette of 0.665 and a Calinski-Harabasz index of 357.3; the smallest cluster holds 16.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);
operator_hand_speed = X(:, 1);
distance_to_robot = 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);
[movement_pattern_cluster, C] = kmeans(X, kbest, 'Replicates', 10, 'Start', 'plus');
fprintf('Chosen k = %d, cluster sizes: %s\n', kbest, mat2str(accumarray(movement_pattern_cluster, 1)'));
figure;
subplot(1,2,1); plot(ks, sse, '-o'); xlabel('k'); ylabel('Total within-cluster SSE');
subplot(1,2,2); gscatter(operator_hand_speed, distance_to_robot, movement_pattern_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$19
excl. 11% VAT
Duration: 3 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$56
excl. 11% VAT
Duration: 7 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$125
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 Robotics and Mechatronics. 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$19, Package 2 (your data analysis and interpretation) US$56 and Package 3 (full guidance) US$125, 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