Description Usage Arguments Details Value Author(s) References See Also Examples
spfabia
: C implementation of spfabia
.
1 |
X |
the file name of the sparse matrix in sparse format. |
p |
number of hidden factors = number of biclusters; default = 13. |
alpha |
sparseness loadings (0 - 1.0); default = 0.01. |
cyc |
number of iterations; default = 500. |
spl |
sparseness prior loadings (0 - 2.0); default = 0 (Laplace). |
spz |
sparseness factors (0.5 - 2.0); default = 0.5 (Laplace). |
non_negative |
Non-negative factors and loadings if non_negative > 0; default = 0. |
random |
>0: random initialization of loadings in [0,random], <0: random initialization of loadings in [-random,random]; default = 1.0. |
write_file |
>0: results are written to files (L in sparse format), default = 1. |
norm |
data normalization: >0 (var=1), 0 (no); default = 1. |
scale |
loading vectors are scaled in each iteration to the given variance. 0.0 indicates non scaling; default = 0.0. |
lap |
minimal value of the variational parameter; default = 1.0. |
nL |
maximal number of biclusters at which a row element can participate; default = 0 (no limit). |
lL |
maximal number of row elements per bicluster; default = 0 (no limit). |
bL |
cycle at which the nL or lL maximum starts; default = 0 (start at the beginning). |
samples |
vector of samples which should be included into the analysis; default = 0 (all samples) |
initL |
vector of indices of the selected samples which are used to initialize L; default = 0 (random initialization). |
iter |
number of iterations; default = 1. |
quant |
qunatile of largest L values to remove in each iteration; default = 0.001. |
lowerB |
lower bound for filtering the inputs columns, the minimal column sum; default = 0.0. |
upperB |
upper bound for filtering the inputs columns, the maximal column sum; default = 1000.0. |
dorescale |
rescale factors Z to variance 1 and consequently also L; logical; default: FALSE. |
doini |
compute the information content of the biclusters and sort the biclusters according to their information content; logical, default: FALSE. |
eps |
lower bound for variational parameter lapla; default: 1e-3. |
eps1 |
lower bound for divisions to avoid division by zero; default: 1e-10. |
Version of fabia for a sparse data matrix. The data matrix is directly scanned by the C-code and must be in sparse matrix format.
Sparse matrix format: *first line: numer of rows (the samples). *second line: number of columns (the features). *following lines: for each sample (row) three lines with
I) number of nonzero row elements
II) indices of the nonzero row elements (ATTENTION: starts with 0!!)
III) values of the nonzero row elements (ATTENTION: floats with decimal point like 1.0 !!)
Biclusters are found by sparse factor analysis where both the factors and the loadings are sparse.
Essentially the model is the sum of outer products of vectors:
X = ∑_{i=1}^{p} λ_i z_i^T + U
where the number of summands p is the number of biclusters. The matrix factorization is
X = L Z + U
Here λ_i are from R^n, z_i from R^l, L from R^{n \times p}, Z from R^{p \times l}, and X, U from R^{n \times l}.
If the nonzero components of the sparse vectors are grouped together then the outer product results in a matrix with a nonzero block and zeros elsewhere.
The model selection is performed by a variational approach according to Girolami 2001 and Palmer et al. 2006.
We included a prior on the parameters and minimize a lower bound on the posterior of the parameters given the data. The update of the loadings includes an additive term which pushes the loadings toward zero (Gaussian prior leads to an multiplicative factor).
The code is implemented in C.
|
object of the class |
Sepp Hochreiter
S. Hochreiter et al., ‘FABIA: Factor Analysis for Bicluster Acquisition’, Bioinformatics 26(12):1520-1527, 2010. http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btq227
Mark Girolami, ‘A Variational Method for Learning Sparse and Overcomplete Representations’, Neural Computation 13(11): 2517-2532, 2001.
J. Palmer, D. Wipf, K. Kreutz-Delgado, B. Rao, ‘Variational EM algorithms for non-Gaussian latent variable models’, Advances in Neural Information Processing Systems 18, pp. 1059-1066, 2006.
fabia
,
fabias
,
fabiap
,
spfabia
,
readSamplesSpfabia
,
samplesPerFeature
,
readSpfabiaResult
,
fabi
,
fabiasp
,
mfsc
,
nmfdiv
,
nmfeu
,
nmfsc
,
extractPlot
,
extractBic
,
plotBicluster
,
Factorization
,
projFuncPos
,
projFunc
,
estimateMode
,
makeFabiaData
,
makeFabiaDataBlocks
,
makeFabiaDataPos
,
makeFabiaDataBlocksPos
,
matrixImagePlot
,
fabiaDemo
,
fabiaVersion
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 | #---------------
# TEST
#---------------
samples <- 20
features <- 200
sparseness <- 0.9
write(samples, file = "sparseFabiaTest.txt",ncolumns = features,append = FALSE, sep = " ")
write(features, file = "sparseFabiaTest.txt",ncolumns = features,append = TRUE, sep = " ")
for (i in 1:samples)
{
ind <- which(runif(features)>sparseness)-1
num <- length(ind)
val <- abs(rnorm(num))
write(num, file = "sparseFabiaTest.txt",ncolumns = features,append = TRUE, sep = " ")
write(ind, file = "sparseFabiaTest.txt",ncolumns = features,append = TRUE, sep = " ")
write(val, file = "sparseFabiaTest.txt",ncolumns = features,append = TRUE, sep = " ")
}
res <- spfabia("sparseFabiaTest",p=3,alpha=0.03,cyc=50,non_negative=1,write_file=0,norm=0)
unlink("sparseFabiaTest.txt")
plot(res,dim=c(1,2))
plot(res,dim=c(1,3))
plot(res,dim=c(2,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.