Skip to content

Commit

Permalink
Merge pull request JuliaAI#131 from barucden/master
Browse files Browse the repository at this point in the history
Allow fitting using AbstractMatrix instead of Matrix
  • Loading branch information
bensadeghi committed Aug 6, 2020
2 parents 6db23fc + 6baf10b commit 51461fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/classification/tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module treeclassifier
end

function _fit(
X :: Matrix{S},
X :: AbstractMatrix{S},
Y :: AbstractVector{Int},
W :: AbstractVector{U},
loss :: Function,
Expand Down Expand Up @@ -304,7 +304,7 @@ module treeclassifier
end

function fit(;
X :: Matrix{S},
X :: AbstractMatrix{S},
Y :: AbstractVector{T},
W :: Union{Nothing, AbstractVector{U}},
loss=util.entropy :: Function,
Expand Down
4 changes: 2 additions & 2 deletions src/regression/tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ module treeregressor
end

function _fit(
X :: Matrix{S},
X :: AbstractMatrix{S},
Y :: AbstractVector{Float64},
W :: AbstractVector{U},
max_features :: Int,
Expand Down Expand Up @@ -303,7 +303,7 @@ module treeregressor
end

function fit(;
X :: Matrix{S},
X :: AbstractMatrix{S},
Y :: AbstractVector{Float64},
W :: Union{Nothing, AbstractVector{U}},
max_features :: Int,
Expand Down

0 comments on commit 51461fd

Please sign in to comment.