Description Usage Arguments Value Author(s) References See Also Examples
implements GreConD algorithm for Boolean matrix factorization. returns A . B = X (if the no. of factors is not limited).
1 |
X |
input binary matrix to be factorized. |
no_of_factors |
number of factors of the result (optional). |
List of the following four components:
A |
Factor matrix A |
B |
Factor matrix B |
Abdelmoneim Amer Desouki
Belohlavek R., Vychodil V.: Discovery of optimal factors in binary data via a novel method of matrix decomposition. Journal of Computer and System Sciences 76(1)(2010), 3-20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(DBLP)
X=DBLP
Xb=X==1
Res=GreConD(Xb,7)
X_=Res$A %*% Res$B
X_=as(X_,'TsparseMatrix')
X=as(X,'TsparseMatrix')
li=X@i[X@x==1]+1
lj=X@j[X@x==1]+1
tp=sum(X_[cbind(li,lj)]>0)
fn=sum(X)-tp#sum(!X_[cbind(li,lj)])
fp=sum(X_@x>0)-tp
cv=1-(fp+fn)/(tp+fn)
print(sprintf("tp:%d, fp:%d,fn:%d, Error:%d, covered=%.3f",tp,fp,fn,fn+fp,cv))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.