Learn R Programming

missSBM (version 0.3.0)

partlyObservedNetwork: An R6 Class used for internal representation of a partially observed network

Description

An R6 Class used for internal representation of a partially observed network

An R6 Class used for internal representation of a partially observed network

Arguments

Active bindings

samplingRate

The percentage of observed dyads

nbNodes

The number of nodes

nbDyads

The number of dyads

is_directed

logical indicating if the network is directed or not

netMatrix

The adjacency matrix of the network

covarArray

the array of covariates

covarMatrix

the matrix of covariates

dyads

a list of potential dyads in the network

missingDyads

array indices of missing dyads

observedDyads

array indices of observed dyads

samplingMatrix

matrix of observed and non-observed edges

observedNodes

a vector of observed and non-observed nodes

NAs

boolean for NA entries in the adjacencyMatrix

Methods

Public methods

Method new()

constructor

Usage

partlyObservedNetwork$new(
  adjacencyMatrix,
  covariates = NULL,
  similarity = missSBM:::l1_similarity
)

Arguments

adjacencyMatrix

The adjacency matrix of the network

covariates

A list with M entries (the M covariates), each of whom being either a size-N vector or N x N matrix.

similarity

An R x R -> R function to compute similarities between node covariates. Default is l1_similarity, that is, -abs(x-y).

Method clustering()

method to cluster network data with missing value

Usage

partlyObservedNetwork$clustering(
  nbBlocks,
  method = c("hierarchical", "spectral", "kmeans")
)

Arguments

nbBlocks

integer, the chosen number of blocks

method

character with a clustering method among "hierarchical", "spectral", "kmeans".

Method imputation()

basic imputation from existing clustering

Usage

partlyObservedNetwork$imputation(clustering)

Arguments

clustering

a vector with size ncol(adjacencyMatrix), providing a user-defined clustering with nbBlocks levels.

Returns

an adjacency matrix with imputed values

Method clone()

The objects of this class are cloneable with this method.

Usage

partlyObservedNetwork$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

This class is not exported to the user