import {
classifierLabel,
featureSetLabel,
TRAINING_META,
type RealModel,
} from '../data/models'
function metric(v: number | null): string {
return v == null ? 'n/a' : v.toFixed(3)
}
// Expandable per-model detail: paper + config + metrics + caveats.
// Shared by the Benchmarking leaderboard and the Detectability model picker.
export default function ModelDetail({ m }: { m: RealModel }) {
return (
{m.paperTitle && (
Source paper: {m.paperTitle}
{m.paperLink && (
<>
{' '}
·{' '}
link ↗
>
)}
)}
- Dataset
-
{m.code} ({m.hcode})
{m.rawMaterial && <> · {m.rawMaterial}>}
- Species
-
{m.species}
{m.taxId && <> · tax {m.taxId}>}
- Enzyme
- {m.enzyme}
- Proteome
-
{m.proteome}{' '}
{m.proteomeApprox && (
approximate
)}
- Classifier
- {classifierLabel(m.bestModel)}
- Feature set
- {featureSetLabel(m.bestFeatureSet)}
- Cross-validation
- {TRAINING_META.cv}
- Negatives
- {TRAINING_META.negatives}
- Positives
- {m.nPos.toLocaleString()}
- Metrics
-
AUROC {metric(m.calibAuroc)}
AUPRC {metric(m.calibAuprc)}
MCC {metric(m.calibMcc)}
F1 {metric(m.calibF1)}
Brier {metric(m.brier)}
ECE {metric(m.ece)}
Grid AUROC {metric(m.gridAuroc)} · tuned CV AUROC {metric(m.tunedCvAuroc)}.
AUROC/AUPRC are out-of-fold calibration values.
{m.flags.length > 0 && (
<>
- Caveats
-
{m.flags.map((fl, i) => (
-
{fl}
))}
>
)}
)
}