10000 cosmit · scikit-learn/scikit-learn@27b09f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 27b09f8

Browse files
committed
cosmit
1 parent 3d759a4 commit 27b09f8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sklearn/ensemble/iforest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from __future__ import division
66

77
import numpy as np
8-
from warnings import warn
98

109
from scipy.sparse import issparse
1110

@@ -126,7 +125,7 @@ def fit(self, X, y=None, sample_weight=None):
126125
127126
Parameters
128127
----------
129-
X : array-like or sparse matrix, shape=(n_samples, n_features)
128+
X : array-like or sparse matrix, shape (n_samples, n_features)
130129
The input samples. Use ``dtype=np.float32`` for maximum
131130
efficiency. Sparse matrices are also supported, use sparse
132131
``csc_matrix`` for maximum efficieny.
@@ -151,8 +150,8 @@ def fit(self, X, y=None, sample_weight=None):
151150
# ensure that max_sample is in [1, n_samples]:
152151
n_samples = X.shape[0]
153152
if not (self.max_samples <= n_samples):
154-
raise ValueError("max_samples (default=256) is greater than the total"
155-
" number of samples")
153+
raise ValueError("max_samples (default=256) is greater than the "
154+
"total number of samples")
156155
if not (0 < self.max_samples):
157156
raise ValueError("max_samples has to be positive")
158157

sklearn/ensemble/tests/test_iforest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from sklearn.utils.testing import assert_array_equal
1313
from sklearn.utils.testing import assert_array_almost_equal
1414
from sklearn.utils.testing import assert_raises
15-
from sklearn.utils.testing import assert_warns
1615

1716
from sklearn.grid_search import GridSearchCV, ParameterGrid
1817
from sklearn.ensemble import IsolationForest
@@ -96,7 +95,7 @@ def test_iforest_error():
9695
assert_raises(ValueError,
9796
IsolationForest(max_samples=2.0).fit, X)
9897
assert_raises(ValueError,
99-
IsolationForest(max_samples=1000).fit, X)
98+
IsolationForest(max_samples=1000).fit, X)
10099
# cannot check for string values
101100

102101

0 commit comments

Comments
 (0)
0