File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -194,13 +194,14 @@ Xtest = Tables.subset(X, test)
194
194
ŷ7 = predict (model, Xtest)
195
195
196
196
# compare with cold restart:
197
- model = fit (LearnAPI. clone (algorithm; n= 7 ), Xtrain, y[train]; verbosity= 0 );
198
- @test ŷ7 ≈ predict (model , Xtest)
197
+ model_cold = fit (LearnAPI. clone (algorithm; n= 7 ), Xtrain, y[train]; verbosity= 0 );
198
+ @test ŷ7 ≈ predict (model_cold , Xtest)
199
199
200
- # test cold restart if another hyperparameter is changed:
200
+ # test that we get a cold restart if another hyperparameter is changed:
201
201
model2 = update (model, Xtrain, y[train]; atom= Ridge (0.05 ))
202
- algorithm2 = LearnAPI. clone (LearnAPI. algorithm (model); atom= Ridge (0.05 ))
203
- @test predict (model, Xtest) ≈ predict (model2, Xtest)
202
+ algorithm2 = Ensemble (Ridge (0.05 ); n= 7 , rng)
203
+ model_cold = fit (algorithm2, Xtrain, y[train]; verbosity= 0 )
204
+ @test predict (model2, Xtest) ≈ predict (model_cold, Xtest)
204
205
205
206
end
206
207
You can’t perform that action at this time.
0 commit comments