From f088df14fdbb7d62d1fcf87eef079f779e25e3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Fri, 17 Nov 2023 01:10:46 +0100 Subject: [PATCH] Restore the Creation model position in experiment --- src/Platform/Experiment.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Platform/Experiment.cc b/src/Platform/Experiment.cc index a8d1842..d683815 100644 --- a/src/Platform/Experiment.cc +++ b/src/Platform/Experiment.cc @@ -168,8 +168,8 @@ namespace platform { fold = new StratifiedKFold(nfolds, y, seed); else fold = new KFold(nfolds, y.size(0), seed); - auto clf = Models::instance()->create(model); for (int nfold = 0; nfold < nfolds; nfold++) { + auto clf = Models::instance()->create(model); setModelVersion(clf->getVersion()); if (hyperparameters.size() != 0) { clf->setHyperparameters(hyperparameters); @@ -212,7 +212,6 @@ namespace platform { result.addTimeTest(test_time[item].item()); item++; } - clf.reset(); if (!quiet) std::cout << "end. " << flush; delete fold;