Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -214,8 +214,12 @@
Loading
214 214
        cv = check_cv(self.cv, y, is_classifier(self.estimator))
215 215
        feature_importances = []  # type: List
216 216
        base_scores = []  # type: List[float]
217 +
        weights = fit_params.pop('sample_weight', None)
218 +
        fold_fit_params = fit_params.copy()
217 219
        for train, test in cv.split(X, y, groups):
218 -
            est = clone(self.estimator).fit(X[train], y[train], **fit_params)
220 +
            if weights is not None:
221 +
                fold_fit_params['sample_weight'] = weights[train]
222 +
            est = clone(self.estimator).fit(X[train], y[train], **fold_fit_params)
219 223
            score_func = partial(self.scorer_, est)
220 224
            _base_score, _importances = self._get_score_importances(
221 225
                score_func, X[test], y[test])
Files Coverage
eli5 97.33%
Project Totals (49 files) 97.33%
1076.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py27
1075.8
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-legacy
1075.11
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37-nodeps
1076.8
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-legacy
1076.6
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36
1075.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py27
1075.5
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35-nodeps
1075.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35
1075.6
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36
1075.2
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py27-extra
1074.6
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36
1074.8
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-legacy
1096.5
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35-nodeps
1096.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35
1082.11
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37-nodeps
1096.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py27
1082.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35
1082.8
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36-legacy
1082.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py27
1082.5
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35-nodeps