@@ -19,17 +19,10 @@ X = NamedTuple{(:x1,:x2,:x3)}((rand(10), rand(10), rand(10)))
1919 @test MLJBase. predict (model, fitresult, X)[7 ]. μ ≈ d. μ
2020 @test MLJBase. predict_mean (model, fitresult, X) ≈ fill (1.5 , 10 )
2121
22- d = MLJModels. info_dict (model)
23- @test d[:input_scitype ] == MLJBase. Table
24- @test d[:target_scitype ] == AbstractVector{MLJBase. Continuous}
25- @test d[:name ] == " ConstantRegressor"
26- @test d[:load_path ] == " MLJModels.ConstantRegressor"
27-
28- d = MLJModels. info_dict (DeterministicConstantRegressor)
29- @test d[:input_scitype ] == MLJBase. Table
30- @test d[:target_scitype ] == AbstractVector{MLJBase. Continuous}
31- @test d[:name ] == " DeterministicConstantRegressor"
32- @test d[:load_path ] == " MLJModels.DeterministicConstantRegressor"
22+ @test MLJBase. input_scitype (model) == MLJBase. Table
23+ @test MLJBase. target_scitype (model) == AbstractVector{MLJBase. Continuous}
24+ @test MLJBase. name (model) == " ConstantRegressor"
25+ @test MLJBase. load_path (model) == " MLJModels.ConstantRegressor"
3326end
3427
3528@testset " Classifier" begin
5952 fitresult, cache, report = MLJBase. fit (model, 1 , X, y, w)
6053 d = MLJBase. UnivariateFinite ([y[1 ], y[2 ], y[4 ]], [1 / 3 , 1 / 4 , 5 / 12 ])
6154
62- d = MLJModels. info_dict (model)
63- @test d[:input_scitype ] == MLJBase. Table
64- @test d[:target_scitype ] == AbstractVector{<: MLJBase.Finite }
65- @test d[:name ] == " ConstantClassifier"
66- @test d[:load_path ] == " MLJModels.ConstantClassifier"
67-
68- d = MLJModels. info_dict (DeterministicConstantClassifier)
69- @test d[:input_scitype ] == MLJBase. Table
70- @test d[:target_scitype ] == AbstractVector{<: MLJBase.Finite }
71- @test d[:name ] == " DeterministicConstantClassifier"
72- @test d[:load_path ] == " MLJModels.DeterministicConstantClassifier"
55+ @test MLJBase. input_scitype (model) == MLJBase. Table
56+ @test MLJBase. target_scitype (model) == AbstractVector{<: MLJBase.Finite }
57+ @test MLJBase. name (model) == " ConstantClassifier"
58+ @test MLJBase. load_path (model) == " MLJModels.ConstantClassifier"
59+
7360end
7461
7562end # module
0 commit comments