Learn R Programming

graphonmix (version 0.0.1.0)

extract_sparse: Extracts the sparse part from a (U,W) graphon mixture

Description

This function extracts the sparse component from a (U,W) mixture graph by fitting two lines to the unique sorted log degree values. The first line gives the number of hubs in the sparse part and the remaining line fits the degrees of the dense part.

Usage

extract_sparse(gr)

Value

a list with the following components:

num_hubs

The number of hubs in the sparse component.

phat

The probability vector of the sparse component. This is also known as the mass partition.

segment_sizes

The sizes of the two line segments.

line_equations

The two equations of the lines.

cutoff

The best cut off for the two lines.

models

The models of the fitted lines.

mse

The mean squared error

data

The degree data.

Arguments

gr

The input graph

Examples

Run this code
library(igraph)
gr <- sample_pa(10000, power = 1.2, directed = FALSE)
sparse <- extract_sparse(gr)
sparse$phat

Run the code above in your browser using DataLab