Comments (2)
Hi @My-laniaKeA . The evaluation code is not well documented so I did not to release them here.
For the correlation metrics I pasted the file here:
import numpy as np
from scipy.stats import pearsonr, spearmanr
import insulation as insu
from tqdm import tqdm
def mse(preds, targets):
mse = ((preds - targets) ** 2).mean(axis = (1, 2))
results = list(mse.astype(float))
return results
def insulation_pearson(preds, targets):
scores = []
for pred, target in zip(preds, tqdm(targets)):
pred_insu = np.array(insu.chr_score(pred))
label_insu = np.array(insu.chr_score(target))
nas = np.logical_or(np.isnan(pred_insu), np.isnan(label_insu))
if nas.sum() == len(pred):
scores.append(np.nan)
else:
metric, p_val = pearsonr(pred_insu[~nas], label_insu[~nas])
scores.append(metric)
results = scores
return results
def observed_vs_expected_with_means(preds, targets, preds_mean, targets_mean):
scores = []
for pred, target in zip(preds - preds_mean, tqdm(targets - targets_mean)):
metric, p_val = pearsonr(pred.reshape(-1), target.reshape(-1))
scores.append(metric)
results = scores
return results
def observed_vs_expected(preds, targets):
scores = []
preds_mean = preds.mean(axis = 0, keepdims = True)
targets_mean = targets.mean(axis = 0, keepdims = True)
for pred, target in zip(preds - preds_mean, tqdm(targets - targets_mean)):
metric, p_val = pearsonr(pred.reshape(-1), target.reshape(-1))
scores.append(metric)
results = scores
return results
def distance_stratified_correlation(preds, targets):
scores = []
for pred, target in zip(preds, tqdm(targets)):
distance_list = []
for dis_i in range(len(pred)):
pred_diag_i = np.diagonal(pred, offset = dis_i)
target_diag_i = np.diagonal(target, offset = dis_i)
if len(pred_diag_i) < 2: break
metric, p_val = pearsonr(pred_diag_i, target_diag_i)
distance_list.append(metric)
scores.append(distance_list)
results = scores
return results
If you want the full evaluation pipeline, feel free to shoot me an email ([email protected]) and I can email them over!
from c.origami.
Thank you so much.
from c.origami.
Related Issues (20)
- How to merge the predicted matrix and convert it back to valid pairs ? HOT 2
- `examples/prediction.sh` generates blank Hi-C image for chromosome 15 HOT 2
- Questions about performance comparison with deepC HOT 2
- About comparison with Original HiC matrix HOT 3
- The pre-trained models of other cell types HOT 1
- What method was used in the paper to convert the predictions into valid pairs? HOT 1
- Single-cell ATACseq adaptability HOT 1
- How to balance mcool files. HOT 1
- Using CTCF chip-exo without input HOT 5
- reproduce HOT 4
- insulation score HOT 5
- How to makr trans interaction contacts prediction? HOT 5
- Adding different ChIP-seq during the training phase ? HOT 1
- A problem in the PositionalEncoding model code HOT 3
- Independant chance of returning sequence complement HOT 4
- Training and prediction at 5kb resolution HOT 1
- Issues with Training the C.Origami Model Using Only Sequence Data and Integrating Multi-Species Data
- Issues with Training the C.Origami Model Using Only Sequence Data and Integrating Multi-Species Data HOT 4
- GRAM importance score HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c.origami.