# matlab code

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### increation

Latent Outlier Detection and the Low Precision Problem

Algorithm 2 [SR-NMF]
Input: A matrix X of size m &#8677; n, m number of features,
n number of samples, k the size of the latent space, `
number of outliers
Output: A vector R represent the ranking of anomalies
with a score in descending order
1: Using R " NMF algorithm we get U and V such that
X &#8673; UV
(U, V ) = R " NMF(k, `)
2: j 0; RANKS empty matrix;
3: STEP1 generate ranks for each subspace
4: for i = 1 ! k do
5: generate all set of combinations AS from (k choose i)
6: for each S 2AS do
7: Residual = X " U, S)V (S,
8: RNorm = columnNorm(Residual)
9: [", RANK] = sort(RNorm, descend)
10: RANKS = [RANKS; RANK]
11: j + +
12: STEP2 merge ranks into one rank
13: R vector of size n;
14: for i = 1 ! j do
15: for p = 1 ! n do
16: R(RANKS(i, p)) = R(RANKS(i, p)) + i
17: sort R in descending order
[", R] = sort(R, descend) (Note: Matlab Notation)

#### Keebellah

Hans
Use the code markers when you paste code

[ code ]

and the code

do not use the spaces for it to work

[ /code ]

will look like this

Code:
``this would be the lines of code :) and this will not become a smiley``
And what is the problem with this matlab code?
I'm no matlab guy but just curious.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On