From 6f6ec7fb00c6bc464203452b2cb5be671885459d Mon Sep 17 00:00:00 2001 From: Tim Head Date: Mon, 9 Nov 2015 14:37:09 +0100 Subject: [PATCH] Reference correct variable --- sklearn/ensemble/bagging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/ensemble/bagging.py b/sklearn/ensemble/bagging.py index c2a65d9120e87..4da44bfd0f20d 100644 --- a/sklearn/ensemble/bagging.py +++ b/sklearn/ensemble/bagging.py @@ -298,7 +298,7 @@ def _fit(self, X, y, max_samples, max_depth=None, sample_weight=None): # if max_samples is float: if not isinstance(max_samples, (numbers.Integral, np.integer)): - max_samples = int(self.max_samples * X.shape[0]) + max_samples = int(max_samples * X.shape[0]) if not (0 < max_samples <= X.shape[0]): raise ValueError("max_samples must be in (0, n_samples]")