Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linkprediction_depo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jacques Fize
linkprediction_depo
Commits
eec1b67b
Commit
eec1b67b
authored
4 years ago
by
Fize Jacques
Browse files
Options
Downloads
Patches
Plain Diff
Update parameters theoric
parent
586701ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generate_theoric_random_graph.py
+4
-29
4 additions, 29 deletions
generate_theoric_random_graph.py
with
4 additions
and
29 deletions
generate_theoric_random_graph.py
+
4
−
29
View file @
eec1b67b
...
@@ -43,7 +43,7 @@ parameters = {
...
@@ -43,7 +43,7 @@ parameters = {
},
},
"
fast_gnp_random_graph
"
:
{
"
fast_gnp_random_graph
"
:
{
"
n
"
:
GRAPH_SIZE
,
"
n
"
:
GRAPH_SIZE
,
"
p
"
:
[
0.
1
,
0.
4
,
0.6
]
"
p
"
:
[
0.4
,
0.6
]
},
},
"
random_powerlaw_tree_sequence
"
:
{
# configuration_model
"
random_powerlaw_tree_sequence
"
:
{
# configuration_model
"
n
"
:
GRAPH_SIZE
,
"
n
"
:
GRAPH_SIZE
,
...
@@ -55,12 +55,12 @@ parameters = {
...
@@ -55,12 +55,12 @@ parameters = {
},
},
"
waxman_graph
"
:
{
"
waxman_graph
"
:
{
"
n
"
:
GRAPH_SIZE
,
"
n
"
:
GRAPH_SIZE
,
"
beta
"
:
[
0.
1
,
0.
4
,
0.6
],
"
beta
"
:
[
0.4
,
0.6
],
"
alpha
"
:
[
0.
1
,
0.
4
,
0.6
]
"
alpha
"
:
[
0.4
,
0.6
]
},
},
"
geographical_threshold_graph
"
:
{
"
geographical_threshold_graph
"
:
{
"
n
"
:
GRAPH_SIZE
,
"
n
"
:
GRAPH_SIZE
,
"
theta
"
:
[
0.
1
,
0.
2
,
0.3
]
"
theta
"
:
[
0.2
,
0.3
]
},
},
}
}
# Generating transition matrices for stochastic block model
# Generating transition matrices for stochastic block model
...
@@ -96,28 +96,3 @@ for method,args in pbar:
...
@@ -96,28 +96,3 @@ for method,args in pbar:
# print(e)
# print(e)
"""
nx.planted_partition_graph(5, 5, 0.8,
0.1) # nb of blocks, nb of vertices in each block, probability of link in block , prob. of link between blocks
nx.stochastic_block_model([5, 3, 6],
[[1, 0.1, 0.1], [0.1, 1, 0.1], [0.1, 0.1, 1]]) # sizes of blocks,probability between blocks
## Random Graph
nx.fast_gnp_random_graph(10, 0.5) # nb of nodes, prob of link
sequence = nx.random_powerlaw_tree_sequence(50, tries=500) # degree sequence
G = nx.configuration_model(sequence) # sequence
## Spatial graph
nx.random_geometric_graph(20, 0.5) # size of graph, max radius between edge connected
dist = lambda x, y: sum(abs(a - b) for a, b in zip(x, y)) # euclidian distance
G = nx.waxman_graph(50, 0.5, 0.1, metric=dist) # nb of nodes, beta, alpha
# beta -> the higher the parameter the higher the density is
# alpha -> the lower the higher the number of short edge is
G = nx.geographical_threshold_graph(20, 1, metric=dist) # nb of node, theta
# theta --> distance thresold
"""
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment