Skip to content

Commit

Permalink
Merge pull request #208 from rafaqz/threading_docs
Browse files Browse the repository at this point in the history
document use_multithreading keyword
  • Loading branch information
ablaom authored Jan 16, 2023
2 parents 835f3cd + bf0ef4a commit f57a156
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/classification/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function prune_tree(
end



apply_tree(leaf::Leaf, feature::AbstractVector) = leaf.majority
apply_tree(
tree::Root{S, T},
Expand Down Expand Up @@ -447,6 +448,15 @@ function apply_forest(forest::Ensemble{S, T}, features::AbstractVector{S}) where
end
end

"""
apply_forest(forest::Ensemble, features::AbstractMatrix; use_multithreading=false)
Apply learned model `forest` to `features`.
# Keywords
- `use_multithreading::Bool`: `true` to use multiple cores, if available. `false` by default.
"""
function apply_forest(
forest::Ensemble{S, T},
features::AbstractMatrix{S};
Expand Down

0 comments on commit f57a156

Please sign in to comment.