modularity-0.2.1.0: Find the modularity of a network.

Math.Modularity.Eigen.Sparse

Synopsis

# Documentation

getModularity :: LabelVector -> AdjacencyMatrix -> Q Source #

Find modularity from a vector of community labels (0 or 1) corresponding to rows in the adjacency matrix. Needs 0s on the diagonal for the adjacency matrix.

getBModularity :: LabelVector -> B -> Q Source #

Find modularity from a vector of community labels (0 or 1) corresponding to rows in the normalized matrix B. See Shu et al., "Efficient Spectral Neighborhood Blocking for Entity Resolution", 2011. L = sum_i^n sum_j^n A(i,j) - n = 1^TA1 - n = (B^T1)^T(B^T1) - n.

newtype Q Source #

Constructors

 Q FieldsunQ :: Double
Instances
 Source # Instance detailsDefined in Math.Modularity.Types Methods(==) :: Q -> Q -> Bool #(/=) :: Q -> Q -> Bool # Source # Instance detailsDefined in Math.Modularity.Types Methods(+) :: Q -> Q -> Q #(-) :: Q -> Q -> Q #(*) :: Q -> Q -> Q #negate :: Q -> Q #abs :: Q -> Q #signum :: Q -> Q # Source # Instance detailsDefined in Math.Modularity.Types Methodscompare :: Q -> Q -> Ordering #(<) :: Q -> Q -> Bool #(<=) :: Q -> Q -> Bool #(>) :: Q -> Q -> Bool #(>=) :: Q -> Q -> Bool #max :: Q -> Q -> Q #min :: Q -> Q -> Q # Source # Instance detailsDefined in Math.Modularity.Types MethodsreadList :: ReadS [Q] # Source # Instance detailsDefined in Math.Modularity.Types MethodsshowsPrec :: Int -> Q -> ShowS #show :: Q -> String #showList :: [Q] -> ShowS # Source # Instance detailsDefined in Math.Modularity.Types Associated Typestype Rep Q :: Type -> Type # Methodsfrom :: Q -> Rep Q x #to :: Rep Q x -> Q # type Rep Q Source # Instance detailsDefined in Math.Modularity.Types type Rep Q = D1 (MetaData "Q" "Math.Modularity.Types" "modularity-0.2.1.0-4spVLWTRJ9dCDjmdN9os2B" True) (C1 (MetaCons "Q" PrefixI True) (S1 (MetaSel (Just "unQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))

testModularity :: (Bool, Q, Q) Source #

Test whether getModularity BB^T is the same as getBModularity B.