-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmildisp.m
More file actions
executable file
·38 lines (35 loc) · 821 Bytes
/
mildisp.m
File metadata and controls
executable file
·38 lines (35 loc) · 821 Bytes
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
%MILDISP Display MIL dataset
%
% MILDISP(X)
%
% Display MIL dataset characteristics
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function mildisp(x)
if hasmilbags(x)
%copymethod should be defined
%copymethod = getmilinfo(x,'combrule');
[bags,lab] = getbags(x);
[n,p] = size(x);
m = length(bags);
dname = getname(x);
if ~isempty(dname)
dname = [dname,', '];
end
if isdatafile(x)
dtype = 'datafile';
else
dtype = 'dataset';
end
if isempty(lab)
fprintf('%s%d by %d UNlabeled MIL %s with %d bags\n',...
dname,n,p,dtype,m);
else
[Ip,In] = find_positive(lab);
fprintf('%s%d by %d MIL %s with %d bags: [%d pos, %d neg]\n',...
dname,n,p,dtype,m,length(Ip),length(In));
end
else
display(x);
end