Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Netbone
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
coregraphie
Netbone
Commits
e0b28076
Commit
e0b28076
authored
1 year ago
by
Yassin
Browse files
Options
Downloads
Patches
Plain Diff
Adding new methods and the consensual backbone extraction
parent
c6721735
No related branches found
No related tags found
1 merge request
!1
Adding new methods and the consensual backbone
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
netbone/__init__.py
+1
-0
1 addition, 0 deletions
netbone/__init__.py
netbone/compare.py
+1
-1
1 addition, 1 deletion
netbone/compare.py
netbone/structural/global_threshold.py
+3
-7
3 additions, 7 deletions
netbone/structural/global_threshold.py
with
5 additions
and
8 deletions
netbone/__init__.py
+
1
−
0
View file @
e0b28076
...
@@ -26,6 +26,7 @@ from netbone.structural.mlam import mlam
...
@@ -26,6 +26,7 @@ from netbone.structural.mlam import mlam
from
netbone.structural.gspar
import
gspar
from
netbone.structural.gspar
import
gspar
from
netbone.structural.degree
import
degree
from
netbone.structural.degree
import
degree
from
netbone.structural.betweenness
import
betweenness
from
netbone.structural.betweenness
import
betweenness
from
netbone.structural.mad
import
mad
# from netbone.statistical.correlation_and_statistic import correlation_and_statistic
# from netbone.statistical.correlation_and_statistic import correlation_and_statistic
from
netbone.filters
import
threshold_filter
,
fraction_filter
from
netbone.filters
import
threshold_filter
,
fraction_filter
...
...
This diff is collapsed.
Click to expand it.
netbone/compare.py
+
1
−
1
View file @
e0b28076
...
@@ -97,7 +97,7 @@ class Compare:
...
@@ -97,7 +97,7 @@ class Compare:
raise
Exception
(
'
Please enter the filter values.
'
)
raise
Exception
(
'
Please enter the filter values.
'
)
cons
=
[]
cons
=
[]
if
consent
==
False
:
if
consent
==
False
:
for
backbon
in
self
.
backbones
:
for
backbon
e
in
self
.
backbones
:
cons
.
append
(
False
)
cons
.
append
(
False
)
consent
=
cons
consent
=
cons
...
...
This diff is collapsed.
Click to expand it.
netbone/structural/global_threshold.py
+
3
−
7
View file @
e0b28076
...
@@ -7,15 +7,11 @@ from netbone.filters import fraction_filter, threshold_filter
...
@@ -7,15 +7,11 @@ from netbone.filters import fraction_filter, threshold_filter
def
global_threshold
(
data
):
def
global_threshold
(
data
):
if
isinstance
(
data
,
DataFrame
):
if
isinstance
(
data
,
DataFrame
):
table
=
data
.
copy
(
)
g
=
nx
.
from_pandas_edgelist
(
data
,
edge_attr
=
edge_properties
(
data
)
)
elif
isinstance
(
data
,
Graph
):
elif
isinstance
(
data
,
Graph
):
table
=
nx
.
to_pandas_edgelist
(
data
)
g
=
data
.
copy
(
)
else
:
else
:
print
(
"
data should be a panads dataframe or nx graph
"
)
print
(
"
data should be a panads dataframe or nx graph
"
)
return
return
table
[
'
score
'
]
=
table
[
'
weight
'
]
return
Backbone
(
g
,
method_name
=
"
Global Threshold Filter
"
,
property_name
=
"
weight
"
,
ascending
=
False
,
compatible_filters
=
[
fraction_filter
,
threshold_filter
],
filter_on
=
'
Edges
'
)
\ No newline at end of file
g
=
nx
.
from_pandas_edgelist
(
table
,
edge_attr
=
edge_properties
(
table
))
return
Backbone
(
g
,
method_name
=
"
Global Threshold Filter
"
,
property_name
=
"
score
"
,
ascending
=
False
,
compatible_filters
=
[
fraction_filter
,
threshold_filter
],
filter_on
=
'
Edges
'
)
\ 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