f1
Description
API
f1([initialState={truePositives: 0, falsePositives: 0, falseNegatives: 0}])Since
Parameters
Options
Returns
Examples
Last updated
f1([initialState={truePositives: 0, falsePositives: 0, falseNegatives: 0}])Last updated
import { from } from 'rxjs';
import { skip } from 'rxjs/operators';
import { f1 } from '@buccaneer/rxjs-stats';
const items = [
[0, 1], // [trueLabel, predictedLabel]
[1, 0],
[1, 0],
[0, 0],
[0, 0],
[1, 1],
[1, 1],
[1, 1],
[1, 1],
[1, 1],
];
const f1$ = from(items).pipe(
f1(),
skip(4)
);
f1$.subscribe(console.log);
// Output
// 0.4
// 0.571429
// 0.666667
// 0.727273
// 0.769231