Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
VEBER Philippe
codepi
Commits
63ab3739
Commit
63ab3739
authored
Mar 02, 2021
by
Philippe Veber
Browse files
Utils: fixed make_prc_dataset
parent
cc080f19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/utils.ml
lib/utils.ml
+3
-4
No files found.
lib/utils.ml
View file @
63ab3739
...
...
@@ -83,16 +83,15 @@ let recall_precision_curve ~labels ~oracle ~results : pdf file =
Workflow
.
path_plugin
~
descr
:
"utils.recall_precision_curve"
f
let
make_prc_dataset
x
y
=
let
min_x
=
Array
.
fold
x
~
init
:
Float
.
neg_
infinity
~
f
:
(
fun
acc
x_i
->
let
min_x
=
Array
.
fold
x
~
init
:
Float
.
infinity
~
f
:
(
fun
acc
x_i
->
Option
.
value_map
~
default
:
acc
x_i
~
f
:
(
Float
.
min
acc
)
)
in
Prc
.
Dataset
(
List
.
init
(
Array
.
length
x
)
~
f
:
(
fun
i
->
match
x
.
(
i
)
,
y
.
(
i
)
with
|
Some
x_i
,
y_i
->
Some
(
x_i
,
y_i
)
|
None
,
y_i
->
Some
(
min_x
,
y_i
)
|
Some
x_i
,
y_i
->
(
x_i
,
y_i
)
|
None
,
y_i
->
(
min_x
,
y_i
)
)
|>
List
.
filter_opt
)
let
average_precision_plot
~
labels
~
oracle
~
results
:
pdf
file
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment