demo D268
ROC curve
See how well a score separates two outcomes, the curve bowing away from a coin toss
type: 'roc', score, label, positive
Loading a live grid…
The configuration
'chart-types-roc': () => ({
rows: [], config: {},
foot: ['the curve bows toward the top left as the score sorts better', 'the diagonal is a coin toss'],
mount: mountGridCharts({
rows: scoreRows(),
columns: [
{ field: 'score', title: 'Score', type: 'number', format: { decimals: 3 } },
{ field: 'fraud', title: 'Actually fraud', type: 'number', filter: { type: 'set' } },
],
columnsPer: 1, chartHeight: 360,
chartTypeModules: ['roc'],
charts: [{ type: 'roc', score: 'score', label: 'fraud', positive: 1, title: 'How well the score separates fraud' }],
}),
}),