RSS

(root)/ani/mrses : /mrses.m (revision 2)

To get this branch, use:
bzr branch /webbzr/ani/mrses
Line Revision Contents
1 1
function res=mrses(A,B,k,Niter,Ncycle,distmod,block)
2
  if (nargin<7)
3
    block=256;
4
  end
5
  if (nargin<6)
6
    distmod=1;
7
  end
8
  if (nargin<5)
9
    Ncycle=1000;
10
  end
11
  if (nargin<4)
12
    Niter=500;
13
  end
14
  if (nargin<3)
15
    k=5;
16
  end
17
  if (nargin<2)
18
    error('As minimum two matrixes needed for MRSES');
19
  end
20
  if (nargin>6)
21
    error('Too much parameters');
22
  end
23
24
  sa=size(A);sb=size(B);
25
  if (sa(2)==sb(2))
26
    genes=sa(2);
27
  else
28
    error('Features dimension mismatch');
29
  end
30
31
  ctx = mrses_hw();
32
  mrses_hw(ctx, 1, k, block, single(A), single(B), distmod);
33
34
  for icycle=0:block:(Ncycle-1)
35
    block_size = min(block, Ncycle - icycle);
36
    mrses_hw(ctx, 15, Niter, block_size);
37
  end
38
  n = mrses_hw(ctx, 16);
39
  mrses_hw(ctx);
40
41
  H=[double(n)./Ncycle;1:genes];
42
  res=flipud(sortrows(H'));

Loggerhead 1.18.1 is a web-based interface for Bazaar branches