Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_optimal_cache_size(n_rows, dtype=np.double, max_cache=64):


def parse_args(parser, size=None, loop_types=(),
n_jobs_supported=False, prefix='sklearn'):
n_jobs_supported=True, prefix='sklearn'):
'''
Add common arguments useful for most benchmarks and parse.

Expand Down
3 changes: 1 addition & 2 deletions configs/skl_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@
"num-trees": [50],
"max-depth": [16],
"max-leaf-nodes": [131072],
"max-features": [0.2],
"use-sklearn-class": [""]
"max-features": [0.2]
},
{
"algorithm": "ridge",
Expand Down
2 changes: 1 addition & 1 deletion sklearn_bench/dbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
parser.add_argument('-m', '--min-samples', default=5, type=int,
help='The minimum number of samples required in a '
'neighborhood to consider a point a core point')
params = bench.parse_args(parser, n_jobs_supported=True)
params = bench.parse_args(parser)

from sklearn.cluster import DBSCAN

Expand Down
3 changes: 2 additions & 1 deletion sklearn_bench/df_clsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
max_leaf_nodes=params.max_leaf_nodes,
min_impurity_decrease=params.min_impurity_decrease,
bootstrap=params.bootstrap,
random_state=params.seed)
random_state=params.seed,
n_jobs=params.n_jobs)

params.n_classes = len(np.unique(y_train))

Expand Down
3 changes: 2 additions & 1 deletion sklearn_bench/df_regr.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
max_leaf_nodes=params.max_leaf_nodes,
min_impurity_decrease=params.min_impurity_decrease,
bootstrap=params.bootstrap,
random_state=params.seed)
random_state=params.seed,
n_jobs=params.n_jobs)

fit_time, _ = bench.measure_function_time(regr.fit, X_train, y_train, params=params)

Expand Down
3 changes: 2 additions & 1 deletion sklearn_bench/knn_clsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
knn_clsf = KNeighborsClassifier(n_neighbors=params.n_neighbors,
weights=params.weights,
algorithm=params.method,
metric=params.metric)
metric=params.metric,
n_jobs=params.n_jobs)

# Measure time and accuracy on fitting
train_time, _ = bench.measure_function_time(knn_clsf.fit, X_train, y_train, params=params)
Expand Down