nichecompass.train.eval_metrics

nichecompass.train.eval_metrics(edge_recon_probs, edge_labels, edge_same_cat_covariates_cat=None, edge_incl=None, omics_pred_dict=None)

Get the evaluation metrics for a (balanced) sample of positive and negative edges and a sample of nodes.

Parameters:
  • edge_recon_probs (Union[Tensor, ndarray]) – Tensor or array containing reconstructed edge probabilities.

  • edge_labels (Union[Tensor, ndarray]) – Tensor or array containing ground truth labels of edges.

  • edge_incl (Union[Tensor, ndarray, None] (default: None)) – Boolean tensor or array indicating whether the edge should be included in the evaluation.

  • target_rna_preds – Tensor or array containing the predicted gene expression.

  • target_rna – Tensor or array containing the ground truth gene expression.

  • source_rna_preds – Tensor or array containing the predicted gene expression.

  • source_rna – Tensor or array containing the ground truth gene expression.

  • chrom_access_preds – Tensor or array containing the predicted chromatin accessibility.

  • chrom_access – Tensor or array containing the ground truth chromatin accessibility.

Return type:

dict

Returns:

eval_dict: Dictionary containing the evaluation metrics ´auroc_score´ (area under the receiver operating characteristic curve), ´auprc score´ (area under the precision-recall curve), ´best_acc_score´ (accuracy under optimal classification threshold) and ´best_f1_score´ (F1 score under optimal classification threshold).