Skip to content

Commit

Permalink
update 2 for SKL fit! routines for regression
Browse files Browse the repository at this point in the history
  • Loading branch information
bensadeghi committed Jun 21, 2018
1 parent 8824f03 commit adf7457
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scikitlearnAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end
[:pruning_purity_threshold, :min_samples_leaf, :nsubfeatures,
:max_depth, :min_samples_split, :min_purity_increase, :rng])

function fit!{T<:Real}(dt::DecisionTreeRegressor, X::Matrix, y::Vector{T})
function fit!(dt::DecisionTreeRegressor, X::Matrix, y::Vector)
dt.root = build_tree(float.(y), X, dt.min_samples_leaf,
dt.nsubfeatures, dt.max_depth, dt.min_samples_split, dt.min_purity_increase; rng=dt.rng)
if dt.pruning_purity_threshold < 1.0
Expand Down Expand Up @@ -250,7 +250,7 @@ end
# since it'll change throughout fitting, but it works
:max_depth, :rng])

function fit!{T<:Real}(rf::RandomForestRegressor, X::Matrix, y::Vector{T})
function fit!(rf::RandomForestRegressor, X::Matrix, y::Vector)
rf.ensemble = build_forest(float.(y), X, rf.nsubfeatures,
rf.ntrees, rf.min_samples_leaf, rf.partialsampling,
rf.max_depth; rng=rf.rng)
Expand Down

0 comments on commit adf7457

Please sign in to comment.