From 60a4031723bc73bd39673c1da6655a30a20a5cf3 Mon Sep 17 00:00:00 2001 From: yiyange Date: Tue, 3 Nov 2020 16:44:12 +0000 Subject: [PATCH 1/2] fix wrong line in fit_predict --- sklearn/neighbors/_lof.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/neighbors/_lof.py b/sklearn/neighbors/_lof.py index e91e3b30ddee8..3c5fd06e03842 100644 --- a/sklearn/neighbors/_lof.py +++ b/sklearn/neighbors/_lof.py @@ -193,7 +193,7 @@ def __init__(self, n_neighbors=20, *, algorithm='auto', leaf_size=30, def fit_predict(self): """Fits the model to the training set X and returns the labels. - **Only available for novelty detection (when novelty is set to True).** + **Only available for outlier detection (when novelty is set to False).** Label is 1 for an inlier and -1 for an outlier according to the LOF score and the contamination parameter. From 3799ab82d3a0b2a4c1ca4a98cdc9284e03e7f224 Mon Sep 17 00:00:00 2001 From: yiyange Date: Tue, 3 Nov 2020 16:59:07 +0000 Subject: [PATCH 2/2] make line shorter --- sklearn/neighbors/_lof.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/neighbors/_lof.py b/sklearn/neighbors/_lof.py index 3c5fd06e03842..a4aed3cdaeff9 100644 --- a/sklearn/neighbors/_lof.py +++ b/sklearn/neighbors/_lof.py @@ -193,7 +193,7 @@ def __init__(self, n_neighbors=20, *, algorithm='auto', leaf_size=30, def fit_predict(self): """Fits the model to the training set X and returns the labels. - **Only available for outlier detection (when novelty is set to False).** + **Not available for novelty detection (when novelty is set to True).** Label is 1 for an inlier and -1 for an outlier according to the LOF score and the contamination parameter.