projects
/
folded-ctf.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
automatic commit
[folded-ctf.git]
/
tools.h
diff --git
a/tools.h
b/tools.h
index
ec35551
..
ddaa3dd
100644
(file)
--- a/
tools.h
+++ b/
tools.h
@@
-12,16
+12,28
@@
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
// //
-// Written by Francois Fleuret, (C) IDIAP //
+// Written by Francois Fleuret //
+// (C) Idiap Research Institute //
+// //
// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
///////////////////////////////////////////////////////////////////////////
// Contact <francois.fleuret@idiap.ch> 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 <iostream>
#include "misc.h"
#ifndef TOOLS_H
#define TOOLS_H
#include <iostream>
#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,
scalar_t robust_sampling(int nb, scalar_t *weights, int nb_to_sample, int *sampled);
void print_roc_small_pos(ostream *out,