seqgra.comparator.roccomparator module¶
Creates ROC curves of different models
- Classes:
ROCComparator
: creates ROC curves from various grammars and architectures
- class ROCComparator(analysis_id: str, output_dir: str, model_labels: Optional[List[str]] = None, silent: bool = False)[source]¶
Bases:
seqgra.comparator.comparator.Comparator
- compare_models(grammar_ids: Optional[List[str]] = None, model_ids: Optional[List[str]] = None, set_names: Optional[List[str]] = None) → None[source]¶
- create_roc_curve(fpr: List[List[float]], tpr: List[List[float]], roc_auc: List[float], model_labels: List[str], file_name: str) → None[source]¶
- create_single_roc_curve(y_true, y_hat) → None[source]¶
Create ROC curve.
Plots ROC curves for each class label, including micro-average and macro-average. Saves plot as PDF in file_name.
- Parameters
y_true (array) – TODO ; shape = [n_samples, n_classes]
y_hat (array) – TODO ; shape = [n_samples, n_classes]
- get_labels(grammar_id: str, model_id: str, set_name: str) → int¶