CaMa indicators and follow-up list, model governance page
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { interpretabilityFigures } from './figures';
|
||||
|
||||
describe('governance figures', () => {
|
||||
it('draws a survival report as curves with bands and the model points', () => {
|
||||
const [found] = interpretabilityFigures({
|
||||
kind: 'curves',
|
||||
curves: [
|
||||
{ name: 'Kaplan-Meier', months: [0, 6], survival: [1, 0.9], low: [1, 0.8], high: [1, 1] },
|
||||
],
|
||||
predicted: { name: 'Modelo', months: [6], survival: [0.92], low: [0.85], high: [0.97] },
|
||||
});
|
||||
expect(found.figure.data.length).toBe(3); // band, curve, model points
|
||||
expect((found.figure.data[2] as any).error_y.array[0]).toBeCloseTo(0.05);
|
||||
});
|
||||
|
||||
it('draws nothing for a report it does not know', () => {
|
||||
expect(interpretabilityFigures({ kind: 'other' })).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user