-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Node max_freq | ||
C 0.75 | ||
E 0.75 | ||
D 0.75 | ||
F 0.75 | ||
A 0.5 | ||
B 0.5 | ||
L 0.5 | ||
M 0.5 | ||
O 0.25 | ||
P 0.25 | ||
N 0.25 | ||
Q 0.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Node1 Node2 Frequency Direction | ||
A B 0.5 U | ||
C D 0.75 U | ||
E F 0.75 U | ||
L M 0.5 U | ||
M N 0.25 U | ||
O P 0.25 U | ||
P Q 0.25 U | ||
A B 0.25 D | ||
B A 0.25 D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import filecmp | ||
from pathlib import Path | ||
|
||
import pandas as pd | ||
import pytest | ||
|
||
from spras.evaluation import Evaluation | ||
|
||
INPUT_DIR = 'test/evaluate/input/' | ||
OUT_DIR = 'test/evaluate/output/' | ||
EXPECT_DIR = 'test/evaluate/expected/' | ||
|
||
|
||
class TestEvaluate: | ||
@classmethod | ||
def setup_class(cls): | ||
""" | ||
Create the expected output directory | ||
""" | ||
Path(OUT_DIR).mkdir(parents=True, exist_ok=True) | ||
|
||
def test_node_ensemble(self): | ||
ensemble_file = INPUT_DIR + 'ensemble-network.tsv' | ||
edge_freq = Evaluation.edge_frequency_node_ensemble(ensemble_file) | ||
edge_freq.to_csv(OUT_DIR + 'node-ensemble.csv', sep="\t", index=False) | ||
assert filecmp.cmp(OUT_DIR + 'node-ensemble.csv', EXPECT_DIR + 'expected-node-ensemble.csv', shallow=False) | ||
|
||
def test_PRC_node_ensemble(self): | ||
None | ||
|
||
def test_precision_and_recall(self): | ||
None | ||
|
||
def test_pca_chosen_pathway(self): | ||
None | ||
|