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
Open sidebar
VEBER Philippe
codepi
Commits
b4738c41
Commit
b4738c41
authored
Aug 08, 2018
by
LANORE Vincent
Browse files
Slight refactoring so the last modif is more clear :)
parent
0f88d9ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lib/scripts/generate_pairs.py
lib/scripts/generate_pairs.py
+2
-1
No files found.
lib/scripts/generate_pairs.py
View file @
b4738c41
...
...
@@ -177,7 +177,8 @@ MESSAGE("%s%% of drawn pairs were kept." % data("%.1f" % (100 * nb_ok / nb_it)))
MESSAGE
(
"Post-treatment of pair bins..."
)
for
i
in
range
(
nb_bins
):
pair_bins
[
i
]
=
pair_bins
[
i
].
sort_values
(
by
=
[
"distance"
])
# sort by distance
MESSAGE
(
"Class "
+
data
(
i
)
+
" contains "
+
data
(
pair_bins
[
i
].
groupby
([
"p1"
,
"p2"
]).
size
().
shape
[
0
])
+
" unique oriented pairs."
)
unique_pairs_in_class
=
data
(
pair_bins
[
i
].
groupby
([
"p1"
,
"p2"
]).
size
().
shape
[
0
])
MESSAGE
(
"Class "
+
data
(
i
)
+
" contains "
+
unique_pairs_in_class
+
" unique oriented pairs."
)
plot_bins
=
int
(
float
(
pair_bins
[
i
][
"distance"
].
max
()
-
pair_bins
[
i
][
"distance"
].
min
())
/
0.01
)
plot_bins
=
max
(
1
,
plot_bins
)
pair_bins
[
i
][
"distance"
].
hist
(
bins
=
plot_bins
)
...
...
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