GreConDPlus: GreConDPlus Boolean Matrix Factorization

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/GreConDPlus.R

Description

implements GreConDPlus Boolean Matrix Factorization Algorithm.

Usage

1
GreConDPlus(X, no_of_factors = NULL, w, verbose = 2)

Arguments

X

input binary matrix to be factorized.

no_of_factors

number of factors of the result (optional).

w

wieght parameter for the algorithm : represents the weight of type1 and type2 errors

verbose

integer value to control the appearance of messages. 0 minimal messages will be showed. Default 2

Value

List of the following four components:

A

Factor matrix A

B

Factor matrix B

Author(s)

Abdelmoneim Amer Desouki

References

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

See Also

topFiberM, GreConD, Asso_approximate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(DBLP)
X=DBLP
Xb=X==1
Res=GreConDPlus(Xb,7,w=4,verbose=1)

    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))

rBMF documentation built on Jan. 16, 2021, 5:31 p.m.