Skip to content

Commit f57a156

Browse files
authored
Merge pull request #208 from rafaqz/threading_docs
document use_multithreading keyword
2 parents 835f3cd + bf0ef4a commit f57a156

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/classification/main.jl

+10
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ function prune_tree(
268268
end
269269

270270

271+
271272
apply_tree(leaf::Leaf, feature::AbstractVector) = leaf.majority
272273
apply_tree(
273274
tree::Root{S, T},
@@ -447,6 +448,15 @@ function apply_forest(forest::Ensemble{S, T}, features::AbstractVector{S}) where
447448
end
448449
end
449450

451+
"""
452+
apply_forest(forest::Ensemble, features::AbstractMatrix; use_multithreading=false)
453+
454+
Apply learned model `forest` to `features`.
455+
456+
# Keywords
457+
458+
- `use_multithreading::Bool`: `true` to use multiple cores, if available. `false` by default.
459+
"""
450460
function apply_forest(
451461
forest::Ensemble{S, T},
452462
features::AbstractMatrix{S};

0 commit comments

Comments
 (0)