Skip to content

Commit 7d0e553

Browse files
committed
Pushing the docs to dev/ for branch: main, commit f083a12630108d60ed29ca8ca03166d0777099e9
1 parent 2dc884d commit 7d0e553

File tree

1,214 files changed

+4700
-4491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,214 files changed

+4700
-4491
lines changed
Binary file not shown.

dev/_downloads/2c8efe31be0d68b7945dbfbff0788dd3/plot_prediction_latency.ipynb

Lines changed: 73 additions & 1 deletion
Large diffs are not rendered by default.

dev/_downloads/5f054219fb38e926537d741fe5832e8c/plot_prediction_latency.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def _not_in_sphinx():
3838
return "__file__" in globals()
3939

4040

41+
# %%
42+
# Benchmark and plot helper functions
43+
# -----------------------------------
44+
45+
4146
def atomic_benchmark_estimator(estimator, X_test, verbose=False):
4247
"""Measure runtime prediction of each instance."""
4348
n_instances = X_test.shape[0]
@@ -289,13 +294,10 @@ def plot_benchmark_throughput(throughputs, configuration):
289294
plt.show()
290295

291296

292-
# #############################################################################
293-
# Main code
294-
295-
start_time = time.time()
296-
297-
# #############################################################################
297+
# %%
298298
# Benchmark bulk/atomic prediction speed for various regressors
299+
# -------------------------------------------------------------
300+
299301
configuration = {
300302
"n_train": int(1e3),
301303
"n_test": int(1e2),
@@ -325,7 +327,10 @@ def plot_benchmark_throughput(throughputs, configuration):
325327
}
326328
benchmark(configuration)
327329

328-
# benchmark n_features influence on prediction speed
330+
# %%
331+
# Benchmark n_features influence on prediction speed
332+
# --------------------------------------------------
333+
329334
percentile = 90
330335
percentiles = n_feature_influence(
331336
{"ridge": Ridge()},
@@ -336,9 +341,9 @@ def plot_benchmark_throughput(throughputs, configuration):
336341
)
337342
plot_n_features_influence(percentiles, percentile)
338343

339-
# benchmark throughput
344+
# %%
345+
# Benchmark throughput
346+
# --------------------
347+
340348
throughputs = benchmark_throughputs(configuration)
341349
plot_benchmark_throughput(throughputs, configuration)
342-
343-
stop_time = time.time()
344-
print("example run in %.2fs" % (stop_time - start_time))
Binary file not shown.

dev/_downloads/scikit-learn-docs.zip

-1.65 KB
Binary file not shown.

0 commit comments

Comments
 (0)