Skip to content

Commit 165392e

Browse files
committed
misc
1 parent ce45d36 commit 165392e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sklearn/ensemble/iforest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,22 +197,20 @@ def predict(self, X):
197197
198198
Parameters
199199
----------
200-
X : array-like or sparse matrix of shape (n_samples, n_features)
200+
X : array-like or sparse matrix, shape (n_samples, n_features)
201201
The input samples. Internally, it will be converted to
202202
``dtype=np.float32`` and if a sparse matrix is provided
203203
to a sparse ``csr_matrix``.
204204
205205
Returns
206206
-------
207-
is_inlier : array, shape = (n_samples, )
207+
is_inlier : array, shape (n_samples,)
208208
For each observations, tells whether or not (+1 or -1) it should
209209
be considered as an inlier according to the fitted model.
210-
211210
"""
212211
X = check_array(X, accept_sparse='csr')
213212
is_inlier = np.ones(X.shape[0], dtype=int)
214213
is_inlier[self.decision_function(X) <= self.threshold_] = -1
215-
216214
return is_inlier
217215

218216
def decision_function(self, X):

0 commit comments

Comments
 (0)