Skip to content

Commit 11aab71

Browse files
Adding tests
Added 1 test for generate_twospirals function.
1 parent 2e9f462 commit 11aab71

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/SyntheticDatasets.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function __init__()
1111
end
1212

1313
include("sklearn.jl")
14+
include("matlab.jl")
1415

1516
function convert(features::Array{T, 2}, labels::Array{D, 1})::DataFrame where {T <: Number, D <: Number}
1617
df = DataFrame()

test/runtests.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,15 @@ using Test
4040
n_features = features,
4141
n_classes = 1)
4242

43-
43+
4444
@test size(data)[1] == samples
4545
@test size(data)[2] == features + 1
4646

47-
end
47+
48+
data = SyntheticDatasets.generate_twospirals(n_samples = samples,
49+
noise = 2.2)
50+
51+
52+
@test size(data)[1] == samples
53+
54+
end

0 commit comments

Comments
 (0)