Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython_plus_experiments
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julien Jerphanion
cython_plus_experiments
Commits
146eee39
Commit
146eee39
authored
Jun 18, 2021
by
Julien Jerphanion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include leaf_size in benchmark
parent
ea729ebd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
kdtree/benchmarks/benchmark.py
kdtree/benchmarks/benchmark.py
+4
-3
No files found.
kdtree/benchmarks/benchmark.py
View file @
146eee39
...
...
@@ -65,7 +65,7 @@ def benchmark(config, results_folder, bench_name):
bytes_processed_data_query
=
X_test
.
nbytes
t0_
=
time
.
perf_counter
()
sk_tree
=
KDTree
(
X_train
,
leaf_size
=
256
)
sk_tree
=
KDTree
(
X_train
,
leaf_size
=
leaf_size
)
t1_
=
time
.
perf_counter
()
time_elapsed
=
round
(
t1_
-
t0_
,
5
)
...
...
@@ -87,7 +87,7 @@ def benchmark(config, results_folder, bench_name):
print
(
"---"
)
t0_
=
time
.
perf_counter
()
tree
=
kdtree
.
KDTree
(
X_train
,
leaf_size
=
256
)
tree
=
kdtree
.
KDTree
(
X_train
,
leaf_size
=
leaf_size
)
t1_
=
time
.
perf_counter
()
time_elapsed
=
round
(
t1_
-
t0_
,
5
)
...
...
@@ -184,6 +184,7 @@ def report(results_folder, bench_name):
cols
=
[
"n_samples_train"
,
"n_features"
,
"leaf_size"
,
]
df
[
cols
]
=
df
[
cols
].
astype
(
np
.
uint32
)
...
...
@@ -220,7 +221,7 @@ def report(results_folder, bench_name):
f"Euclidean Distance, dtype=np.float64,
{
df
.
trial
.
max
()
+
1
}
trials - Bench. Name:
{
bench_name
}\
n
"
)
title
+=
(
"n_samples_train=%s - n_features=%s"
%
vals
"n_samples_train=%s - n_features=%s
- leaf_size=%s
"
%
vals
)
_
=
fig
.
suptitle
(
title
,
fontsize
=
16
)
plt
.
savefig
(
f"
{
results_folder
}
/
{
bench_name
}
_
{
i
}
.pdf"
,
bbox_inches
=
"tight"
)
...
...
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