X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=tools.h;h=ddaa3dd472bd417a2671842f543058ca00ec2fd3;hb=71a84ea2658cd96726bcf4e582010c24bf2583cf;hp=99b1ade1a3d1499c5e32506fac5d548b0b182182;hpb=20ec321944108cd1fe74b37ea45db3ba1a2d526a;p=folded-ctf.git diff --git a/tools.h b/tools.h index 99b1ade..ddaa3dd 100644 --- a/tools.h +++ b/tools.h @@ -18,12 +18,22 @@ // Contact for comments & bug reports // /////////////////////////////////////////////////////////////////////////// +/* + + Two handy functions to sample in a very large weighted sample set, + and to generate a ROC curve given a very large sample set. + + */ + #ifndef TOOLS_H #define TOOLS_H #include #include "misc.h" +// This function is not trivial because it has to handle numerical +// pitfalls due to the very large number of samples. + scalar_t robust_sampling(int nb, scalar_t *weights, int nb_to_sample, int *sampled); void print_roc_small_pos(ostream *out,