Skip to content

Commit d78a6fc

Browse files
committed
rm some redundant code
1 parent 6ccbae4 commit d78a6fc

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

src/MLJTestIntegration.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ using NearestNeighborModels
1010
import MLJTestInterface
1111
const MTI = MLJTestInterface
1212
import MLJTestInterface.attempt
13+
import MLJTestInterface: make_binary, make_multiclass, make_regression, make_count
1314

1415
include("attemptors.jl")
1516
include("test.jl")

src/special_cases.jl

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -39,56 +39,6 @@ end
3939
_test(data; ignore=true, kwargs...) = _test([], data; ignore, kwargs...)
4040

4141

42-
# # BABY DATA SETS
43-
44-
"""
45-
make_binary()
46-
47-
Return data `(X, y)` for the crabs dataset, restricted to the two features `:FL`,
48-
`:RW`. Target is `Multiclass{2}`.
49-
50-
"""
51-
function make_binary()
52-
data = MLJ.load_crabs()
53-
y_, X = unpack(data, ==(:sp), col->col in [:FL, :RW])
54-
y = coerce(y_, MLJ.OrderedFactor)
55-
return X, y
56-
end
57-
58-
"""
59-
make_multiclass()
60-
61-
Return data `(X, y)` for the unshuffled iris dataset. Target is `Multiclass{3}`.
62-
63-
"""
64-
make_multiclass() = MLJ.@load_iris
65-
66-
"""
67-
make_regression()
68-
69-
Return data `(X, y)` for the Boston dataset, restricted to the two features `:LStat`,
70-
`:Rm`. Target is `Continuous`.
71-
72-
"""
73-
function make_regression()
74-
data = MLJ.load_boston()
75-
y, X = unpack(data, ==(:MedV), col->col in [:LStat, :Rm])
76-
return X, y
77-
end
78-
79-
"""
80-
make_count()
81-
82-
Return data `(X, y)` for the Boston dataset, restricted to the two features `:LStat`,
83-
`:Rm`, with the `Continuous` target converted to `Count` (integer).
84-
85-
"""
86-
function make_count()
87-
X, y_ = make_regression()
88-
y = map-> round(Int, η), y_)
89-
return X, y
90-
end
91-
9242

9343
# # SINGLE TARGET CLASSIFICATION
9444

0 commit comments

Comments
 (0)