-
Notifications
You must be signed in to change notification settings - Fork 15
/
experiment_uci.m
63 lines (56 loc) · 1.99 KB
/
experiment_uci.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% this script runs clustering on UCI datasets
clear all; close all; clc;
pathAll('');
% This is the rate in which we sample side information;
% more accurate, this is the size of the pairwise constraints
% over the total number of constraints.
rate = 0.03;
% The confidence on quality of the constraints. When p = 1, the constraints
% are high quality (no noise). As `p` gets closer to zero, it is more
% likely that the constraints will be fliped (hence noisier).
p = 1;
%% iris
[X,Y] = readUCIData('iris');
size1 = size(X,1);
order = randperm(size1);
X = X(order,:);
Y = Y(order,:);
k = 3;
experimentName = ['Variable_k_iris_p=' num2str(p) '_rate=' num2str(rate) '_i=' num2str(iii) '_kvariance_' num2str(k_variance) ];
runClustering(X,Y,k, experimentName, rate, p, false);
%% wine
[X,Y] = readUCIData('wine');
size1 = size(X,1);
order = randperm(size1);
X = X(order,:);
Y = Y(order,:);
k = 3;
experimentName = ['Variable_k_wine_p=' num2str(p) '_rate=' num2str(rate) '_i=' num2str(iii) '_kvariance_' num2str(k_variance)];
runClustering(X,Y,k, experimentName, rate, p, false);
%% ecoli
[X,Y] = readUCIData('ecoli');
size1 = size(X,1);
order = randperm(size1);
X = X(order,:);
Y = Y(order,:);
k = 8;
experimentName = ['Variable_k_eclli_p=' num2str(p) '_rate=' num2str(rate) '_i=' num2str(iii) '_kvariance_' num2str(k_variance)];
runClustering(X,Y,k, experimentName, rate, p, false);
%% glass
[X,Y] = readUCIData('glass');
size1 = size(X,1);
order = randperm(size1);
X = X(order,:);
Y = Y(order,:);
k = 7;
experimentName = ['Variable_k_glass_p=' num2str(p) '_rate=' num2str(rate) '_i=' num2str(iii) '_kvariance_' num2str(k_variance)];
runClustering(X,Y,k, experimentName, rate, p, false);
%% balance
[X,Y] = readUCIData('balance');
size1 = size(X,1);
order = randperm(size1);
X = X(order,:);
Y = Y(order,:);
k = 3;
experimentName = ['Variable_k_balance_p=' num2str(p) '_rate=' num2str(rate) '_i=' num2str(iii) '_kvariance_' num2str(k_variance)];
runClustering(X,Y,k, experimentName, rate, p, false);