-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_missing_instance.m
executable file
·34 lines (27 loc) · 1.13 KB
/
demo_missing_instance.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
%*************************************************************************
% Matlab code for
% He Zhao, Lan Du, Wray Buntine, Piyush Rai
% "Bayesian Multi-label Learning with Sparse Features and Labels, and Label Co-occurrences,"
% in Artificial Intelligence and Statistics (AISTATS) 2018.
%
% Written by He Zhao, http://ethanhezhao.github.io/
% Copyright @ He Zhao
%*************************************************************************
K = 100;
mu_0 = 10;
nu_0 = mu_0;
dataset_name = 'bibtex';
data = load(sprintf('./data/%s.mat',dataset_name));
missing_instance = load(sprintf('./data/%s_missing_instance.mat',dataset_name));
is_co_label = true;
save_dir = './demo_missing_instance_save/';
if ~exist(save_dir,'dir')
mkdir(save_dir);
end
model = BMLS(K, missing_instance.X_tr, missing_instance.Y_tr, ...
data.Y_tr, 200, 2500, is_co_label, true, mu_0, nu_0, data.X_te, data.Y_te);
save(sprintf('%s/model_label_co.mat',save_dir),'model');
is_co_label = false;
model = BMLS(K, missing_instance.X_tr, missing_instance.Y_tr, ...
data.Y_tr, 200, 2500, is_co_label, mu_0, nu_0, data.X_te, data.Y_te);
save(sprintf('%s/model.mat',save_dir),'model');