package prc
Install
Authors
Maintainers
Sources
sha256=898322ef7f722e37f332362a24c1ad5f1bf8f8bb396cdb549fb44d59fc4f769a
sha512=c85fc65530195913b20c7b0e1763938f3d45187ca5510a37514f5dec5b4b903a9e40b7621ce8509cf023f1ccb1045fc09b362d716b2e6340cbd5960919a65efc
Description
This library provides functions to compute precisionrecall curves, as well as several methods to compute their AUC (area under curve)
README
prc library
prc implements a few functions to compute PrecisionRecall curves, and their AUC (area under curve). The implementation is checked against scikitlearn.
Installation
Latest release
opam install prc
Latest commit
opam pin add y prc https://github.com/pveber/prc.git
Motivation
PrecisionRecall curves are a useful representation of the performance of binary classification methods in the case there are many negative items. Problem is they are difficult to estimate from a finite sample. As an illustration, compare the following graph obtained in a particular case where the true precisionrecall curve can be computed analytically (socalled binormal model):
The red curve shows the "true" precisionrecall curve while the grey ones are the empirical estimated obtained from samples of size 1000. We see that there is a lot of variability, particularly in the lowrecall region.
As a consequence, displaying a precisionrecall curve can be misleading, and it is safer to report an estimate of its area under curve (AUC) along with a confidence interval. This is what this library provides.
Quick test
Demo code is available in the demo
directory. To run it, simply launch an interpreter via a dune utop demo
command, and then call functions in Prc_demo
. For instance to get an overview of the sampling distribution of several estimators under the binormal model, just type:
# Prc_demo.estimator_sampling_distribution ~sample_size:1000 ();;
``` This yields:
![demo](img/estimators_sampling_distribution.png)
where each boxplot represents the distribution of an estimator
(resp. binormal, trapezoidal and average precision) for a binormal
model when drawing finite samples of size 1000.
Dependencies (4)
 ppx_jane
 gsl

dune
>= "2.4"

core_kernel
>= "v0.12.0"
Dev Dependencies (3)

sklearn
withtest

ppx_deriving
withtest

alcotest
withtest
Used by
Conflicts (1)

ocamlr
< "0.5.0"