InferClasses {simone} | R Documentation |
Perform graph node classification using the graph's structure, based on a latent structure model where edge weights are Laplace distributed.
InferClasses(K, Q, ...)
K |
A p x p graph precision matrix. |
Q |
The number of classes to estimate. |
... |
Additional arguments are available, see Details |
InferClasses
is based on the graph node classification
algorithm MixNet, using a Laplacian mixture variant. The algorithm
will stop if classes are lost during estimation.
Additional arguments are :
eps
1e-6
.
degree.threshold
1e-12
.
verbose
TRUE
.
param.default
list
object for supervized
learning, fixing the parameters in the mixture of Laplace
distributions for edge weights: contains a QxQ
matrix lambda
of dispersions, a QxQ
matrix mu
of means and a size
Q
vector alpha
of class proportion. Default
NULL
. FP.maxIt
32
.
IC.maxIt
10
.
Returns a list with the folowing components:
Tau |
A p x Q node class probability matrix.
|
cl |
Vector : node classification (IC result). |
parameters |
A list composed by the estimated parameters of the
mixture of Laplace distributions: a QxQ
matrix lambda of dispersions, a QxQ
matrix mu of means and a size Q vector
alpha of class proportions. If the function has been called
with not-null param.default argument, parameters will
be the same. |
iteration |
Final iteration number |
J |
Vector of successive values of optimized criterion |
delta |
Vector of the successive convergence values. |
class.losses |
Boolean vector indicating if a class was lost for each iteration. |
C. Ambroise, J. Chiquet and A. Smith
J.-J. Daudin, F. Picard, et S. Robin. A mixture model for random graphs. Stat. Comput., 18(2), p.173–183, 2008.
SimDataAffiliation
, Mplot
, Gplot
library(simone) ## Simulate a data set with obvious structure p <- 200 n <- 1 proba.in <- 0.2 proba.out <- 0.01 alpha <- c(.5,.3,.2) X <- SimDataAffiliation (p, n, proba.in, proba.out, alpha, proba.dust=0.2) ## estimate vertex classification res <- InferClasses(X$K.theo, 3) ## See results par(mfrow=c(2,2)) Mplot(X$K.theo, X$cl.theo, main="Theoretical classification") Mplot(X$K.theo, res$cl, main="IC classification") g1 <- Gplot(X$K.theo, X$cl.theo, main="Theoretical classification") g2 <- Gplot(X$K.theo, res$cl, main="IC classification", coord=g1) print(table(X$cl.theo,res$cl))