File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
name = " MLJOpenML"
2
2
uuid = " cbea4545-8c96-4583-ad3a-44078d60d369"
3
3
authors = [
" Anthony D. Blaom <[email protected] >" ]
4
- version = " 1.1 .0"
4
+ version = " 2.0 .0"
5
5
6
6
[deps ]
7
7
ARFFFiles = " da404889-ca92-49ff-9e8b-0aa6b4d38dc8"
Original file line number Diff line number Diff line change @@ -45,10 +45,13 @@ function load_Dataset_Description(id::Int; api_key::String="")
45
45
end
46
46
47
47
"""
48
- MLJOpenML.load(id; verbosity = 1, parser = :csv, kwargs... )
48
+ MLJOpenML.load(id; parser = :arff )
49
49
50
50
Load the OpenML dataset with specified `id`, from those listed by
51
51
[`list_datasets`](@ref) or on the [OpenML site](https://www.openml.org/search?type=data).
52
+ With `parser = :arff` (default) the ARFFFiles.jl parser is used.
53
+ With `parser = :auto` the output of the ARFFFiles parser is coerced to
54
+ automatically detected scientific types.
52
55
53
56
Returns a table.
54
57
@@ -60,10 +63,15 @@ table = MLJOpenML.load(61);
60
63
df = DataFrame(table);
61
64
```
62
65
"""
63
- function load (id:: Int ; verbosity = 1 , parser = :csv , kwargs ... )
66
+ function load (id:: Int ; parser = :arff )
64
67
response = load_Dataset_Description (id)
65
68
arff_file = HTTP. request (" GET" , response[" data_set_description" ][" url" ])
66
- return ARFFFiles. load (IOBuffer (arff_file. body))
69
+ data = ARFFFiles. load (IOBuffer (arff_file. body))
70
+ if parser == :auto
71
+ return coerce (data, autotype (data))
72
+ else
73
+ return data
74
+ end
67
75
end
68
76
69
77
You can’t perform that action at this time.
0 commit comments