madeleineudell / LowRankModels.jl

LowRankModels.jl is a julia package for modeling and fitting generalized low rank models.
Other
190 stars 65 forks source link

expand_categoricals function not working #84

Closed milanhej closed 5 years ago

milanhej commented 6 years ago

Enjoyed the H2O presentation and paper, given my research interests, but new to Julia.

The expand_categoricals function appears not to be working. Here's an illustrative example in Julia 0.6.2

julia> using DataFrames julia> using LowRankModels julia> df = DataFrame(A = 1:4, gender = ["M", "F", "F", "M"]) 4×2 DataFrames.DataFrame │ Row │ A │ gender │ ├─────┼───┼────────┤ │ 1 │ 1 │ M │ │ 2 │ 2 │ F │ │ 3 │ 3 │ F │ │ 4 │ 4 │ M │

julia> expand_categoricals!(df, [:gender])

ERROR: UndefVarError: symbol not defined Stacktrace: [1] expand_categoricals!(::DataFrames.DataFrame, ::Array{Int64,1}) at /Users/research/.julia/v0.6/LowRankModels/src/fit_dataframe.jl:250 [2] expand_categoricals!(::DataFrames.DataFrame, ::Array{Symbol,1}) at /Users/research/.julia/v0.6/LowRankModels/src/fit_dataframe.jl:268

Is there a simple solution? Thanks!

madeleineudell commented 5 years ago

expand_categoricals! is deprecated. Use the OvALoss or MultinomialLoss instead to fit categorical data.

milanhej commented 5 years ago

Thanks for the notification. I much enjoyed your presentation at JuliaCon 2019, on youtube only, alas. It greatly renewed my interest in using low rank models for a large, messy historical data set.