Skip to content

Commit

Permalink
update doc with describe and markdown to avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiquet committed Jan 30, 2024
1 parent 1c89e41 commit cac9019
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 81 deletions.
11 changes: 1 addition & 10 deletions R/R6Class-BipartiteSBM_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@ BipartiteSBM_fit <-
},
#' @description function to perform optimization
#' @param estimOptions a list of parameters controlling the inference algorithm and model selection. See details.
#' @details The list of parameters \code{estimOptions} essentially tunes the optimization process and the variational EM algorithm, with the following parameters
#' \itemize{
#' \item{"nbCores"}{integer for number of cores used. Default is 2}
#' \item{"verbosity"}{integer for verbosity (0, 1). Default is 1}
#' \item{"plot"}{boolean, should the ICL by dynamically plotted or not. Default is TRUE}
#' \item{"exploreFactor"}{control the exploration of the number of groups}
#' \item{"exploreMin"}{explore at least until exploreMin even if the exploration factor rule is achieved. Default 4. See the package blockmodels for details.}
#' \item{"exploreMin"}{Stop exploration at exploreMax even if the exploration factor rule is not achieved. Default Inf. See the package blockmodels for details.}
#' \item{"fast"}{logical: should approximation be used for Bernoulli model with covariates. Default to \code{TRUE}}
#' }
#' @inherit estimateSimpleSBM details
optimize = function(estimOptions = list()){

if(private$model == 'ZIgaussian') stop("Inference not yet implemented for Bipartite ZI gaussian network")
Expand Down
10 changes: 1 addition & 9 deletions R/R6Class-MultipartiteSBM_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,7 @@ MultipartiteSBM_fit <-
},
#' @description estimation of multipartiteSBM via GREMLINS
#' @param estimOptions options for MultipartiteBM
#' @details The list of parameters \code{estimOptions} essentially tunes the optimization process and the variational EM algorithm, with the following parameters
#' \itemize{
#' \item{"nbCores"}{integer for number of cores used. Default is 2}
#' \item{"verbosity"}{integer for verbosity (0, 1). Default is 1}
#' \item{"nbBlocksRange"}{List of length the number of functional groups, each element supplying the minimal and maximal number of blocks to be explored. The names of the list must be the names of the functional groups. Default value is from 1 to 10)}
#' \item{"initBM"}{Boolean. True if using simple and bipartite SBM as initialisations. Default value = TRUE}
#' \item{"maxiterVEM"}{Number of max. number of iterations in the VEM. Default value = 100}
#' \item{"maxiterVE"}{Number of max. number of iterations in the VE. Default value = 100}
#'}
#' @inherit estimateSimpleSBM details
optimize = function(estimOptions) {

currentOptions <- list(
Expand Down
14 changes: 6 additions & 8 deletions R/R6Class-MultiplexSBM_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ MultiplexSBM_fit <-
#' @description estimation of multipartiteSBM via GREMLINS
#' @param estimOptions options for MultipartiteBM
#' @details The list of parameters \code{estimOptions} essentially tunes the optimization process and the variational EM algorithm, with the following parameters
#' \itemize{
#' \item{"nbCores"}{integer for number of cores used. Default is 2}
#' \item{"verbosity"}{integer for verbosity (0, 1). Default is 1}
#' \item{"nbBlocksRange"}{List of length the number of functional groups, each element supplying the minimal and maximal number of blocks to be explored. The names of the list must be the names of the functional groups. Default value is from 1 to 10)}
#' \item{"initBM"}{Boolean. True if using simple and bipartite SBM as initialisations. Default value = TRUE}
#' \item{"maxiterVEM"}{Number of max. number of iterations in the VEM. Default value = 100}
#' \item{"maxiterVE"}{Number of max. number of iterations in the VE. Default value = 100}
#'}
#' * "nbCores" integer for number of cores used. Default is 2
#' * "verbosity" integer for verbosity (0, 1). Default is 1
#' * "nbBlocksRange" List of length the number of functional groups, each element supplying the minimal and maximal number of blocks to be explored. The names of the list must be the names of the functional groups. Default value is from 1 to 10)
#' * "initBM" Boolean. True if using simple and bipartite SBM as initialisations. Default value = TRUE
#' * "maxiterVEM" Number of max. number of iterations in the VEM. Default value = 100
#' * "maxiterVE" Number of max. number of iterations in the VE. Default value = 100
optimize = function(estimOptions) {

if (self$dependentNetwork == FALSE) {
Expand Down
4 changes: 2 additions & 2 deletions R/R6Class-SBM.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ predict.SBM <- function(object, covarList = object$covarList, theta_p0 = 0, ...)
#' @param plotOptions list with parameters for 'meso' type plot and data type plot. Details are given below
#' @param ... additional parameters for S3 compatibility. Not used
#' @details The list of parameters \code{plotOptions} for the mesoscopic plot is:
#' \itemize{
#' \describe{
#' \item{"seed": }{seed to control the layout}
#' \item{"title": }{character string for the title. Default value is NULL}
#' \item{"layout": }{Default value = NULL}
Expand All @@ -224,7 +224,7 @@ predict.SBM <- function(object, covarList = object$covarList, theta_p0 = 0, ...)
#' \item{"edge.curved": }{Default value is = 0.3.}
#' }
#' For type = 'data' or 'expected plot', the list of parameters \code{plotOptions} is
#' \itemize{
#' \describe{
#' \item{"legend": }{Boolean. Set TRUE if you want to see the legend. Default value is FALSE}
#' \item{"legend.title":}{Boolean. Set TRUE if you want to print the title of the legend. Default value is FALSE}
#' \item{"legend.position":}{Position of the legend. Possible values are 'bottom', 'top','left,'right'. Default value is 'bottom'}
Expand Down
12 changes: 1 addition & 11 deletions R/R6Class-SimpleSBM_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,7 @@ SimpleSBM_fit <-
#--------------------------------------------
#' @description function to perform optimization
#' @param estimOptions a list of parameters controlling the inference algorithm and model selection. See details.
#'
#' @details The list of parameters \code{estimOptions} essentially tunes the optimization process and the variational EM algorithm, with the following parameters
#' \itemize{
#' \item{"nbCores"}{integer for number of cores used. Default is 2}
#' \item{"verbosity"}{integer for verbosity (0, 1). Default is 1}
#' \item{"plot"}{boolean, should the ICL by dynamically plotted or not. Default is TRUE}
#' \item{"exploreFactor"}{control the exploration of the number of groups}
#' \item{"exploreMin"}{explore at least until exploreMin even if the exploration factor rule is achieved. Default 4. See the package blockmodels for details.}
#' \item{"exploreMin"}{Stop exploration at exploreMax even if the exploration factor rule is not achieved. Default Inf. See the package blockmodels for details.}
#' \item{"fast"}{logical: should approximation be used for Bernoulli model with covariates. Default to \code{TRUE}}
#' }
#' @inherit estimateSimpleSBM details
optimize = function(estimOptions = list()){

if(private$model == 'ZIgaussian') stop("Inference not yet implemented for ZI gaussian network")
Expand Down
2 changes: 1 addition & 1 deletion R/estimate.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ estimateSimpleSBM <- function(netMat,
#' @param covariates a list of matrices with same dimension as mat describing covariates at the edge level. No covariate per Default.
#' @param estimOptions a list of parameters controlling the inference algorithm and model selection. See details.
#'
#' @inheritSection estimateSimpleSBM details
#' @inherit estimateSimpleSBM details
#'
#' @return a list with the estimated parameters. See details...
#'
Expand Down
11 changes: 0 additions & 11 deletions man/BipartiteSBM_fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions man/MultipartiteSBM_fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/MultiplexSBM_fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions man/SimpleSBM_fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions man/estimateBipartiteSBM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/plot.SBM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cac9019

Please sign in to comment.