Skip to content

Commit 1cd82ed

Browse files
fixes
1 parent f87b4e2 commit 1cd82ed

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Dataset | Classes | `traintensor` | `trainlabels` | `testtensor` | `testlabels`
7979
### Misc. Datasets
8080
Dataset | Classes | `traintensor` | `trainlabels` | `testtensor` | `testlabels`
8181
:------:|:-------:|:-------------:|:-------------:|:------------:|:------------:
82-
[**Iris**](@ref Iris) | 3 | 4x150 | 150 | - | -
82+
**Iris** | 3 | 4x150 | 150 | - | -
8383

8484
### Language Modeling
8585

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Dataset | Classes | `traintensor` | `trainlabels` | `testtensor` | `testlabels`
8181
### Misc. Datasets
8282
Dataset | Classes | `traintensor` | `trainlabels` | `testtensor` | `testlabels`
8383
:------:|:-------:|:-------------:|:-------------:|:------------:|:------------:
84-
[**Iris**](@ref Iris) | 3 | 4x150 | 150 | - | -
84+
**Iris** | 3 | 4x150 | 150 | - | -
8585

8686
### Language Modeling
8787

src/Iris/Iris.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using DataDeps
2828
using ..MLDatasets: bytes_to_type, datafile, download_dep, download_docstring
2929
using DelimitedFiles
3030

31-
export data, names, download
31+
export features, labels, download
3232

3333
const DEPNAME = "Iris"
3434
const LINK = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/"
@@ -68,7 +68,7 @@ end
6868
Return a string vector of length 150 containing observations' labels.
6969
"""
7070

71-
function trainlabels(; dir = nothing)
71+
function labels(; dir = nothing)
7272
path = datafile(DEPNAME, DATA, dir)
7373
iris = readdlm(path, ',')
7474
Vector{String}(iris[:, end])
@@ -79,7 +79,7 @@ end
7979
8080
Return a 4x150 matrix containing the 4-dimensional features of each observation.
8181
"""
82-
function traintensor(; dir = nothing)
82+
function features(; dir = nothing)
8383
path = datafile(DEPNAME, DATA, dir)
8484
iris = readdlm(path, ',')
8585
Matrix{Float64}(iris[:, 1:4])' |> collect

test/tst_iris.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ using Test
33
using MLDatasets
44

55
@testset "Iris" begin
6-
X = Iris.traintensor()
7-
Y = Iris.trainlabels()
6+
X = Iris.features()
7+
Y = Iris.labels()
88
@test X isa Matrix{Float64}
99
@test Y isa Vector{String}
1010
@test size(X) == (4, 150)

0 commit comments

Comments
 (0)