Skip to contents

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)

Arguments

gr

The input graph

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.

Examples

library(igraph)
gr <- sample_pa(10000, power = 1.2, directed = FALSE)
sparse <- extract_sparse(gr)
sparse$phat
#> [1] 0.25958062 0.19595083 0.17498192 0.14533623 0.06507592 0.06362979 0.05856833
#> [8] 0.03687636