Skip to content

Commit

Permalink
Add [compat] CSV = "0.5" and remove depreciated allowmissing=:none
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed May 28, 2019
1 parent c94bd5d commit 5e425d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
julia = "1"
CSV = "0.5"
Tables = "<0.1.19, >= 0.2"
julia = "1"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
10 changes: 5 additions & 5 deletions src/datasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ datadir = joinpath(srcdir, "..", "data") # TODO: make OS agnostic
"""Load a well-known public regression dataset with nominal features."""
function load_boston()
df = CSV.read(joinpath(datadir, "Boston.csv"), copycols=true,
categorical=true, allowmissing=:none)
categorical=true)
return SupervisedTask(verbosity=0, data=df,
target=:MedV,
ignore=[:Chas,],
Expand All @@ -14,7 +14,7 @@ end
having six numerical and six categorical features."""
function load_reduced_ames()
df = CSV.read(joinpath(datadir, "reduced_ames.csv"), copycols=true,
categorical=true, allowmissing=:none)
categorical=true)
df[:target] = exp.(df[:target])
# TODO: uncomment following after julia #29501 is resolved
# df.OverallQual = categorical(df.OverallQual, ordered=true)
Expand All @@ -29,7 +29,7 @@ end
"""Load the full version of the well-known Ames Housing task."""
function load_ames()
df = CSV.read(joinpath(datadir, "ames.csv"), copycols=true,
categorical=true, allowmissing=:none)
categorical=true)
df[:target] = exp.(df[:target])
return SupervisedTask(verbosity=0, data=df,
target=:target,
Expand All @@ -40,7 +40,7 @@ end
"""Load a well-known public classification task with nominal features."""
function load_iris()
df = CSV.read(joinpath(datadir, "iris.csv"), pool=true, copycols=true,
categorical=true, allowmissing=:none)
categorical=true)
return SupervisedTask(verbosity=0, data=df,
target=:target,
is_probabilistic=false)
Expand All @@ -49,7 +49,7 @@ end
"""Load a well-known crab classification dataset with nominal features."""
function load_crabs()
df = CSV.read(joinpath(datadir, "crabs.csv"), pool=true, copycols=true,
categorical=true, allowmissing=:none)
categorical=true)
return SupervisedTask(verbosity=0, data=df,
target=:sp,
ignore=[:sex, :index],
Expand Down

0 comments on commit 5e425d1

Please sign in to comment.