Clear Filters
Clear Filters

HELP: can some one please explain to me how to compare these two data sets accurately and why my ARI code isn't working?

3 views (last 30 days)
Hi,
I have two datasets acquired in different ways but measured the same objects I want to see how similar they are to eachother to see how accurate the matlab version is (the other method was manual). I was wodnering what is the best way to do that and if maybe i would have to use a p value somewhere? i'm not sure how I would do this but some initial research suggested using ARI (Adjusted rand Index) and AMI (Adjusted Mutual Information). I was also going to use the Silhouette score. But when I made a code for ARI I hit a wall and I am not sure why because i have the stats tool box installed and the 2022a version but I keep getting an unrecognized function or variable error for 'randIndex',
can some one explain to me how to compare these two data sets accurately and why my ARI code isn't working?
I attached two datasets as an example. Thanks!
clear all
% Load the data from Excel files
data1 = readmatrix('data1.xlsx');
data2 = readmatrix('data2.xlsx');
% Run k-means clustering on the datasets
k = 3; % number of clusters
[idx1, ~] = kmeans(data1, k);
[idx2, ~] = kmeans(data2, k);
% Compute the ARI
ari = randIndex(idx1, idx2);
disp(['ARI = ', num2str(ari)]);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!