Skip to content

Commit 3ee1cb1

Browse files
committed
Test Learners: Store models when there is just one; properly stack them
1 parent fff85a2 commit 3ee1cb1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Orange/widgets/evaluate/owtestlearners.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,8 @@ def __update(self):
723723
rstate = 42
724724
common_args = dict(
725725
store_data=True,
726+
store_models=self.resampling in (OWTestLearners.TestOnTrain,
727+
OWTestLearners.TestOnTest),
726728
preprocessor=self.preprocessor,
727729
)
728730
# items in need of an update
@@ -929,7 +931,7 @@ def is_empty(res):
929931
res.probabilities = np.vstack((x.probabilities, y.probabilities))
930932

931933
if x.models is not None:
932-
res.models = [xm + ym for xm, ym in zip(x.models, y.models)]
934+
res.models = np.hstack((x.models, y.models))
933935
return res
934936

935937

0 commit comments

Comments
 (0)