Use the Julia Decision Tree package (https://github.com/JuliaAI/DecisionTree.jlLinks to…
- User
Use the Julia Decision Tree package (https://github.com/JuliaAI/DecisionTree.jlLinks to an external site.) on the Mushrooms dataset and build a decision tree. Comment on the complexity of the decision tree. For full credit, you must perform a test/train split and evaluate on the test data, reporting your test results
df = CSV.read("C:/Users/sande/Downloads/agaricus-lepiota.data", DataFrame, header = false)
Rename the columns
col_names = ["poisonous","cap-shape","cap-surface","cap-color","bruises","odor","gill-attachment","gill-spacing","gill-size","gill-color","stalk-shape","stalk-root" ,"stalk-surface-above-ring","stalk-surface-below-ring","stalk-color-above-ring","stalk-color-below-ring", "veil-type","veil-color","ring-number","ring-type","spore-print-color","population","habitat"] rename!(df, Symbol.(col_names))
give me the code for the above in julia
- Assistant
- User
ERROR: UndefVarError:
poolnot defined Stacktrace: [1] (::var"#9#11"{String})(c::String1) @ Main .\Untitled-4:21 [2] map(f::var"#9#11"{String}, x::PooledArrays.PooledVector{String1, UInt32, Vector{UInt32}}; pure::Bool) @ PooledArrays C:\Users\sande.julia\packages\PooledArrays\Vy2X0\src\PooledArrays.jl:341 [3] map(f::Function, x::PooledArrays.PooledVector{String1, UInt32, Vector{UInt32}}) @ PooledArrays C:\Users\sande.julia\packages\PooledArrays\Vy2X0\src\PooledArrays.jl:336 [4] top-level scope @ Untitled-4:21 - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.