Skip to content
Merged
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
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