Skip to content

Commit

Permalink
Merge pull request #57 from JuliaAI/reformat-tweak
Browse files Browse the repository at this point in the history
Improve handling of row tables by `reformat`
  • Loading branch information
ablaom authored Apr 9, 2024
2 parents 9e3146d + daf06bb commit e8cc25b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJDecisionTreeInterface"
uuid = "c6f25543-311c-4c74-83dc-3ea6d1015661"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.4.1"
version = "0.4.2"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
5 changes: 4 additions & 1 deletion src/MLJDecisionTreeInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ const RandomForestModel = Union{

# # DATA FRONT END

_columnnames(X) = Tables.columnnames(Tables.columns(X)) |> collect
# to get column names based on table access type:
_columnnames(X) = _columnnames(X, Val(Tables.columnaccess(X))) |> collect
_columnnames(X, ::Val{true}) = Tables.columnnames(Tables.columns(X))
_columnnames(X, ::Val{false}) = Tables.columnnames(first(Tables.rows(X)))

# for fit:
MMI.reformat(::Classifier, X, y) =
Expand Down

0 comments on commit e8cc25b

Please sign in to comment.